Installing a pre-existing solution

In this guide we will go through the process used when you install a pre-existing solution on top of an empty solution. As such, the guide presupposes that you have already installed a local Dynamicweb solution.

A pre-existing solution could be a Swift release or a copy of another Dynamicweb solution.

In practical terms, a solution consists of:

  • Files-folder with system files, templates, and other static ressources
  • database with data - pages, products, paragraphs, etc.

To install an existing solution on top of an empty solution:

  • Download the solution database and files folder
  • Extract the Files folder and use it in place of the default application files folder
  • Open SQL Management Studio and restore the database
  • Edit the globalsettings.aspx file and point it to the restored database

The Files-folder of a solution contains solution-specific static content such as:

  • Images
  • System files
  • Templates
  • Global settings
  • Etc.

When you're installing a  pre-existing solution (e.g. Rapido) you will download a /Files-folder and use it in place of the one auto-generated by the Dynamicweb Installer:

  1. Obtain the Files folder -  e.g. by downloading the latest Rapido Files zip here or by zipping a Files-folder from elsewhere
  2. Extract it - we recommend you place all your local solutions in dedicated folders inside a /Solutions-folder 
  3. Open IIS and create a virtual folder, then point it to the extracted /Files folder 

After following this procedure, you can log in to the solution and access the contents of the /Files folder - this includes designs, item types (if stored as XML), images, and so on. This is sometimes all you want.

Often, however, you also want to access the solution database which contains data such as pages, paragraphs, users, orders, etc.

database contains solution-specific data such as pages, paragraphs, orders, users, products, etc. 

The Rapido database is packaged as a .bacpac file, which is a useful file format when moving a database from one server to another (basically what we're doin here). If you're following the requirements you will be running a version of MS SQL Server which can handle .bacpac files.

To restore the database:

  • Obtain the database backup - e.g. by downloading the latest Rapido database zip here
  • Extract it to an easily accessible location
  • Open SQL Management Studio and connect to your server
  • Right-click the server and open Properties Security - verify that Server authentication is set to “SQL Server and Windows authentication mode” (Figure 3.2)
Figure 3.2 Check the Security settings

Right-click the Databases node and click Import Data-tier Application. This opens the Import Data-tier Application window (Figure 3.3). Click Next.

Figure 3.3 Importing a Data-tier Application (.bacpac-file)

If not already selected, select Import from local disk and click Browse and locate your .bacpac-file (Figure 4.1). Then, click Next.

Figure 4.1 Import settings

Name your new database (Figure 4.2). You can also change the Data file path and Log file path for the SQL Sever (optional).

Click Next to proceed to the Summary step and verify that the settings are correct, and then click Finish.

Figure 4.2 Name your new database

When the operation is done, the Rapido database should now be accessible from the Databases node (Figure 4.3).

Figure 4.3 The Rapido database is now accesible from SQL Management Studio

Since this is a restored database you must manually map an SQL user to the database.

  • Go to Security > Logins  and open your SQL user (double-click)
  • Open the User Mapping node
  • Click the Map checkbox for the restored database (Figure 5.1)
  • Check the db_datareaderdb_datawriter and db_ddladmin roles for the user
  • Click OK
Figure 5.1 Mapping your SQL user to the extraxted database

To make the solution use the extracted database:

  • Go to the Files folder and open Globalsettings.aspx in a text editor, e.g. notepad++ or visual studio code
  • Locate and edit the Database-section to match the user and database details (Figure 6.1)
  • Save
Figure 6.1 Pointing your solution to the extracted database

You should now recycle the application pool for the site in IIS Manager (Figure 6.2) – occasionally the SQL user credentials are cached and will prevent you from connecting properly to the database.

Figure 6.2 Open the IIS Manager and locate the application pool for your site to recycle it

Many solutions - such as Rapido - depend on various indexes being built to render e.g. products in frontend or enable content search.

To build an index:

  • Go to your.localsolutionurl.dk/admin and log in using the administrator credentials you created earlier
  • Go to Settings > Repositories
  • Open a repository and click on the index
  • Under Builds click on the yellow button to build an instance of the index
  • Repeat these steps for all remaining indexes

You have now built the indexes – if relevant, open the solution frontend and verify that products are now being rendered.

The final step in the install process is to rerun the update scripts - this ensures that the database is updated to correspond with the current application requirements, as these may have changed since the database backup was taken.

  1. Go to Settings > System Information and scroll to the bottom
  2. Change update script numbers to 0 & 0 and click Rerun updates
  3. When done, open IIS manager and recycle the application pool
Figure 8.1 Update script

And that’s all :) You now have a local installation of Dynamicweb Rapido to play around with.

After playing around with Rapido for a while, you should read through the Rapido documentation.

With Dynamicweb Rapido, you can easily configure and deploy most projects with a minimum of hassle – and custom projects are also guaranteed to be off to a good start, as we provide the foundation with a clean, maintainable and highly customizable code base.

In the documentation you will be introduced to the following:

  • The item types, which are used to both configure a solution and to create content
  • The templates, some of which are ViewModel-based and all of which easy to work with
  • The CSS projects – BaseRapido & Ignite – which are at the core of the Rapido philosophy of making everything maintainable, configurable, and extendable
  • The dos and don’ts of JavaScript and Ajax on Rapido – especially the don’ts
  • And much, much more…

We will also discuss some general principles for working with frontend development in teams, which will help you make your projects maintainable – and will save you lots of time in the long run.