MDriven Turnkey lets you build and run model-driven internet applications, and this page helps application designers and developers choose the right starting point.
What MDriven Turnkey is
MDriven Turnkey is the application front end for solutions designed with MDriven. You define the application's information, actions, rules, and views in MDriven Designer; Turnkey provides the web application in which users work with that model.
For example, you can model a rental domain with cars, customers, and rental contracts, define the rules for a reservation, and create the views that users need. Turnkey runs the resulting application and supports iterative model updates.
Turnkey uses established web and platform technologies, including jQuery, Bootstrap, AngularJS, Blazor, Microsoft Azure, SQL Server, MySQL, and Postgres. You can use the generated user interface or take control of front-end presentation by adding front-end components.
How the parts fit together
Turnkey separates an application into three areas of concern:
| Area | Responsibility | Example |
|---|---|---|
| System Gist | The information, actions, rules, and views that you design in MDriven Designer. | A rental contract must have a selected car before it can be completed. |
| Modernity | The runtime provided by the Turnkey motor and MDrivenServer. | The application executes the model and presents its views as a web application. |
| Fashion | The presentation layer, implemented with CSS, HTML5, and AngularJS, or WPF where applicable. | You replace or extend generated presentation with your own CSS or HTML-based component. |
A ViewModel is the model-facing representation used by a view. It can have validation rules that apply in that particular view. This complements model rules: for example, a model rule can protect the rental data in every context, while ViewModel validation can guide a user before they leave a specific form.
Choose your starting path
| Your goal | Start here | What you will learn |
|---|---|---|
| Understand the product and site options | Documentation:Introducing MDriven Turnkey | What Turnkey is and the available ways to obtain or host a Turnkey site. |
| Begin designing a Turnkey application | Documentation:Starting with MDriven Turnkey | The recommended starting point and the requirement to use the latest MDriven Designer when working with Turnkey. |
| Follow guided examples and tutorial sessions | Documentation:MDriven Turnkey Series | A series covering application development, actions, ViewModel validation, logged-in users, access groups, and social login. |
| Run Turnkey on .NET Core | Documentation:MDriven Turnkey Core | The .NET Core-specific requirement for prototype XML data placement and naming. |
| Install as an Azure Web App | Documentation:Installing TurnKey as an Azure WebApp | The Azure Web App installation training entry point. |
Build an application
Use this workflow to move from an idea to a working Turnkey application:
- Install and run the latest MDriven Designer as described in Documentation:Starting with MDriven Turnkey.
- Design the domain model: define the classes, relationships, values, actions, rules, and views that represent the business problem.
- Create the ViewModels and views users need. Add ViewModel validation where a rule is specific to how a user performs a task in a particular view.
- Run the application in Turnkey and test the user flow. For example, verify that a user can select a car for a rental contract and that invalid states are clearly indicated.
- Refine the model and views, then update the running application. Turnkey is intended for short model-to-application iterations.
- Add presentation or implementation extensions only when the generated UI or model behavior needs to be extended.
The Turnkey series includes a Movie Theatre Ticket sample and sessions that demonstrate persistence, navigation between AngularJS pages, server-side reservations, and replacing generated UI with HTML5, CSS, and Angular-based presentation.
Control access and sign-in
Turnkey includes support for multiple login-related options. Use Documentation:TurnkeyUserLogin as the entry point for the SysUserAuthentication package, password reset, hidden-password login, social login, and simulated login.
Access control belongs in the application design. The Turnkey tutorial series demonstrates using the logged-in user and AccessGroups to control whether and when a user can access actions. For example, an action intended for administrators can be made unavailable to users outside the appropriate access group.
Extend the application when needed
Turnkey supports custom C# .NET implementations for needs that are not represented by the model alone, such as cryptography or calls to an external API. The tutorial material also describes adding front-end components when you need to replace or extend generated presentation.
Keep the responsibilities distinct:
- Put domain information, rules, and actions in the MDriven Designer model.
- Put view-specific behavior in the relevant ViewModel.
- Put visual presentation changes in CSS, HTML5, or front-end components.
- Use a custom C# .NET implementation for specialized technical behavior, such as an external API call.
Develop locally
Running the local core Turnkey application shortens the development loop. If your SCSS, CSS, or EXT_Components source must remain outside the Turnkey core file tree while still being served by the web server, use Windows directory symbolic links as described in Documentation:Turnkey local development tips.
For example, the documented pattern links an external component source directory into the Turnkey EXT_Components directory:
mklink /d C:\<turnkey core location>\EXT_Components\MoveAroundInGrid C:\<source code location>\EcoProject1_AssetsTK\EXT_Components\MoveAroundInGrid
To remove a symbolic link, use rd on the link path. Read the local development guidance before applying this pattern so that you target the link rather than the source directory.
Run Turnkey on .NET Core
When you use MDriven Turnkey Core, ensure that the XML file containing your data is in the same directory as the model and follows the required .PrototypeData.xml naming convention. This placement is required for the documented .NET Core setup.
Hosting choices
You can establish a new Turnkey site in one of three ways:
- Obtain a Turnkey slot from MDriven.
- Set up Turnkey in your own Azure account.
- Set up Turnkey on your own premises.
For the Azure Web App path, continue with Documentation:Installing TurnKey as an Azure WebApp. For an overview of these choices and the Turnkey site concept, see Documentation:Introducing MDriven Turnkey.
