The Client Project Generated by the Data Abstract New Project Wizard

The solution created by the new project wizard is for a basic client application. It is 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.

The solution is intended as a starting point for developing a new application that allows you to skip some of the routine work in the very beginning of the application development cycle.

Project Contents

Project Overview

This article describes the WPF client application project. Other application types might have different GUI components (for example, a WinForms application would contain Form files, while a Mono for Android application project would contain Activity definitions), but DataModule and the Dataset Definition will always remain the very core of the application.

The newly generated WPF application contains several components (code file extensions are for C#; for other languages they will differ):

File Description
DataModule.cs Data Module. Contains all components responsible for communication with the remote server
LogOnForm.xaml (Optional) pre made Log On dialog
MainWindow.xaml Main Application window, initially emtpy
Settings.settings Application settings file
licenses.licx Components licenses file (contains the list of classes that require licenses)
.relativityClient, .daRemoteSchema Configuration file containing remote server connection settings. Which extension is used depends on whether the project is created for a Relativity server or a custom server.
TableDefinitions_* Contains the table definitions based on the remote server Schema

All components are described below in more details.

DataModule

This component or class (for platforms like Silverlight where components aren't supported) contains the following sub-components:

Sub-component Description
clientChannel Client Channel that performs low-level communication with the server

clientChannel also handles the OnLoginNeeded event that is raised when the 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 the respective options were selected in the New Project Wizard.

The Data Module also exposes the following properties and methods:

Name Kind Description
DataAdapter property Provides direct access to the DataAdapter
DomainName The name of the currently used server Domain. Only the get method is public  
SchemaName The name of the currently active Schema. Only the get method is public, use SetActiveSchema to change the active Schema  
IsLoggedOn property Returns true when logging on to the server was performed successfully
UserId property Gets the user name
LogOn method Logs on to the server using the provided username and password. Returns true on success
LogOff method Logs off from the server
SetActiveSchema Changes the currently active schema  

TableDefinitions or DataSet definition

The DA LINQ Table Definitions or DataSet Definition file (ordinal XSD DataSet schema definition file used by Visual Studio) is created based on the remote server Schema specified when using the New Project Wizard.

LogOn form

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. It is intended to let you get going quickly while you build the rest of the application.

Main Window

Main application window, also known as MainForm when you create a WinForms based project. The New Project Wizard leaves it to user to fill it with content and application logic.

Settings file

Ordinal .NET Application Settings file. For newly generated projects, it might contain user name and password, if the respective option was selected in the New Project Wizard. It also contains the name of the Domain and the Schema

Please note that user name and password are stored without any encryption, so in a real world application it is essential that some form of encryption should be used.

Connection Settings File

This file, which either ends with .relativityClient or .daRemoteSchema, is a simple XML file that contains the remote server connection settings that are used by the Schema Modeler and Data Abstract tools integrated into Visual Studio. Note that it is not included in the compiled application (i.e. the Build Action property for this file in Visual Studio is set to None).

The New Project Wizard doesn't store server access passwords in this file, however this could be done by other applications (f.e. Schema Modeler), so please distribute this file with caution.

Licenses File

Plain text file containing a of list of classes that require licenses to be provided by the Everwood License Compiler. On build time, the License Compiler compiles and embeds the requested licenses into the resulting assembly.

This file doesn't contain actual license information, so it is safe to redistribute it.

Summary

The Client Project generated by the New Project Wizard is a rather basic application that is a good starting point for learning Data Abstract for .NET or creating a simple utility application. More complex production-level applications would require major changes (for example, the Data Module might be moved into a separate Data Access Layer assembly, the Log On dialog reworked to match the company style etc.).