Using Persistate

Hide Navigation Pane

Using Persistate

Previous topic Next topic No directory for this topic  

Using Persistate

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for the print function Mail us feedback on this topic!  

You use Persistate alongside Visual Studio to develop your applications.  It is available as the Persistate Generator add-in which you launch from the Tools menu. Generator allows you to perform activities such as processing your application definition file, creating Persistate databases, or defining user interface layouts.

The following set of steps describes in general terms how you use Persistate to create an application.

1.Write a package definition file.  This uses an English-like language with a high level semantic content.  The language is easy to write and understand, making it self documenting. This file defines the persistent classes that your application requires, and lists the operations that are performed on them.  See Writing definition files.
2.Process the definition file.  You use the Persistate Generator add-in to do this. See Using Persistate Generator and Configurator. Generator first parses the definition file, and if any syntax or semantic errors are found, nothing further is done.  If there are no errors, there are a number of things which Generator can generate from the definition file.  If you tick the boxes for all these steps, then the result will be a working prototype application.
If they are not already there, it generates a solution and projects for the Model, Desktop (user interface) and Controller in the Visual Studio environment.
It generates database tables, views and stored procedures to store and access the persistent classes defined in the file.  These can be created in more than one database.
It generates C# classes to hold the defined persistent classes in memory, putting them in the Model project.  These are created as partial classes in two files - one file is recreated every time you process the definitions, and the other you use for your own methods.
It generates C# classes containing stub methods for the operations you have defined in the definition file.  For each operation, a method in the Controller project for executing the operation, and one in the Desktop project for controlling its presence in the user interface.
It generates default layouts for the persistent classes.  Layouts define how instances of a class are portrayed in a user interface.
It generates one or more "workspaces" describing the visual arrangement of the user interface.  You can define these in the file, or a default one is created for you.  These are independent of the user interface type, and allow you to dynamically show class instances in a given pane using a given layout.
It generates desktop forms for defined layouts, putting them into the Desktop project.  The layouts can be the generated default layouts or ones you have created yourself.
3.Refine the user interface. Generator can create default layouts for you for every persistent class. You can  modify these and/or create any number of additional ones.  When Generator processes layouts, appropriate changes are made to the generated forms.  Any changes you have made manually to the generated forms are retained.  See Developing the user interface.
4.Develop the application.  You develop the generated model, controller and user interface classes, and of course create your own.  You write your business logic in the operation stub methods generated in the Controller.  For the desktop form classes, you can use the Visual Studio designers to position the generated elements, and can add your own form elements manually.  See Coding Persistate applications.
5.Develop the definition file.  You can alter the definition file at will, adding and removing classes, class members, operations, etc..  When Generator processes the file, appropriate changes are made to databases and generated classes.
6.Deploy the application.  You can deploy the application as a stand-alone desktop application, or an application with a remote desktop based user interface hosted in the Persistate Viewer application.  In the latter two cases, the controller module is hosted in the Persistate Server application and can handle multiple simultaneous remote desktop sessions.  Note that you do not have to cater for these three scenarios separately - the same DLLs handle them all.