Click here to Skip to main content
15,867,568 members
Articles / Programming Languages / C#

Genesis Hybrid Smart Client Framework part III

Rate me:
Please Sign up or sign in to vote.
4.29/5 (10 votes)
19 Jun 2009Ms-PL10 min read 33.9K   7   8
This is part III of a VII part series. This article covers the back-end of the Genesis Smart Client Framework including the database design.
Download the latest source code for this article on Code Project (opens in new window)

Download the latest release from Code Plex (opens in new window)

Introduction - The Back-end

The back-end of the Genesis Smart Client Framework is the web services that provide business logic and database access to the Smart Client, the databases, Meta-Data and a file system. This article explains in detail the function of each of these systems and how they work together to provide a smart client framework.

This article is part III of VII. Go to part I to see the index.

Please refer to our web site www.bluemarble.co.za for the most up to date information about the Genesis Smart Client Framework or any of our newsfeeds.
News feed
Development feed
View our blog
Follow our tweets

In order to pursue our active interest in releasing this version of the Genesis Smart Client Framework as an open source product, we've created a profile on www.codeplex.com where we maintain the most recent copy of the source code. If you want the latest version of the Genesis Smart Client Framework source code go to our code plex profile or download the latest release from Code Plex.

Meta-Data

The Meta-Data is the configuration data for the Genesis Smart Client Framework when combining the module and command configuration with the user access profile. The Meta-Data has three distinct sections.

Security

Genesis Meta-Data Security Diagram

The diagram above illustrates the database tables and relationships that are used for the security Meta-Data. The security Meta-Data defines the users and their security access profiles.

Security_Role

The Security_Role table contains the definition of specific security roles within your application. The Genesis Smart Client Framework compares your user's access to one or more roles that have the required access to resources hosted by the Genesis Smart Client Framework. The role's definition is simply a name and a description.

Security_User

The Security_User table contains the definition of the user profile. The Genesis Smart Client Framework uses this information to authenticate users when they first sign in, and on some method calls to ensure that the current session is still valid. The user definition contains a username, password, e-mail address, startup script and a flag to indicate whether an account is active or disabled.

Security_UserRole

The Security_UserRole table contains information about the user's membership of specific roles.

Application

Genesis Meta-Data Application Diagram

The diagram above illustrates the database tables and relationships that are used for the application Meta-Data. The application Meta-Data defines the applications and the application specific commands and files required to enable the application to execute on the client computer.

Module_Application

The Module_Application table contains the definition of the application hosted in the Genesis Smart Client Framework. The Genesis Smart Client Framework has the ability to host multiple applications concurrently and allow user access to any of these. The application's definition contains an application name, description and the order in which the application must appear on the user's list of available applications. There is also a flag to indicate whether and application is visible or not.

Security_ApplicationRole

The Security_ApplicationRole table contains information about the roles that have access to this application.

Module_File

The Module_File table contains the definition of files that are required by applications hosted in the Genesis Smart Client Framework. Files have a name, description, url where the file can be downloaded, a local file path for database synchronization with available resources, version information, a value indicating the type of file and the order in which the file must be downloaded by the client application.

If the client application detects a difference between the online version of a file and the local copy of the file, a new copy is downloaded. The client application keeps a cache of files locally to prevent files from being repeatedly downloaded.

Lookup_FileType

The Lookup_FileType table extends the information of a specific file by allowing the Genesis Smart Client Framework to focus on specific files. For example, when the client application loads a hosted application into memory it only queries the system for files where the type of file is a 'Dynamic Link Library'.

Module_Command

The Module_Command table contains the definition of commands that can be executed by the client application. The Genesis Smart Client Framework uses the information in this table to locate the code in the local file cache and to execute the code using Reflection. Commands have a name, a code that is used to reference the command from scripts and menu items, a description and a .NET Type. The type is a full name including the namespace to the implementation of the command in .NET code.

Security_CommandRole

The Security_CommandRole table contains information about the roles that have execution rights for the command.

User Interface

Genesis Meta-Data User Interface Diagram

The diagram above illustrates the database tables and relationships that are used for the user interface Meta-Data. The user interface Meta-Data defines the menu items that are visible to the authenticated user. * Our commercial client application makes use of an Office 2007 styled menu, and therefore our database structure was structured accordingly. There is no reason why the current system cannot be applied to conventional menu and toolbar implementations.

Module_Ribbon

The Module_Ribbon table contains the definition of the ribbon tabs that will appear along the top line of the ribbon. A ribbon is linked to an application and has a name and an order in which it is displayed.

Security_RibbonRole

The Security_RibbonRole table contains information about the roles that can show this ribbon tab to authenticated users.

Module_RibbonBar

The Module_RibbonBar table contains the definition of the groups that appear on a specific ribbon. The groups are containers that host buttons and other controls that can be displayed on a ribbon. A ribbon bar is linked to a ribbon and has a name and an order in which it is displayed.

