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 Client
The Client is a Windows Forms application that connects to the Genesis Smart Client
Framework Back-end. It has the ability to authenticate the user, download the most
recent updates and provides a web service connection framework for modules to communicate
with the back-end. This article explains in detail the function of each of these
This article is part IV 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.
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.
The Loader Application is a one-way file syncronization and execution utility. It
connects to the server and downloads a configuration file detailing applications,
files that make up the applications, their version numbers and a URL where it can
be downloaded. The new information is compared to a local cached copy of the file.
If a newer version of a file is found, or a new file or application, it is downloaded
to the relevant directory on the local computer.
Once files are synchronized to the local computer, the Loader Application can then
execute Shell Verbs on any files. It keeps a log of which files have been executed,
and there are basic rules which it applies to file execution. These rules include
options to always execute a file, to execute once only, or execute only when new
The Loader is not the Smart Client. The Loader ensures that the Smart Client
and supporting resources are up to date.
Smart Client Application
The Smart Client Application is a client that connects to the Genesis Smart Client
Framework back-end. The Smart Client simply implements the interfaces found in
the Genesis Smart Client Libraries, a set of client side libraries that allows the
developer to interact with the Genesis Smart Client Framework API.
The Smart Client hosts the module libraries that the developer has coded. Modules
that implement the correct interfaces can affect the host main form, application
behaviour, display forms for user interaction, read/write settings, communicate
with web services and execute secured code.
The Smart Client first authenticates the user. The login screen also displays
a list of applications that the user can sign in to. This list is updated as soon
as the correct username and password have been entered. Once the user is authenticated,
the Smart Client connects to the Genesis Smart Client Framework back-end and downloads
the Meta-Data. The Meta-Data is compared to a limited local cached copy. The limited
cache only contains information about applications, files and commands. Where the
files are different versions of the current online version, the files are updated.
Once all of the file resources have been synchronized the Smart Client loads the
modules into memory using Reflection. Meta-Data identifies commands inside of the
module, which are found and pointers to the commands are initialized. Only commands
that the user can execute are included, therefore preventing any possible unauthorized
The following section describes functionality linked to a 3rd party control. As mentioned
in the disclaimer this form will be provided without any licensing, therefore acting
in the control's trial mode. The code for the form will be provided without our
licensing information. This form will be excluded to a seperate library which will
be compiled and obfusicated. Once the host form loads, the Meta-Data is
read to find any ribbon controls that have to be created. The controls that are
supported are buttons, labels, textboxes, combo boxes, color pickers, horizontal
and vertical containers. Containers allow for complex layout. Buttons can be containers
for other controls. Buttons are linked to commands. Users might have the right to
see a button based on their user access profile, however they might not have the
right to execute the associated command. These users will be prompted with an 'Access
Denied' message when clicking these buttons.
Before the host form is displayed, the user logon script is downloaded. This script
contains a set of commands to be executed after the host form is displayed. This
generally includes launching a web browser to display a default start page. Once
the script has completed the host form is displayed.
The Host Form
The Host Form is a Windows Form that acts as a container for the module's created
by the developer. Modules contain User Controls that are hosted inside of the host
form. Modules have to implement the correct interface to function correctly. The
host form also executes the handles the execution of the commands. When a module
needs to execute a command, it calls the execute method on the host form.
The interface that allows User Controls to integrate with the host form also supports
some methods for navigating forwards or backwards, refresh, saving the content locally
or printing the contents. Based on the implementation of the interface, the native
ribbon controls in the host form will enable or disable accordingly. The native
ribbon controls are Back, Forward, Refresh, Save and Print.
Custom Smart Client application
As of release 1.30.1024.0 of the source code on
Code Plex there is a new solution called Blue Marble Genesis Client
which contains the bare minimum implementation for a Smart Client that implements
the Genesis Smart Client Framework client API.
This sample illustrates how to build an interface using standard Menu's and toolbars.
It also shows how to host existing application code inside of your Smart Client
application. We have also created a custom login screen and splash screen. The Genesis
Smart Client Framework client API allows developers to quickly create a windows
client application that connects to the Genesis Smart Client Framework back-end.
The sample is made up of two new projects. The first one is BlueMarble.Genesis.Client
which is the Windows Application that serves as the host. It simply loads a Class
Library called BlueMarble.Genesis.Client.Standard, this Class Library contains all
of the forms and interfaces used by the Windows Application. If a developer would
like to implement his/her own custom 3rd party library (ie. DevExpress, DevComponents)
they can simply create a new Class Library with the same interfaces implemented.
The host application can be modified to reference the new Class Library instead.
This article is part IV of VII. Go to part V to
read about the programming concepts.
Blue Marble is proud to be a Microsoft BizSpark startup company.
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.
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.