The Client Project Generated by the Data Abstract New Project Wizard (.NET)
(This page is considered "good" on a technical level, but is pending review for grammar and typos)
Client Project generated by the New Project Wizard is a rather simple application.
Client Project was intentionally created to be as simple as possible so it doesn't have a clean separation between application layers nor does it have separated view models for WPF. It is just a start point for developing a new application that allows to skip some routine work in the very beginning of the application development cycle.
This article describes WinForms client application project. Other application types might have different GIU components (for example WPF application would contain set of XAML files while Mono for Android application project would contain Activity definitions), but DataModule and Data Definition will always remain the very core of the application.
Newly generated WinForms application contains several components (code files extensions are for C#. For other languages they will differ):
|DataModule.cs||Data Module. Contains all components responsible for communications with the remote server|
|LogOnForm.cs||(Optional) Log On dialog definition|
|MainForm.cs||Main Application Form|
|Settings.settings||Application settings file|
|licenses.licx||Components licenses file (contains list of classes that require license)|
|.daRemoteSchema||Configuration file containing remote server connection settings|
All components are described below in more details.
This component or class (for platforms like Silverlight where components aren't supported) contains following sub-components:
|clientChannel|| Client Channel that performs low-level communications with the server.
ClientChannel also handles the OnLoginNeeded event raised when remote server requests user authentication by calling the LogOn method (see below).
|message||Message component that performs protocol-specific data serialization and deserialization|
|encryptionEnvelope||Optional AES Encryption Envelope component that encrypts data sent over the wire|
|ecmaScriptProvider||Optional Business Rules Scripting API support component|
|remoteDataAdapter||Data Adapter component. This is the core element that sends data requests to the server|
|remoteService||Component that receives data requests from the remoteDataAdapter instance and sends them to the remote server using clientChannel and message|
|dataStreamer||Data Streamer that serializes and deserializes data requests|
Please note that some components (f.e. encryptionEnvelope) are optional and are added to the generated Data Module only when appropriate options were selected in the New Project Wizard.
Also Data Module exposes following properties and methods:
|DataAdapter||property||Provides direct access to the DataAdapter|
|IsLoggedOn||property||This property returns true when log on to the server was performed successfully|
|UserId||property||Gets user name|
|LogOn||method||Performs log on to the server using provided username and password. Returns true on success|
|LogOff||method||Performs log off from the server|
TableDefinitions or DataSet definition
Optional dialog that asks for user name and password and saves them to the application settings file. Please note that the password is saved as plain text without any encryption.
Main application form. New Project Wizard leaves to user to fill it with needed content and application logic.
Ordinal .NET Application Settings file. For newly generated project might contain user name and password, if appropriate option was selected in the New Project Wizard.
Please note that user name and password are stored without any encryption so in real world application some more protection for these sensible data should be introduced.
Connection Settings File
This file contains remote server connection settings, that are used by the Schema Modeler and Data Abstract tools integrated into the Visual Studio.
This is a simple XML file. It is not included in the compiled application (ie its Build Action is set to None).
New Project Wizard doesn't store server access passwords in this file but this could be done by other applications (f.e. Schema Modeler), so please distribute this file with caution.
Plain text file contains of list of classes that require license to be provided by the Everwood License Compiler. On build time License Compiler compiles and embeds requested licenses into the resulting assembly.
This file doesn't contain actual license information, so it is safe to redistribute it.
Client Project generated by the New Project Wizard is a rather simple application. It is a good start point for learning Data Abstract for .NET or creating a simple utility application. However more complex production-level application would require major changes in the application (for example Data Module might be moved into separate Data Access Layer assembly, Log On dialog reworked to match the company style etc).