Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News


2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
SYS-CON.TV
Top Links You Must Click On


Making Our Client/Server Application Look Like an HTML App
Avoiding redevelopment: Part 2

What made Web application development initially so successful was that Web applications looked pretty. They usually included graphics made by graphic design experts.

What makes them so unsuccessful nowadays is that they provide a very poor user interface. End users understood that being pretty isn't as important as being easy-to-use and they want the best of both worlds.

This is why we're moving back to client/server application development with .NET Winforms technology. We now say "rich client user interface" to be politically correct. But this is still client/server application development and we have the best client/server application development in PowerBuilder. We saw in Part One of this article that we don't have to install any software on the client computer to run a PowerBuilder application (except for the database driver that can be auto-deployed by your system manager or when installing the computer).

You can easily make your PowerBuilder application look great with little effort. Most of my users don't know they're running a client/server application from our intranet. The application looks like a Web application. It respects the intranet's graphical standards but implements complex GUI behaviors that would be difficult to implement with classic Web application development technologies.

PowerBuilder 11.5 introduced new Windows XP controls that can make applications look better. If you moved to PB 11.5 I recommend that you use those sexy new controls.

Here comes a migration process I've set up to help developers rapidly migrate their PowerBuilder apps to a nice-looking GUI that fits their intranet.

Migrating the Workspace
First we must migrate the application workspace. This means the navigation features of our application.

Most PowerBuilder applications use an MDI user interface. Users navigate using the frame's top menus and it opens sheet windows in the frame workspace.

When the application is launched, the MDI frame is empty, making it look real ugly (see Figure 1).

1.  Create the navigation frame set. Most PowerBuilder applications were created years ago and were made to fit an 800x600 SVGA screen. This is why they look so ugly today; most of them don't fit our screens. Now our screens are 1024x768 or higher. We can use a 224-pixel frame to implement a navigating feature, and a 168-pixel frame to implement a nice-looking header feature.

In this example, I'll implement the navigation feature as a datawindow with a nice background image. The header feature will also use a datawindow with a nice background image. I recommend that you use your intranet's graphics to do so.

Just add two datawindow controls to your MDI frame and set their dataobject.

2.  Create an external freeform datawindow (no matter the source columns). Include a nice horizontal background picture in the datawindow header. Put a text object on it and call it "t_title." We'll use it to display our application window's title. Add a datawindow control to your MDI frame window, set the dataobject with your newly created one, and call the control dw_upper_frame (see Figure 2).

3.  Create an external tabular datawindow with four columns: menu_name string(60), menu_text string(100), menu_level number, and selected number. Erase all created objects and add a nice vertical background picture on the datawindow. Specify that the picture is in the background band. Add a computed field that displays the menu_name columns and call it level_1. In its visible property, specify that it should appear only when the menu_level = 1. Do the same with a level 2 computed field. In its y conditional property specify that it must be four. Specify also that the level_2 text is underlined. Format both objects to make it look good. Add a datawindow control to your MDI frame window, set the dataobject with your newly created one, and callthe control dw_left_frame (see Figure 3).

4.  Implement a hyperlink link behavior for the left-side datawindow. This is easily done. Just add two functions to your MDI window. The first one returns a string to be imported in the left frame datawindow. It describes all the menu items found in a specified menu. The second one will return a pointer to a menu item from its name. It's used to trigger the clicked event of the menu item corresponding to the clicked row of the left frame datawindow.

In the open event of the window, I initialize the left frame datawindow by importing the navigation menus of my application.

I added a ue_mouse_move event that maps the pbm_mousemove event id. This will simulate the hyperlink graphical behaviour. See Listing 1 for the code.

5.  I implemented "HTML-like" behavior in mycustom frameset. All you have to do is resize all the datawindows and mdiclient area of the MDI windows in its resize event. Then change the window state of all the sheet windows in their open even: (this.windowstate = maximize!) so that your application looks more like a Web browser SDI application. See Listing 2.

6.  Make it look like a Web application. I modified all my windows and datawindows so their background fit the graphical theme I used to create the button face background windows. I used white background windows.

Modify all your column labels to look more colourful. I used a button face color with a 3D raised border, a nice blue for their background color, white for the font color, and 3D lowered for their border.

Modify all tabular and grid datawindows to make odd rows display in one color and even rows display in another. The background color is a conditional property:

if(mod(getrow(),2)=1,rgb(255,255,255),rgb(192,220,240))

If you're using PB11.5 you can modify all the date columns to display a Windows XP calendar to enter the date value.

Last but not least, add nice pictures and some helpful text if you have enough space and compile your application by specifying that you want to use the new visual style controls included in PowerBuilder (see Figure 4).

Conclusion
You don't need to move to Web technologies to deploy your client/server applications on your intranet.

In a few minutes, you can migrate your existing PowerBuilder client/server so it looks more like an intranet application. Here I just gave a first step for migrating such an application. You can set up many ".NET-like" or "Web-like" features so your application fits today's graphical standards more.

I personally add an IE ActiveX control to my MDI frame so it displays an HTML page when no sheet windows are opened. This gives my applications portal-like behavior that my users enjoy very much.

With the new .NET Winforms and Webforms PowerBuilder generation, we can forget the idea of redeveloping our client/server applications. PowerBuilder isn't dead, it's here to stay!

About Franck Fasolin
Franck Fasolin is in charge of IT application developments for UTAC. He has been using PowerBuilder since 1992 (PB1) and has created many third-party tools (such as NOVALYS products). He continues to develop tools such as HTMLBridge during his free time so that his developer team can have a high-level of productivity.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Please note that it should be pb 10.5, pb11 has not been released yet. :)


Your Feedback
than wrote: Please note that it should be pb 10.5, pb11 has not been released yet. :)
Enterprise Open Source Magazine Latest Stories . . .
Apache Deltacloud, the Red Hat-contributed ReSTful API that abstracts differences between clouds so services on any cloud can be managed – provided of course there’s a driver – has graduated from the Apache Foundation’s incubator and is now a full-fledged Top-Level Project (TLP). The...
With Cloud Expo 2012 New York (10th Cloud Expo) just four months away, what better time to start introducing you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have technical and st...
AMD said late Tuesday that its chief sales officer Emilio Ghilardi had left the company and that CEO and president Rory Read is going to do his job while a replacement is sought. AMD didn’t say why Ghilardi left but it’s assumed Read wants his own people. Read is relatively new to th...
During the lifespan of M3 (Monitis Monitor Manager) there has always been something lacking – timers. M3 execution procedure was outlined in this previous article. The execution mentioned in the latter was a one-time-execution, whereas server monitoring requires periodic invocati...
Red Hat is putting its bought-in Gluster scale-out NAS storage technology, acquired in October, on the Amazon cloud. It’s styled Red Hat Virtual Storage Appliance for Amazon Web Services and other clouds are supposed to follow in short order.
A new episode of the screencast series is now available at the OpenNebula YouTube Channel. This screencast demonstrates the new easily-customizable self-service portal for cloud consumers. Its aim is to offer a simplified access to shared infrastructure for non-IT end users. The scree...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON Featured Whitepapers
ADS BY GOOGLE