This page explains MDriven for people who are new to model-driven development and want to understand what you build, which tools you use, and where to start.
What MDriven is
MDriven is a model-driven development platform for creating business applications. You describe the information, rules, and user interaction in a model; MDriven uses that model to create and run parts of the application.
For example, for an order system, you model classes such as Customer, Order, and OrderLine, define that an order belongs to one customer, and add rules such as "an order must have at least one order line." The model becomes the central definition of the system.
You do not need to know C# or Java to test an application idea in MDriven. If you do write C#, MDriven can generate the domain-layer code from the model and leave your additions in partial classes.
The basic idea: model first
Model-driven development means that you change the model first, then update the artifacts derived from it. These artifacts can include database schema, generated C# code, and user interface components.
A model is a structured description of the application domain: its classes, attributes, associations, rules, and behavior. In the order example:
Customerhas aNameattribute.Orderhas anOrderDateattribute.- A customer can have many orders.
- An order has many order lines.
This approach follows Model-Driven Architecture (MDA): the model is a platform-independent definition that can be transformed into implementation artifacts. It also supports domain-driven design: use names that people in the business recognize, such as Invoice rather than RecordA.
The main MDriven tools
| Tool | What you use it for | Example |
|---|---|---|
| MDriven Designer | Create and maintain the UML model. | You add the Order class and connect it to Customer.
|
| MDriven Turnkey | Build and run a web application front end from the model, ViewModels, and actions. | You create an order-entry page that lists a customer's orders and lets a user add an order line. |
| MDriven Server | Run models on a server, manage data, synchronize clients, and execute periodic declarative jobs. | A nightly model-defined job creates reminders for overdue invoices. |
| MDriven Framework | Use the model-driven framework from Visual Studio and generate the business-layer code that corresponds to the model. | You generate C# for Order and add a business-specific integration in a separate partial class.
|
MDriven Designer is available as a standalone tool and as part of the Visual Studio-based MDriven Framework workflow. MDriven Turnkey uses MDriven Designer and MDriven Server capabilities to provide an application front end.
How an application is built
A typical MDriven application has these parts:
- Model the domain. Define classes, attributes, and associations in MDriven Designer. For example, define
Product, itsUnitPrice, and the association fromOrderLinetoProduct. - Define rules and calculations. Use OCL (Object Constraint Language) expressions for queries, calculations, and business rules. For example, an order total can be calculated from its order lines.
- Define the user interaction. Create a ViewModel. A ViewModel is a transformation of part of the model into a view, with UI hints that describe how it is presented. For example, an Order ViewModel can show customer details, order lines, and an
Add lineaction. - Run and deploy the application. Use Turnkey for a web front end and MDriven Server to execute the model and manage data on the server.
What OCL and ViewModels do
OCL is the expression language used to retrieve, transform, and calculate model data and to express rules. For example, an Order ViewModel can calculate the total amount with an expression based on its order lines and their product prices.
A ViewModel defines what a user sees and can do for a selected part of the model. It is not a second copy of the database structure. It is a view of the model that can transform and combine information for a screen.
For example, the model may contain Customer, Order, and OrderLine. A customer-order ViewModel can show:
- the customer's name and contact details;
- a list of that customer's orders, sorted by order date;
- the selected order's lines;
- a calculated order total; and
- actions to create an order or add an order line.
See Documentation:How does MDriven work for an overview of ViewModels, OCL, AutoForms, picklists, and state machines.
Where your data goes
MDriven uses relational databases for information storage. The model can be transformed into database schemas, and MDriven can evolve an existing database toward the structure described by the changed model.
For example, when you add a DeliveryDate attribute to Order, the model describes that new information field. The database schema can then be updated to store it.
MDriven supports database use through its persistence mechanisms, including SQL Server, Oracle, MySQL, PostgreSQL, SQLite, and other supported mappers and configurations. Review the database choice and deployment setup before you put an application into production.
Start learning
- Read What is MDriven to understand the modeling and execution approach.
- Open Getting Started for installation, environment setup, terminology, and the onboarding path.
- Learn the MDriven Designer workflow through MDriven Designer.
- Follow Bootcamp for a step-by-step learning path.
- When you are ready to build a web application, study MDriven Turnkey and MDriven Turnkey site creation.
MDriven is free to use for models with up to 50 information classes. A class is a type of business information, such as Customer or Order.
