“Demo” web application is a comprehensive example to get started with. The following two components need to be installed on the machine as prerequisite:
Following short 2:30 minutes video shows step by step installation process of git clone, build, deploy and starting the web application.
git clone https://github.com/WorkplaceX/ApplicationDemo.git --recursive
Argument “–Recursive” clones also necessary submodule “Framework”.
Command Line Interface (CLI)
The framework provides a command line interface (CLI) with all necessary functions like build, deploy and so on. In the root folder type cli.
cd ApplicationDemo .\cli.cmd
All available framework CLI commands are listed like this:
Build the application from command line:
Set ConnectionString with command line interface:
.\cli.cmd config ConnectionString="Data Source=localhost; Initial Catalog=Application; Integrated Security=True;"
It creates or updates the files: “ConfigCli.json” and “ConfigWebServer.json”.
Note: Why does “ConfigCli.json” and “ConfigWebServer.json” have two ConnectionStrings? The framework needs a couple of sql tables (prefixed with “Framework”) to run. These tables can be deployed to a second, separate (empty) database. This makes it possible to wiretap an existing production database initially with a ready only user login. Like this it’s possible to test and demonstrate the frameworks capabilities to customers in a non-critical way.
Deploy Sql Tables
Run sql deploy script from command line interface to deploy necessary sql tables and views to database.
Note: You can run the command “deployDb” multiple times. The database table “FrameworkScript” keeps track of the executed scripts. No script is executed twice on the same database. The sql scripts are in folder: “Application.Cli\SqlScript"
Serve the application from command line:
Web browser opens on “http://localhost:56098/” and serves “Demo” application.
Custom Sql Table and View
Finally let’s wiretap any other sql table or view on the database.
Following cli command generates for every table and view in the database a C# class in the file “Application\Application.Database\Database.cs”
Follow this article on how to display an sql table or view in the web application: Code Examples