UltraLightClient Code Community
[ start | index | login ]
Overview > Good Practices

Good Practices

Belongs to following categories: Tips, ULC6.1, ULC6.2, UltraLightClient '08,

General

This section contains do's and don'ts and some general good practices that might be helpful to ULC application developers.

Call-back functions

Notification is always done through call-back functions, which are realized as listener interfaces. It is not possible to stop somewhere in your server-side code and wait until the user triggers something and to only then continue the server-side code on the next line. Your code got triggered as a reaction to a user request and we have to return a response to finish the round-trip. This is different from a pure Swing application.

Static variables

Never keep instances of ULC classes in static variables (ULCIcons neither!). They cannot be shared between different sessions.

ULCComponent instances

The same instance of a ULCComponent cannot be added to different panes at the same time. This behaviour is analogous to Swing. Since ULCIcon is not an instance of ULCComponent, for a given session, you can reuse an instance of ULCIcon within any number of panes.

Renderers

Currently, you cannot modify the text in a renderer of any widget. Therefore, make sure your widget's model returns the text to be displayed. As an alternative, provide a decorator model that converts your data to its UI representation.

Event handling

Do not use asynchronous event handling, except when you are aware of its consequences.

Thread-safety

Do not access ULC components except from within the ULC thread. Otherwise, the behaviour of your application is not specified.
Polling Timer

Serializable Session

Keep your session serializable in order to allow proper integration into Servlet and EJB application servers. This means that all objects having your IApplication instance as an ancestor should be serializable and any objects put in the ApplicationContext should be serializable as well (or need to be marked as transient using ApplicationContext.setAttribute(key, value, true)).
Serializable Check

Session Termination

Always terminate a session by calling ApplicationContext.terminate(). Never use System.exit().

Component Reuse

Keep the server and client memory-footprint low by reusing ULC components like ULCFrame, ULCWindow, etc. Hold these components in a pool and reconfigure them before display. Keep your pool in the ApplicationContext.

Cool GUIs

This section contains some ideas how you can make your Swing GUIs look more appealing.

ULCBoxPane

When using the ULCBoxPane, make sure that for each column, at least one component has its vertical constraint property set to EXPAND and for each row, at least one component has its horizontal constraint property set to EXPAND. Otherwise, your UI might like odd when extra space is available.

Icons

Use meaningful icons for buttons, toolbar entries, menus, windows, splash screens, etc.
>>IconExperience Homepage

Rollover Icons

Using rollover icons gives your toolbar buttons a nice touch.

Look&Feel

On MS Windows clients, use the JGoodies Look&Feel. On Mac OS X clients, use the system Look&Feel.
ULC Online Shop >>JGoodies Homepage

Splash Screen

Use a splash screen that is shown between connecting to ULC's server-side and until the libraries and UI descriptions are uploaded to the client.
Splash Screen

Writing Extensions

See the >>ULC Extension Guide for information about the use of the new Extension API.

Operation

This section contains some suggestions what to do before and during operation.

Simulate low bandwidth

Discover client-server traffic and communication bottlenecks already during development time. This can be achieved by launching ULC's DevelopmentRunner using the -useGui program parameter and changing the communication speed to a lower rate.

Check reachability through firewalls and proxies

Make sure your application can be accessed from remote clients. If it fails, this might be due to firewall or proxy settings (client-side or server-side). Use the Ping tool to narrow down the problem.
Ping

7 comments (by Mickey, Ngamz, Mozell Bubak, Venelisno) | post comment
labels
Category:ULC6.2
Category:Tips
Category:ULC6.1
Category:UltraLightClient '08
attachments
Created by etienne. Last edited by daniel, 4 years and 219 days ago. Viewed 16,353 times. #57
[diff] [history] [edit] [rdf]

Icon-Comment Mickey, one year and 337 days ago. Icon-Permalink

Touchdown! That's a really cool way of ptuting it!

Icon-Comment Ngamz, 129 days ago. Icon-Permalink

hey there and thank you for your info – I’ve certainly pieckd up anything new from right here. I did however expertise a few technical points using this site, since I experienced to reload the web site a lot of times previous to I could get it to load correctly. I had been wondering if your web host is OK? Not that I am complaining, but sluggish loading instances times will often affect your placement in google and could damage your quality score if advertising and marketing with Adwords. Anyway I’m adding this RSS to my e-mail and could look out for much more of your respective exciting content. Make sure you update this again very soon..

Icon-Comment Ngamz, 129 days ago. Icon-Permalink

hey there and thank you for your info – I’ve certainly pieckd up anything new from right here. I did however expertise a few technical points using this site, since I experienced to reload the web site a lot of times previous to I could get it to load correctly. I had been wondering if your web host is OK? Not that I am complaining, but sluggish loading instances times will often affect your placement in google and could damage your quality score if advertising and marketing with Adwords. Anyway I’m adding this RSS to my e-mail and could look out for much more of your respective exciting content. Make sure you update this again very soon..

Icon-Comment Ngamz, 129 days ago. Icon-Permalink

hey there and thank you for your info – I’ve certainly pieckd up anything new from right here. I did however expertise a few technical points using this site, since I experienced to reload the web site a lot of times previous to I could get it to load correctly. I had been wondering if your web host is OK? Not that I am complaining, but sluggish loading instances times will often affect your placement in google and could damage your quality score if advertising and marketing with Adwords. Anyway I’m adding this RSS to my e-mail and could look out for much more of your respective exciting content. Make sure you update this again very soon..

Icon-Comment Venelisno, 127 days ago. Icon-Permalink

hello there and thank you for your information e2€“ Ie2€™ve deifnitely picked up anything new from right here. I did however expertise several technical issues using this web site, as I experienced to reload the site many times previous to I could get it to load properly. I had been wondering if your hosting is OK? Not that I am complaining, but sluggish loading instances times will very frequently affect your placement in google and could damage your high-quality score if ads and marketing with Adwords. Well Ie2€™m adding this RSS to my email and could look out for much more of your respective intriguing content. Make sure you update this again soon..

Icon-Comment Venelisno, 127 days ago. Icon-Permalink

hello there and thank you for your information e2€“ Ie2€™ve deifnitely picked up anything new from right here. I did however expertise several technical issues using this web site, as I experienced to reload the site many times previous to I could get it to load properly. I had been wondering if your hosting is OK? Not that I am complaining, but sluggish loading instances times will very frequently affect your placement in google and could damage your high-quality score if ads and marketing with Adwords. Well Ie2€™m adding this RSS to my email and could look out for much more of your respective intriguing content. Make sure you update this again soon..

Icon-Comment Mozell Bubak, 48 days ago. Icon-Permalink

Excellent article. I definitely appreciate this website. Stick with it!
Name
Email:




news




RSS News Feed:

RSS Feed

snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt