Skip to content
Aleksey Stukalov edited this page Nov 17, 2016 · 20 revisions

Migration of Legacy Application to CUBA Platform

In order to show how your legacy application can be migrated to CUBA, we will use official sample application for MS LightSwitch.

CUBA application will not change the structure of existing tables, so CUBA and LS applications will have an ability to work simultaneously, using the same instance of the database.

##LightSwith Application

You can find development guide for the Vision Clinic sample and develop it yourself or simply download it.

The Vision Clinic example stores data in two different databases, linking data between them. In order to simplify the example, we merge two databases into one and create a foreign key between Product and InvoiceDetails tables, so DB schema looks as follows:

db-schema

In fact, we need only the database, so you can find instructions of how to create it in the Database section.

Database

To make your application up and running on MS SQL Server:

  1. Download and install MS SQL Server 2012+ from the official website.
  2. Run create-db.sql script; then run insert-data.sql script.
  3. Enable SQL Server and Windows Authentication mode and sa user to login as it is shown here. Remember password for the sa, it will be used for connecting the database from our CUBA application.

Run CUBA application

To run this application follow the steps below:

  1. Download and install the latest version of the CUBA Studio.
  2. Download or clone the project to your local PC.
  3. Run the CUBA Studio server and open it in a browser (default url is http://localhost:8111/studio/).
  4. Import the project by selecting its folder. import project
  5. Specify connection parameters to the database in project properties (note that if you use SQLEXPRESS or named instance you should specify your instance name in Connection Params, e.g. ;instance=SQLEXPRESS). project properties
  6. Go Run -> Start Application Server in the menu.
Clone this wiki locally