Comments
litl_phil wrote: While it's nice that Google and Acer share the vision of cloud-based computing, it's also worth noting that we at litl already have a webbook on the market (available at litl.com) that runs our own cloud-based OS. Unlike Chrome, litlOS is focused on creating a new and better web experience for the home, so we don't have the usual browser interface, we have our own innovative UI. In conjunction with easel mode (litl's inverted-V position) and our growing cohort of litl channels (special apps t...
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 . . .
Oracle seems to have divided the open source ranks over the MySQL delay it’s having closing its acquisition of Sun. Eben Moglin, the GPL’s most ardent defender and delineator, the lawyer who has worked hand in glove for years with the Free Software Foundation’s founder Richard Stallman...
Cloud computing is a game changer. The cloud is disrupting traditional software and hardware business models by disrupting how IT service gets delivered. Entrepreneurial opportunities abound as this classic disruptive technology begins to proliferate, so it is no surprise that SYS-CON'...
The irony is that Oracle has advanced MySQL, lost money in the process, and helped its competitors - all at the same time. When Oracle buys Sun and controls MySQL the gift (other than to Microsoft SQL Server) keeps on giving as the existential threat to RDBs is managed by Redwood Shore...
WSO2, the open source SOA company, today announced the launch of the WSO2 Cloud Platform. Available today, the new WSO2 Cloud Platform features a family of WSO2 Cloud Virtual Machines; WSO2 Cloud Connectors for enabling fast, secure cloud services; and the multi-tenant WSO2 Governance-...
Now, the open source Mozilla Thunderbird client software can be used with Open-Xchange collaboration software. The "Community OXtender for Thunderbird" software connector gives users full access to appointments and contacts stored in the Open-Xchange Server and enables them to use Thun...
Morph Labs, a leading provider of enterprise cloud computing technology, today announced an introductory trial of the Morph CloudServer, an open, standards-based server IT organizations can use to rapidly model and evaluate their cloud implementations. A miniature "Cloud Environment in...
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