+ All Categories
Home > Documents > Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14...

Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14...

Date post: 09-Jul-2020
Category:
Upload: others
View: 5 times
Download: 0 times
Share this document with a friend
14
Casabac SWT Client Guide Casabac Technologies Casabac Technologies 1/14 Casabac GUI Server Casabac SWT Client Guide Release 3.5 2005-03-01
Transcript
Page 1: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

1/14

Casabac GUI Server

Casabac SWT Client Guide Release 3.5 2005-03-01

Page 2: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

2/14

CASABAC SWT CLIENT - CONCEPTS ...........................................................................................3 GENERIC RICH CLIENT .....................................................................................................................3 WHY CASABAC INTRODUCED IT… .........................................................................................................4 INSTALLATION & UPDATE ..................................................................................................................4 STATUS ......................................................................................................................................5

INSTALLATION ..........................................................................................................................6 WINDOWS INSTALLATION..................................................................................................................6 LINUX INSTALLATION.......................................................................................................................6 CONFIGURATION ............................................................................................................................6

Starting .................................................................................................................................6 Proxy Setup............................................................................................................................7 clientconfig.xml File.................................................................................................................7

UPDATING YOUR INSTALLATION ...........................................................................................................8 Updating from Casabac's Update Server.....................................................................................8 Setting up on own Update Server..............................................................................................8 Directly checking for Update when starting Casabac SWT Client ....................................................8

USAGE........................................................................................................................................9 THE "CASABAC-URL"......................................................................................................................9 SECURE COMMUNICATION VIA HTTPS................................................................................................. 10 COMMUNICATION THROUGH A PROXY................................................................................................... 10 CACHING................................................................................................................................... 11 FAVORITES ................................................................................................................................ 11 NO ACCESS TO PAGE? ................................................................................................................... 12 SKIN MANAGEMENT ...................................................................................................................... 12

Selecting a Skin .................................................................................................................... 12 Creating an own Skin............................................................................................................. 13

DEVELOPMENT HINTS..............................................................................................................14 PUBLISHING STILL HAS TO BE DONE! ................................................................................................... 14 ONLY CASABAC PAGES ARE SHOWN! ................................................................................................... 14

Page 3: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

3/14

Casabac SWT Client - Concepts

The SWT Client was introduced with Casabac Release 3.5. With the Casabac SWT Client pages that are created to be rendered in an Internet browser can also be rendered in a standalone GUI client that runs as separate program, independent from any browser.

Generic Rich Client

The Casabac SWT Client is a generic rich client: it does not know anything about the semantic background of screens but only about the optical arrangement of controls and the binding of controls to server side logic. - It can be compared with an Internet browser: the Internet browser knows how to render HTML without needing to understand anything about the semantic content of a page - the Casabac SWT client renders an XML layout definition containing various controls without needing to know the semantic content.

JavaSWT

Client

Web Server

Servlet Engine

Application View(„Adapters“)

XMLLayout

JavaSWT

Client

Web Server

Servlet Engine

Application View(„Adapters“)

XMLLayout

The Casabac SWT Client runs decoupled from the server side logic and connects to it using http as communication protocol - both for loading XML layout definitions to be rendered and for passing data between the client and the server.

Layout definitions are the same than the ones that are used for building interactive Casabac pages. The SWT client reads a layout definition via http, renders the controls of a layout accordingly and then communicates data behind the layout forth and back.

Page 4: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

4/14

Web Server

Servlet Engine

Application View(„Adapters“)

XMLLayout

http

SWT Browser

Web Server

Servlet Engine

Application View(„Adapters“)

XMLLayout

http

SWT Browser

The SWT Client can be used in parallel to Internet browsers. This means you may set up scenarios in which one type of users uses SWT clients for accessing the application, and another type of users uses Internet Browsers.

The application on server side is not aware of if a request is coming from a Casabac SWT Client or from a page that is displayed inside the browser.

Why Casabac introduced it…

Casabac did introduce the SWT client in order to provide a second GUI technology line in parallel to supporting Internet Browsers. The background for this decision is:

• Securing your investments: the GUI is an important part of your application. Having a second technology line significantly reduces the dependency on relying on Internet Browsers. Will the browser be "THE" GUI client platform for the next decade - will there be a trend from the browser back to non-browser screens? - With having a second technology line you are independent from this discussion.

• Moving your application into the foreground: when offering an application based on Casabac you so far had to convince customers that using the Internet browser for operational GUIs is a "good idea" (- and of course many customers like this idea!). But: some potential customers did not like it and may have blocked investments into your application because of technical reasons. - Now you can open both a Web GUI and a non-Web GUI for your application and need not to go through GUI technology discussions!

• Usage in high-usage-speed-environments: the browser GUI offers a good usage performance with up to date hardware (> 1GHz). But still you might think about areas in which you want to have a "DOS-screen-performance", e.g. for serving call centers etc.

Maybe you may miss one reason: having the possibility to offer controls that are not "do-able" via browsers. - We will continue to offer the same set of controls both for browser pages and for SWT pages. With the browser you can render the same quality of pages than with a control library approach.

Installation & Update

