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


PowerBuilder Cover Story — The DataWindow in PowerBuilder 11 Web Form Targets
Transforming an existing PowerBuilder application into a Web application

PowerBuilder 11 introduces the WebForms target, which lets you transform an existing PowerBuilder application into a Web application with relative ease. While the deployed application will be remarkably faithful to the original client/server deployment in terms of application behavior, the degree of faithfulness is limited by the fact that your application is running as a Web application. The PowerBuilder component where this poses the greatest challenge is the DataWindow.

The aim of this article is to point out where the transformed application will differ in terms of latency, performance, and look and feel and what you can do to minimize these differences.

"New" Features
Other than the fact that the WebForms DataWindow runs in the browser, another source of differences in behavior with respect to the traditional client/server DataWindow is the fact that the underlying implementation is the Web DataWindow. We have narrowed this gap by implementing:

  • True Dropdown DataWindows
  • The Dropdown Calendar
  • The EditMask
  • The TreeView processing style
  • Browser locale
Pagination
In client/server applications, the number of rows appearing in a DataWindow is dependent on the size of the control. The FirstRowOnPage and LastRowOnPage properties give you the rows that are actually visible on the page. Scrolling or resizing the DataWindow changes what rows are visible but the DataWindow makes sure that rows are displayed in their entirety - either they're fully visible or they're not visible at all. The vertical scrollbar ranges all retrieved rows (see Figure 1).

In a WebForm application DataWindow, a "page" comprises the rows that happen to be on the browser at any given time. It's possible for the page to comprise all retrieved rows, but by default the page size is 20 rows. The page size serves as a way to tweak performance by controlling the amount of data received and rendered by the browser. In Figure 2 the 20 rows can be scrolled, but to view rows outside this batch of 20 the page navigation bar at the bottom of the DataWindow is needed.

In a WebForm it's possible to make some rows only partially visible through scrolling or resizing. (The DataWindow in a WebForm application doesn't support the FirstRowOnPage or LastRowOnPage properties.) This is in contrast to the DataWindow in a client/server application where the page by definition is all rows that are visible. Another difference is that the scrollbar doesn't range all retrieved rows, only the rows in the page.

The default number of rows per page is configurable through the Configuration tab in the project painter (see Figure 3).

However, this setting is application-wide. To set the number of rows per page for a given DataWindow, use the Rows Per Page property accessible through the Web Generation tab of the DataWindow property pages (see Figure 4).

Uses Script Callbacks
Pagination doesn't use postbacks - instead it uses script callbacks. This means that only the navigated DataWindow will have its contents updated - there's no overhead of re-rendering the entire page.

The Dropdown DataWindow
The default implementation of the DDDW in a WebForm application uses the HTML select tag. Not only does this introduce something different from the original client/server application, it also doesn't scale well because the exact same tag is repeated for every row in the DataWindow. Having more that one DDDW in the DataWindow compounds the problem.

An option exists to render a dropdown as a true DDDW instead of using the HTML select tag. The technique used to render the dropdown as a DDDW shares data across rows, making it more scaleable (see Figure 5). Setting PBDataWindowEnableDDDW to true in the Configuration tab in the project painter can turn on this option.

You can further optimize the rendering of your DDDWs by loading it only on-demand. Using this option, the DDDW isn't sent to the browser when the DataWindow is rendered; it's sent only when the dropdown is clicked. The DDDW is then sent to the browser using the Script Callback mechanism provided by ASP.NET. Setting PBDataWindowScriptCallbackDDDW to true in the Configuration tab in the project painter can turn this option on.

Sharing Read-only DataWindow Data Across Sessions
PowerBuilder applications deployed as WebForm applications allow the data of read-only DataWindows to be shared among different sessions. Other than sharing the data of the primary, delete and filter buffers, the data of DropDown DataWindows can also be shared.

Sharing the Data of Primary, Delete, and Filter Buffers
To avoid duplicating the same data of read-only DataWindows, it's possible to configure your application to share the data across sessions. The specification of which DataWindows to share is done with the PBCachedAndSharedDWs property. Set its value to a string of comma-delimited names of DataWindow objects to be shared.

Restrictions on DataWindows Shared Across Sessions
The following restrictions apply to DataWindow Controls that have a DataWindow object listed in the PBCachedAndSharedDWs entry.

  • Only a single invocation of Retrieve (which must be without parameters) is allowed.
  • No filtering, sorting, deletions, and insertions are allowed.
  • No modifications to the data are allowed.
  • No invocation of ShareData or ShareDataOff is allowed.
  • No invocation of Update is allowed.
When this form of sharing is used, the retrieval events aren't fired. This is because the Retrieve function only shares the data in the cache, no actual retrieval occurs.

Sharing the Data of DropDown DataWindows
It's also possible to share the data of DropDown DataWindows across sessions. The specification of which DataWindows to share is done with the PBCachedAndSharedDDDWs property. Set its value to a string of comma-delimited names of DataWindow objects to be shared if they're the underlying DataWindow of a Dropdown DataWindow column.

Restrictions on DataWindowChild Object References to DropDown DataWindows Shared Across Sessions
The following restrictions apply to DataWindowChild object references to Dropdown DataWindow columns that have a DataWindow object listed in the PBCachedAndSharedDDDWs entry.

  • No invocation of Retrieve is allowed.
  • No filtering, sorting, deletions, and insertions are allowed.
  • No modifications to the data are allowed.
  • No invocation of ShareData or ShareDataOff is allowed.
  • No invocation of Update is allowed.

About Frederick Koh
Frederick Koh is a Staff Engineer at Sybase, Inc., and has been a member of the PowerBuilder and DataWindow.NET development team since 2005. Frederick has over 14 years of IT industry experience.

About Li, Zhao
Li, Zhao is a senior engineer at Sybase, Inc., and has been a member of the PowerBuilder and DataWindow.NET development team since 2006. Li, Zhao has over 10 years of IT industry experience. Li, Zhao has written articles for various computer science conferences and journals.

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

Register | Sign-in

Reader Feedback: Page 1 of 1

Enterprise Open Source Magazine Latest Stories . . .
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...
C12G Labs has just announced an update release of OpenNebulaPro, the enterprise edition of the OpenNebula Toolkit. OpenNebula 3.2, released two weeks ago, brings important benefits to cloud providers with a new easily-customizable self-service portal for cloud consumers, and builders w...
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