Security_RibbonBarRole

The Security_RibbonBarRole table contains information about the roles that can show this ribbon bar to authenticated users.

Module_BarItem

The Module_BarItem table contains the definition of the items that appear in a specific ribbon bar. A bar item can be of any type declared in the Lookup_BarItemType table. Bar items can host other bar items and are linked to commands. The command is executed when the user interacts with the bar item on the front-end. Bar items have a name, an image and an order in which it is displayed.

Lookup_BarItemType

The Lookup_BarItemType table extends the bar items to define specific controls in the user interface. Bar item types include buttons, text boxes, combo boxes and containers.

File System

The Genesis Smart Client Framework has an online File System that it exposes to the server components and the Smart Client. The file system is accessible through the Web Services. The File System is an ASP.NET web site with database backup, deployment and Meta-Data update functions.

The File System is a shared web resource to enable global access to key resources at run-time. Modules can upload files which can then be accessed by other users or systems.

Genesis File System Files

Database Backup

The database backup functions are contained in the /deployment/database/backup.aspx file. When browsing to this file include the following parameters in the query string: DatabaseName with the name of the database to back up and ConnectionStringKey with the name of the key for the connection string in the web.config file. Provided with these parameters, the database will be backed up to the disk using today's date and current time.

Deployment

The deployment functions are contained in the /deployment/default.aspx file. When browsing to this file the user will be prompted to upload a deployment package. Once uploaded the package will be extracted and the relevant updates will be applied to the Genesis Smart Client Framework server, ready to be distributed to client applications. * Deployment packages are created with the Genesis.Deployment utility.

Meta-Data Update

The Meta-Data update functions are contained in the /update.aspx file. When browsing to this file, the Genesis Smart Client Framework will review each file found in the Module_File table. Each file will be checked on the server in the Path location stored for each file, if the file is a Dynamic Link Library the update function will use Reflection to analyze the file and update the related Meta-Data. This includes adding any new commands, or updating existing commands.

This function is important during the development cycle because each time the developer needs to force an update from his client application the file version is increased in his/her project, a build is done and the Meta-Data update function is run. This ensures that when the developer executes his/her client application, that the client application will download the latest version of the library. * A client application may choose to have a developer mode that automatically clears the local file cache before authentication with the Genesis Smart Client Framework. This will ensure that the client application always downloads the latest copy of the application libraries, however in order to ensure that the server has the latest copies of files available for download, the developer would still have to run the Meta-Data update function.

As a post-deployment step after using the deployment functions operators should also execute the Meta-Data update function.

Web Services

The Genesis Smart Client Framework relies on the Web Services to provide the business logic for the client application to access the database and other online resources. The Web Services is an ASP.NET web services site with authentication, application, file management and exception handling services.

Genesis Web Services Files

Exception

The Exception web service provides methods for the client application to log its exceptions and application events online to a central database.

File Manager

The File Manager web service provides methods for managing the online file cache. This includes file uploads and downloads.

Genesis

The Genesis web service provides generic methods for use with the Genesis Smart Client Framework. These methods include generic database command execution.

Keep Alive

The Keep Alive web service provides methods for use by the client application to test connectivity to the server.

Lookup

The Lookup web service provides generic methods to use any table in any database as a lookup table for other systems.

Module

The Module web service provides methods to interact with the application and user interface information stored in the Meta-Data. These methods take into account the user access profile when providing information.

Security

The Security web service provides methods to authenticate users, authenticate current user sessions and other methods related to the security management of the Genesis Smart Client Framework.

Databases

The Genesis Smart Client Framework can expose multiple databases to the Windows Client through the Web Services. The only database that the Genesis Smart Client Framework requires is the database that contains the user and security information, Meta-Data and module configuration.

Further Reading

This article is part III of VII. Go to part IV to read about the client.

Other information

Blue Marble is proud to be a Microsoft BizSpark startup company. Image 6

DISCLAIMER

The Genesis Smart Client Framework is a commercial closed source application. It is being provided on Code Project with all of the benefits that articles on Code Project grant its users (ie. Free and Fair use), however it must be noted that some modules contain a 3rd party control that we are unable to license via Code Project. Once all of the articles are uploaded, the code will be extracted to a seperate obfusicated library to protect our vendor's Intellectual Property. The full source code will be provided for this library, excluding the few lines that could compromise our License. An alternative will also be provided for developers who wish to use a completely free version.

DISCLAIMER UPDATE

An implementation of a standard Microsoft.NET controls user interface has been created and is available on Code Plex as of release 1.30.1024.0. This release complies with all of the Code Project article publishing terms and conditions.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
We Fix Code
South Africa South Africa
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionVb.net? Pin
ivanchain@hotmail.com22-Jun-09 22:08
ivanchain@hotmail.com22-Jun-09 22:08 
AnswerRe: Vb.net? Pin
Stephan Johnson23-Jun-09 0:03
Stephan Johnson23-Jun-09 0:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.