With release 3.5 the SWT client is installed locally one time on the client computer. After the installation is can be updated automatically using a central update server. The update server can either be the one

Page 5: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

5/14

provided by Casabac or one that you set up inside your organization. The data transfer for updating is done using http.

It can be also installed using Web-Start and Eclipse-plugin concepts. Please contact Casabac directly for more information on these topics.

Status

Basically the SWT client's goal is to render any layout that was built for Casabac Web pages and render it correctly. Currently there are some restrictions - despite the fact that "nearly everything is working" (have a look onto our demo pages!).

• Some controls are not available yet: o ABS* (absolute positioning controls) o ROWDIV

• The REPORT controls does not offer the possibility to interact within a report (line selection). It can be used for displaying reports, for converting them to PDF, etc.

• Control attributes with which you can directly manipulate the style definition of a control are not fully supported (e.g. background-color is supported, padding definitions are not supported).

• The IHTML control should be used "with care". • Different rendering styles (".css") are not supported. The look and feeld is currently fix.

We recommend the following development process:

• Use the Web version of Casabac for developing. Use the Casabac Developers' Guide for reading how to create your screens and how to bind your server side logic.

• Regularly check the pages against how they are displayed in the Casabac SWT client. • Do not excessively use style manipulations inside controls.

Of course we are working on removing the restrictions!

Page 6: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

6/14

Installation

Windows Installation

You receive the Casabac SWT Client from Casabac's download page. The download is a ".exe" file with the name "35_casabac_swtclient_YYYYMMDD.exe" - YYYYMMDD representing the date of build.

The installation includes the environment components for the GUI client, which are:

• Java Runtime Environment • SWT-jar-files and SWT-dll files • Some batch jobs to start the client.

The Casabac part of the SWT client is rather small (about 400 kBytes).

When executing the installation file you are asked for a directory:

Input any directory of your choice. After the installation this directory will look like:

<your directory> bin config jre swtclient

Inside the bin-directory there are two batch files: start.bat and startWithUpdateCheck.bat. The first one is the "normal" one which start the client - the second one first does a check if the client requires an update and then starts the client.

The config directory does not exist "from the scratch" but only if you do explicit configuration settings.

Linux Installation

Please contact Casabac for getting a Linux version of the SWT client.

Configuration

Starting

Have a look into the "start.bat" file. Inside the file you see that a parameter is passed to the SWT client. This parameter is the address of the starting page which is opened right after starting the GUI Server.

Page 7: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

7/14

Proxy Setup

Inside the SWT client there is a configuration popup:

The most important configuration in the popup is the setup of a proxy in case you are accessing servers through a browser. Dependent on your proxy configuration you either have to input a proxy-server and a proxy-port - or you have to also define a proxy-user and password.

The proxy configuration is stored in an XML file ("proxy.config") which is stored in the "config"-directory of your Casabac installation. In case you have to input a user and a password only the user name is stored, the password needs to be re-input every time you start the SWT client.

Hint: Check your Internet browser settings in case you are not aware of which proxy server to define within your environment.

clientconfig.xml File

There is an additional file "clientconfig.xml" that you may create inside the config directory. The content may look like this:

<?xml version="1.0" encoding="UTF-8"?> <clientconfig> <logfile directory="C:/Casabac/SWTBasedGUI/temp/"/> <title name="Casabac SWT Client" /> <titleicon url="browsericon.gif" /> <configicon url="browserconfig.gif" /> <updateserver url="http://www.casabacdemo.com/swtclient/windows" /> <favorites> <favorite name="Demo Workplace (localhost:8080)" url="casabac://localhost:8080/CasabacGUIServer/casabacdemos/mfdemo" /> <favorite name="Demo Workplace (www.casabacdemo.com)" url="casabac://www.casabacdemo.com/release35/casabacdemos/mfdemo" /> </favorites> </clientconfig>

With the file you can explicitly set up your environment:

• logfile (also relative settings are allowed) • title and icon of your SWT client • update server which is contacted • list of favorites

Page 8: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

8/14

Updating your Installation

Updating from Casabac's Update Server

Casabac is continuously improving the SWT client. Updates of the client do not require a full re-installation but can be made within the SWT client.

After updating you need to restart you SWT client.

Setting up on own Update Server

The set up of an own update server is very simple. The update server is a normal http-server providing a directory in which the /swtclient-directory of your Casabac SWT Client is kept. By providing an own update server within your intranet network you can…

• … provide the Casabac SWT Client version to your end user that is internally released on your side. Maybe you do not want to follow Casabac versioning in each step in order to keep a stable IT production environment on your clients.

• … centrally configure the configuration of the Casabac SWT Client. Maybe some configuration options (like proxy settings) should be configured centrally, not locally.

• …bring in own, new graphical controls that you add to the Casabac control set

Pleas contact Casabac for receiving more detailed information.

Directly checking for Update when starting Casabac SWT Client

You can automate the update procedure by embedding the client update function into the start up process of your Casabac Client. Have a look into the /bin directory of your installation: there is a certain startup program "start_withUpdateCheck" that will first check if a new version is available before starting the SWT Client.

