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


Prognos with DataWindow.NET 2.0 and PowerBuilder 11 Web Services
Calculate Your Scholarship Online

Prognos is an application used over the Internet to determine if it makes sense to apply for a scholarship. It's part of a program package used in a couple of cantons (the equivalent of a state in the U.S.) in Switzerland to manage applications for a scholarship.

The current version runs with DataWindow.NET 2.0 and uses PowerBuilder 11 Web Services. To keep the installation slim it uses no database; instead the data is stored in DataWindows or XML files. Prognos makes use of AJAX techniques and accesses .NET classes from PowerBuilder for XML handling. Since it's used in Switzerland (which has four official languages: German, French, Italian, and Romansh) it's multilingual.

Initial Version
We developed the first version of Prognos with DataWindow.NET 1.5 using ASP.NET with C#. Our partner company implemented the calculation for a possible scholarship in a PowerBuilder application. The algorithm was tested by the customer in this PowerBuilder application. After its approval, we had to convert the PowerBuilder calculation to C#, which was quite easy but prone to error due to formatting, data types, and so on.

Configuration
When DataWindow.NET 2.0 was available and PowerBuilder 11 went into beta, we decided to redesign the application, make use of the new PowerBuilder 11 features, and switch to ASP.NET 2.0.

The application consists of two parts (see Figure 1). The visual part is a standard ASP.NET 2.0 application using DataWindow.NET 2.0. The other part of the application consists of PowerBuilder 11 Web Services. The visual part talks to the Web Services either directly from the browser using AJAX or from the back-end for calculations.

You might ask why we didn't use a PowerBuilder 11 WebForm for the front-end. There are several considerations:
• We already had a running application with DataWindow.NET and quite a bit of JavaScript for handling logic and browser issues in the front-end that we could use.
• We have to support a lot of different browsers on Windows, Mac, and Linux, which includes quite some fine-tuning in the front-end. This is not supported in PowerBuilder 11.
• As soon as you include PowerScript in a client-side event its execution will cause a post back to the server.

Another point is the use of a Web Service instead of creating a .NET assembly and using the assembly in the application. Our decision was based on the following issues:
• With this design it's possible to make asynchronous calls from the browser to the back-end without writing additional code in C#.
• The Web Service can be consumed by other applications as well. The logic we used to calculate the possible scholarship was copied from another application upon approval. Instead of the copy we could write a Web Service upfront and have the algorithm approved by the customer through the Web Service
• Service Oriented Architecture (SOA) allowed the partitioning of the application and due to loose coupling you could change the calculation without touching the front-end.

Short Intro to AJAX
As you probably know PowerBuilder quite well and have some idea about DataWindow.NET I'll just give a short introduction to AJAX.

AJAX means Asynchronous JavaScript and XML. The idea behind it is that a browser can make calls to the server in the background without needing to leave or refresh the page. The technique has been around for quite some years but only got its catchy name in 2005.

Nowadays it makes use of the XMLHTTPRequest that's available natively in most browsers. However there are other techniques around like using an IFRAME that work in older browsers as well.

Making use of this technique creates Web-based applications that behave like traditional client/server apps. When driving it to the edge, you can create a Web application with one single page like a MDI Frame that never gets refreshed and where all the processing and work is done in this one page. I saw different frameworks to create this type of application at the AJAXWorld Conference East (a Sys-con conference) in New York this spring. This behavior is certainly a trend for upcoming Web applications.

Currently there are about 200 AJAX frameworks around. They range from simple JavaScript libraries to full-blown back-end/front-end solutions. As DataWindow.NET generates a lot of JavaScript already and we didn't need catchy screen effects (which wouldn't be too easy with DataWindow.NET) and a lot of other features we decided to write the asynchronous calls to the back-end ourselves.

The Front-End
Prognos consists of an intro page with some contact and use information. That's followed by a couple of pages for entering data and a final page where the possible scholarships and some additional information are shown. The whole look of the application can be configured quite easily. The data entry pages and the result pages are created with embedded DataWindows.

For many labels there's a help button available. By clicking on it you get context-specific help for this label. The help information is retrieved through a Web Service and displayed in a dynamically created DIV tag in the current browser window (see Figure 2). Of course we implemented a fallback too where an additional browser window opens showing the help (just in case there's no way to make an asynchronous call).

We also made use of AJAX in complex validations. Not for empty fields or simple values but for checking the possible ways the two parents of the applicant can live together and how they can take care of their child. As there are around 70 possibilities and we had the logic already implemented in the client/server management application in PowerBuilder, we decided to offer it as Web Service.

We also overwrote the default Alert function in JavaScript, which shows a gray pop-up window, with a nice error message displayed in a DIV tag like the help information.

In the ASP.NET part, when the page executes on the server, the text of the labels depends on the language the user has chosen. The translation is based on the name of the label and is done by the DataWindow.NET method Modify().

About Arthur Hefti
Arthur Hefti is CEO of CATsoft Development GmbH in Zurich. He has been working with PowerBuilder since version 3 and taught dozens of PowerBuilder training classes. He and his team create custom-made client/server and Web applications using XML, Web Services, and encryption.

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

Register | Sign-in

Reader Feedback: Page 1 of 1

I think this is a very trivial application and it should not be talked about in pbdj even if it is for the sake of showing a technical argument.

Seems more like an addvertisemt !! The whole app would take no longer than 3 days of work !! Writting the word Switzerland does not make it a high end contrinution :-)


Your Feedback
Alan wrote: I think this is a very trivial application and it should not be talked about in pbdj even if it is for the sake of showing a technical argument. Seems more like an addvertisemt !! The whole app would take no longer than 3 days of work !! Writting the word Switzerland does not make it a high end contrinution :-)
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