|
Introduction XUI and Carousel can be used to speed up and enhance the capabilities of a typical browser based application. Taking the popular open source business application, SugarCRM, we will illustrate some of the advantages of using a rich-client framework. Not content with end-user benefits and rich-client enhancements like offline usage we also show how to simply migrate from existing HTML forms to XUI pages.
There are links to more detailed documentation throughout the article, but this part of it concentrates on the high level overview of the application and will cover the following topics.
http://www.sugarcrm.com [1]) comes in several different flavours from free open source to a full enterprise edition and has recently passed the 1 million downloads milestone for all Sugar products. SugarCRM allows account and contact information to be entered and manipulated through a browser. It makes use of a MySQL database to store it's information and it uses PHP to process the HTML for the browser. This marriage of open source technologies makes it the ideal choice for cross platform deployment. SugarCRM has tapped into the long neglected small to medium enterprise market by providing a product which is free to use at it's basic level. This openness coupled with the fact that the source is fully customizable has led to the formation of a strong community of developers and consultants who have enhanced and even built businesses from their SugarCRM expertise. The suite has also been localized into numerous languages which can be downloaded from the website. |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|
![]() |
|
|
Figure 1 - SugarCRM running within the Firefox 1.5 browser |
|
|
|
|
|
![]() |
|
![]() |
page manager [1] for subsequent use. When an account is being displayed the bindings for the page are updated automatically changing the values coloured grey and the list of contacts below the main form.
![]() |
|
![]() |
|
|
|
|
|
|
Take a look at how the page navigation is handled [1] |
|
![]() |
|
![]() |
![]() |
|
![]() |
|
|
Figure 2 - Once constructed pages are cached for further use |
|
|
|
|
|
![]() |
|
![]() |
Problem 2 - Offline usage
The next problem which is addressed is offline usage. With the Rich
Client version it is possible to cache accounts which can then be
viewed
while offline. This is a very useful piece of fuctionality for a CRM
system. Account and contact information can be cached to a laptop
for a business trip to say a specific country or city.
|
Once an account is retrieved from the server, it is cached automatically and a timestamp is placed on the information. Subsequent accessing of the account will result in the information being used from the cache instead of being retrieved from the server again. If the information has passed it's cache time an attempt is made once again to retrieve it from the server. This caching mechanism speeds up the browsing speed dramatically. Figure 3 below shows a search for accounts in a specific city. All of the required accounts can be selected and cached to the local machine in a single server request. |
|
|
|
While working in offline mode new account and contact information can be created and existing information modified. This information can then be synchronized with the server when a connection is available once again as shown in figure 4.
Problem 3 - The basic behaviour
Perhaps the most obvious problem which is overcome with a Rich Client
application is the one which is taken most for granted. The Rich Client
application
is... well it's an 'application'. That is to say it runs as a separate
process within it's own window and is not embedded in a browser which
includes it's own functionality via it's menus, toolbars and settings.
This independence rewards the user
with a far more responsive and interactive application than can be
achieved through the use of HTML/Javascript.
The screenshot below shows how menus and rich interactive components can be included easily within the XUI application.
![]() |
|
![]() |
|
|
Figure 5 - Interactive menus and components |
|
|
|
|
|
![]() |
|
![]() |
Problem 4 - Localization
With XUI, localization can be handled easily and naturally by making
use of the localization techniques which are built into Java.
The XUI platform makes it easy to create a new language resource file
so that the language packs available for SugarCRM can be
imported.
|
|
Once created the language will appear at the next login as shown in figure 7. Language resources can be preinstalled or they can be imported or created by individual users. Carousel includes a translation tool which makes localization into new languages very simple.
Because the page declarations are already localized new languges will automatically appear when the pages are created.
![]() |
|
![]() |
|
|
Figure 8 - The application is localized |
|
|
|
|
|
![]() |
|
![]() |
Problem 5 - Styling
XUI applications are built with the use of external style sheet files
and as a result are easy to style and rebrand. The XUI editor
includes a colorwheel which makes it easy to create style sheets
consisting of complimentary sets of colours.
![]() |
|
![]() |
|
|
Figure 9 - Different stylesheets can be applied to the application |
|
|
|
|
|
![]() |
|
![]() |
All of these benefits leave us with an architecture which goes beyond the capabilities and reach of the browser. This allows us to build applications which exist on their own or which complement an existing browser based application such as SugarCRM.
![]() |
|
![]() |
|
|
Figure 10 - Your choice of traditional or Rich |
|
|
|
|
|
![]() |
|
![]() |
sourceforge [2] since March 2003. There have been several releases of the software up to the current 2.0.6 release which was used to develop this application. The community of users contributing to the development of the platform has risen during that time resulting in a platform which is mature, stable, scalable, extensible and which still has a runtime footprint of less than 250K. The NetBeans plugin has also made developing XUI applications even easier through its drag and drop interface.
![]() |
|
![]() |
|
|
|
|
|
|
|
|
![]() |
|
![]() |
Step 1 - Migrating from HTML
forms to XUI page declarations
We developed a HTML screen scraper to transform a HTML form into a XUI
format page. This utility is currently being enhanced and will be
included in a future release of Carousel. In order to use the scraper
it was necessary first to log into SugarCRM via the browser and to save
the page which was being migrated as a new file as shown in figure 11.
|
|
The page is generated with different options for bindings, events and components. This process quickly set up the pages with component declarations, data bindings and button events. Each of the pages generated in this way ran to over 100 lines of XML code so the quick start benefits which the scraper provided are obvious.
Step 2 - Localizing the pages
Once generated, the page needs to have the resource keys for the
components setup. This can be done with the Kalideoscope editor
which plugs into NetBeans.
![]() |
|
![]() |
|
|
Figure 13 - Editing the page within the Kalideoscope editor |
|
|
|
|
|
![]() |
|
![]() |
|
Step 3 - Saving
account information to the model |
|
|
Step 4 - Saving
account information to file |
|
|
Step 5 - Saving
account information the database |
|
![]() |
|
![]() |
|
|
Figure 14 - Prompt to logon to the server |
|
|
|
|
|
![]() |
|
![]() |
|
Step 6 - Using
components which provide a rich user experience All of the components can be styled through the use of XUI stylesheets [2] and most have some binding mechanism to the XModel [2] |
|
![]() |
|
![]() |
|
|
Figure 15 - The about dialog |
|
|
|
|
|
![]() |
|
![]() |
http://www.sf.net/projects/xui [3]
Carousel is due for incremental release in the coming weeks and will help to bridge the gap from client to server. For more information on XUI or Carousel you can contact Xoetrope at info@xoetrope.com [4]
The application will start with Java WebStart and you will be prompted to accept the certificate which is signed by Xoetrope. This will allow the application to access your hard disk. If you do not wish to allow this access then the application cannot be run.
When you launch the application for the first time you will have to
specify the directory which you want to use to cache your
account information and you will then need to logon on to the server in
order to retrive user ids from the database. The server
which is being connected to is java.xoetrope.com [6]
If you go to this site you will be presented with the browser based
SugarCRM application so you can work with the browser version
alongside the XUI version to see how changes are being made. The
following usernames and passwords can be used in either version
of the application...
| jim | password |
| sally | password |
| max | password |
| chris | password |
| sarah | password |
| will | password |
Click the button below to launch the application.
[7]
Xoetrope are launching a beta and testing program which will see the
development of a commercial version of this application.
Click here if you wish to sign up for
the beta and pilot programs [7]