Page 9: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

9/14

Usage

The "Casabac-URL"

Inside the Casabac SWT client you can view any page that is accessible within your network environment. I.e. the client is not bound to talk to a certain server only.

The address is input inside the Address field on top of the page. The format of the address is similar to an http address:

casabac://<server>:<port>/<webapp>/<project>/<layout>

Example:

casabac://localhost:8080/CasabacGUIServer/casabacdemos/mfdemo

Please note that the layout is defined without any extension. - The same page that is addressed in the SWT client is accessed inside a Internet Browser in the following way:

http://<server>:<port>/<webapp>/servlet/StartCasabacPage?PAGEURL?/<project>/<layout>.html

Page 10: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

10/14

If you now may ask: what is the difference between the two screen shots? Have a look onto the title section: the one screen shot shows the page being rendered inside the Casabac SWT Client and the other one shows the page being rendered inside the browser.

Secure Communication via HTTPS

Casabac by default uses the http protocol for communicating data between client and server. You can also use the https protocol - in this case you have to address your serve side application by specifying your URL in the following way:

casabac_ssl://<server>:<port>/<webapp>/<project>/<layout>

Communication through a Proxy

In many networks a proxy server is used for connecting to the Internet. All http/https communication that is addressing servers outside your own network is routed through the proxy server. In case you want to connect your Casabac SWT Client to a Casabac GUI Server running in the Internet you have to specify the proxy server to route your request.

The specification is done in the configuration popup of the Casabac SWT Client:

Page 11: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

11/14

Specify the proxy server and port. Dependent from your proxy set up you may also have to input a user and a password.

The proxy configuration is stored as "proxy.config" file inside the /config-directory of your Casabac SWT Client installation. In case you have to specify a user and password for your proxy only the user is stored. You need to re-input the password every time you start the Casabac SWT client.

In case you are not sure about your proxy configuration: check the proxy setting inside your Internet browser and transfer the proxy settings accordingly.

Caching

The SWT client caches all pages that are accessed within a certain usage session. The caching is done in a performance-optimized way: the cache stores the GUI-objects that are rendered for a certain page - and not just the XML layout definition that represents a page. This means when re-displaying a certain page then the page is "immediately" available.

There is a certain button for clearing this internal cache:

By pressing the reload button the cache is cleared and the page that is currently displayed is reloaded. Pay attention: information you might have input inside the page will get lost!

The cache is always cleared when restarting the SWT client.

Favorites

You can set up a list of favorites (view previous chapter about setting up clientconfig.xml). The favorites are accessible by clicking on a corresponding button:

Page 12: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

12/14

You can maintain your favorites configuration also by accessing the configuration popup of the SWT client.

No Access to Page?

When Casabac tries to render a page then the following screen might appear:

In this case:

• Check the proxy settings if accessing a page that is not in your "local neighbourhood" • Check if the page really exists. • Check (in case of developing pages) if the page was published within the Casabac tools. And not only

previewd inside the layout painter.

Skin Management

The Casabac SWT client uses Casabac skin definitions for defining the colouring and the font management of the client.

Selecting a Skin

By opening the configuration popup you can access the skin management:

Page 13: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

13/14

You can either select a default skin that comes with the Casabac SWT client. Or you can set up own skins. Once selecting a skin the skin will be applied to all new pages - pages that are already built up inside the client are not automatically updated. You can of course reload the pages by pressing the reload button of the Casabac SWT Client.

Creating an own Skin

By pressing "New" in the popup window you can define an own skin:

Just assign a name and the style parameters - all the rest is done automatically. The skin definition will be stored as ".info"-file inside the /config-directory of your installation.

Page 14: Entity Bean Component Contract - casabac.com · Casabac SWT Client Guide Casabac Technologies 4/14 Web Server Servlet Engine Application View („Adapters“) XML Layout http SWT

Casabac SWT Client Guide

CasabacTechnologies

CasabacTechnologies

14/14

Development Hints

There is no difference betweend developing "Casbaac WEB pages" and "Casabac SWT pages". One page serves both technologies (besides the restrictions mentioned in the first chapter).

Publishing still has to be done!

The Layout Painter of Casabac maintains an XML layout definition. This layout definition is NOT the one which is directly accessed by the SWT client. Reason: it may contain macro controls that need to be "multiplied out" first.

If maintaining a page with the name "demo.xml" inside the project "casabacyourfirstproject" then the following files will be written directly into the Casabac project directory:

<webapps-directory> casabacyourfirstproject accesspath appclasses ... ... xml demo.html <== generated HTML page demo_JLIBS.html <== generated reference to JS libraries demo_SWT.xml <== generated XML page accessed by SWT client

Only Casabac Pages are shown!

All pages that you access as Casabac page are accessible by the SWT client. Please pay attention: in the web environment you may have set up some launcher-pages in which you did build some HTML frameset around your Casabac pages.

Of course you can build multi frame pages with Casabac - internally also being rendered as frameset in HTML. These multi frame pages are of course supported by the SWT client. Change you "hand-made" HTML framesets to official Casabac pages as consequence.


Recommended