You can connect MDriven Designer to an MDrivenServer app slot to deploy your model, prototype against server-managed data, and verify that the server received the model.
What you need
Before you connect, make sure that:
- Your MDrivenServer is running and you know its URL.
- You have registered a user on that MDrivenServer and have that user's credentials.
- You know the app slot to use, for example
A0. - The server has been configured with the database connection you intend to use.
Database selection and connection strings are configured on the server, not in MDriven Designer. For PostgreSQL, MySQL, and MSSQL configuration, see Documentation:Configuring Production Databases PostgreSQL MySQL MSSQL. For general server setup and maintenance, see HowTos:Configure and Maintain MDriven Server.
Deploy a model from MDriven Designer
An app slot is the named location on MDrivenServer that holds a deployed model and its data. In this example, the target slot is A0.
- Open your model in MDriven Designer.
- Open the MDrivenServer connection/deployment workflow in MDriven Designer.
- Enter the credentials for the user you registered with MDrivenServer.
- Enter the MDrivenServer URL.
- Select the target app slot, such as
A0. - Select Suggest automated deploy if you want MDriven Designer to suggest deployment automatically.
- Click Go.
When MDrivenServer reports that the database was created, it has received the model and created the database structure required for that model. The model is now available in the selected app slot.
Prototype against the server
After deployment, change the prototype data source from the local XML file to the MDrivenServer app slot. Starting the prototype now shows the data managed by the server database rather than the data in the local XML file.
For example, if the local XML file contains test customers but the server database is empty, the prototype will no longer show those local test customers. Create or load data on the server to test with server-managed data.
This is an important check: you can use the same model while changing where its data is stored and retrieved.
Verify the deployed model and data
Use one or more of the following interfaces to confirm that you are working with the intended MDrivenServer and app slot.
| Method | What you can verify | Example |
|---|---|---|
| MDriven Designer prototype | That the prototype reads server-managed data instead of the local XML data source. | Start the prototype after selecting the MDrivenServer data source and confirm that its records match the server database. |
| MDrivenServer AutoForms | That the server can navigate the model and expose its data according to the model. | Open AutoForms and navigate model classes and their associations, in the same way that you navigate in the Model Driven Debugger. |
| ASP.NET Generic App | That the deployed model and data can be accessed through the generic web application. | Browse to the Generic App and inspect the same model data that you used in the prototype. |
The AutoForms interface follows the model, so you can navigate the available model structure and data. The ASP.NET Generic App provides a web-based alternative that corresponds to the prototype experience.
For an overview of the interfaces through which MDrivenServer exposes model data, including the PersistenceMapper API and JSON-based access, see Documentation:MDriven Server User/Web interface.
You can give a tester a link that installs or starts MDriven Designer through its ClickOnce deployment and passes startup parameters. The parameters tell MDriven Designer which MDrivenServer URL and app slot to use; MDriven Designer then downloads the model and starts prototyping.
When a user follows the link:
- If MDriven Designer is not installed, the ClickOnce deployment offers to install it.
- If it is already installed, ClickOnce checks whether a newer MDriven Designer version is available.
- MDriven Designer starts with the supplied server and app-slot parameters.
- MDriven Designer downloads the model from that MDrivenServer app slot and enters prototyping mode.
A link has this shape:
http://www.new.capableobjects.com/xdownloads/MDrivenDesigner/Gaffr.application?prototype=<base64-encoded-server-url>&appslot=A0
The query parameters are:
| Parameter | Meaning |
|---|---|
prototype
|
The MDrivenServer URL encoded with Base64 so that it can be passed through browsers. |
appslot
|
The app slot to download, for example A0.
|
For example, a link with appslot=A0 instructs MDriven Designer to download the model deployed to slot A0 on the server identified by prototype.
Security and failure cases
A prototype-start link may fail before MDriven Designer reaches prototyping. The possible failures are security-related: the server and model must permit the user and client to obtain the deployed model. Confirm the server URL, app slot, and user access before distributing the link.
Do not treat a shared prototype link as a substitute for server access control. Test the link with the intended user before sending it to a customer or external tester.
Related deployment connections
A MDriven Turnkey application connects to MDrivenServer separately from MDriven Designer. Configure that connection with MDrivenServerOverride.xml; see Documentation:MDrivenServerOverride. For IIS deployment, including the Turnkey connection configuration and model upload step, see Documentation:Deploying MDriven Server & Turnkey Core on IIS.
If the server does not respond as expected after deployment, inspect the server log as described in Documentation:MDrivenServer log.
