Sybase Business Intelligence Solutions - Database Management, Data Warehousing Software, Mobile Enterprise Applications and Messaging
Sybase Brand Color Bar

Search for    in all of
view all search results right arrow

Support > Technical Documents > Document Types > FAQ > PowerBuilder Web Form FAQ

PowerBuilder Web Form FAQ

This document should be seen as a summary of information about Questions that come up often when using PowerBuilder Web Form applications.
RSS Feed


The document contains information about 

   § Performance – What can be done to increase performance, eg. Configurations etc.
   § Security – Mostly this is an IIS part
   § General comments 








Q: Is there any configuration recommended for IIS especially to increase performance of PB Web Form Applications ?


- A good source for informations is the PB  HTML help documentation parts:
Deploying Applications and Components to .NET
Chapter 2 - Moving PowerBuilder Applications to the Web
Chapter 16 - Best Practices for .NET Projects

- A main rule of thumb is to avoid large resultsets, and not to script unnecessary events, especially for the DataWindow this would mean


• Use DataWindow pagination
   §         Better performance
• Don’t retrieve too many rows
   §         Better performance and scalability
• Handling client-side events
   §          Reduce postbacks


- Using connection pooling set via connection cache parameters in the connection string for speeding up db connections. See also connecting to your database documentation, depending on your database driver used.

For oracle,you can use DBParm CnnPool='yes' to use the oracle connection pool.
For ADO.NET/SNC/OLEDB,the connection pool is automatically used by these drivers.

- Since PB 11.2 Web Form applications can take advantage of AJAX (Asynchronous JavaScript and XML) update functionality. With ASP.NET AJAX, the page is updated by refreshing individual regions of the page asynchronously.

- IIS side : configuration:

in Machine.config
 • processModel
 – Autoconfig = false
 – maxWorkerThreads: 50/CPU
in Web.config
 • minFreeThreads
 – Formula: (maxWorkerThreads-n)*CPU
 – Decrease n if CPU is too busy during stress testing

maxWorkderThreads: the maximum amount of worker threads per CPU in the CLR thread pool. Default: 100
minFreeThreads: the minimum number of threads that must be free before a request for resources in this configuration scope can be serviced. Default: maxWorkerThreads-12

The files machine.config and web.config are located in:
machine.config – c:\<windows>\Microsoft.NET\Framework\<version>\config\machine.config
web.config – c:\Inetpub\wwwroot\<applicationdirectory>

To find out more exact numbers search the Microsoft website for performance tracing Tools for IIS.

Q: In order to enable ssl and use https for PB Web Forms in IIS, do we need to do something in PowerBuilder side ?
No, this is handled via IIS and for that the following links can be useful
HOW TO Set Up an HTTPS Service in IIS
HOW TO Enable SSL for All Customers Who Interact with Your Web Site in Internet Information Services

Q: In order to enhance our user interface in PB Web Applications, can we change the generated files, custom style sheets in IIS root directory ?
Well you can change them, but at your own risk.

General section Q+A:

Q:   One of my concerns is x-browser compatibility. There's nothing in the application as far as I can tell that requires Internet Explorer - but it only works on Internet Explorer. That the userbase only uses IE (at   the moment) is not really the point - it's about adhering (as much as possible) to W3C standards and reducing reliance on JS/CSS/whatever that only works in one environment. These days it is not quicker to develop an IE app than a x-browser one (especially given all the x-browser libraries around such as jQuery, prototype, Dojo, Mootools etc).
The server operations seem rather slow. I suggested this might be because the application is in debugging/logging mode, and wonder if there is something you can turn off to improve this?
A related point: menus seem to unnecessarily use JS callbacks – could they not have been hyperlinks? Not only is this more bulletproof, but this would reduce the delay between clicking and something happening.

A: We are evaluating Firefox and Safari for multi-browser support. Menus was implemented with third-party menu webcontrol that renders menu items as hyperlinks.

Q: The source code, presumably automatically generated by PB, is certainly very "interesting"! ... I notice these things:

HTML tags are closed with a trailing slash, which makes them look like  XHTML, but they often contain "pb" attributes that would choke a   W3C-compliant validator.
There is plenty of inline CSS that should be kept in an external CSS   file - this would reduce page weight and improve chances of
There's 546Kb of external JavaScript! added by PB - that's enormousas websites go! Can this be trimmed down at all - are all thesefunctions   required?
The JavaScript should be in one file if possible, which reduces browser processing and HTTP latency (there are 13 static files and 2 dynamically generated ones, the last of which may need to stay as they are)
File "dwcommon.js" is included twice - that should be an easy fix.  JavaScript should also be minified or packed - a quick test here  achieved a 70% saving by running it through packer (minify resulted in   errors - perhaps Sybase need to use jslint!)
There's a further 26Kb of page JavaScript that could be moved to a file.
If it sits in the page, it cannot take advantage of browser caching.  As a result of the Sybase "heavy" approach to generating code, the Asset Maintenance screen is 134Kb of HTML! I think this could be reduced by at least half - I'd target 60Kb.

Here's my JS breakdown which you may find useful:

scripts/PBCollections.js          3Kb
scripts/PBConst.js                2Kb
scripts/PBCommonUtil.js          18Kb
scripts/PBPDFPrinting.js          0Kb
scripts/PBWindow.js             101Kb
scripts/PBFile.js                 1Kb
scripts/PBEditMask.js            58Kb
scripts/PBDataWindow.js          47Kb
scripts/dwcommon.js             228Kb TWICE!
scripts/PBStatic.js               3Kb
scripts/PBPicture.js              3Kb
scripts/PBPictureListBox.js      11Kb
scripts/PBTextBox.js             16Kb
STATIC TOTAL                    493Kb

WebResource.axd 1 (dynamic)      21Kb
WebResource.axd 2 (dynamic)      32Kb
DYNAMIC TOTAL                    53Kb

OVERALL TOTAL                   546Kb
A: The page JavaScript comes from Third-party webcontrols, ASP.NET Ajax engine and dynamic runtime requirement. Packing the static JS files and internal CSS refinement will be considered.

Q: Just spotted also that the viewstate tag takes up 5.5Kb of HTML - if
This is intended to just be unique, I'd imagine 30 or so characters would be sufficient. Can the size of that be reduced?
A: The viewstate tag also comes form ASP.NET Ajax engine.

When pressing the 'Back Button' in the Browser with
PB 11 .NET Web Form 'Microsoft Internet Explorer' message comes up :

Are you sure want to navigate away from this page ?
If there is any unsaved data, it will be lost.

Is there anything we can offer from PowerBuilder side to the Customer for this ?

A user request for a PowerBuilder Web Forms application is submitted to an IIS Web server when the user types the application URL in a browser window. The Web server creates a new session for the first access to the PB Web Forms application and binds it to that user. This session processes the user request, manages the PowerBuilder Web Forms application runtime environment, makes required connections to the database, retrieves data in DataWindow objects, renders HTML responses, and keeps the session active in the server until user close the application or session timeout.

Upon receiving a response in the form of an HTML page, the user typically performs application tasks in the browser and resubmits (posts back) the page to the server. The server processes the submitted data by actions that can include updating the database or retrieving a modified set of data in the same session.
All the subsequent requests from the client are processed in the same session until the user closes the application. This means that there is a one-to-one mapping between the browser client and the session, and as many sessions are created as there are browser clients.

A PowerBuilder Web Forms application uses ASP.NET “in-proc” state management, and keeps the data for processing throughout the application session. Since PowerBuilder Web Forms applications are stateful, the server resources occupied by a session are not released until the session is terminated or a session timeout period is reached.

The problem is tied to the question how to fool the Browser not to go back to the previous visited website, ie trying to disable the back button. This is not 100% doable, but there are some methods out there that could also be applied to your problem:

Q: On a sheet is a datawindow with 100 rows with a vertical scroll bar.   25 rows display in the datawindow at a time.  In webforms only 20 rows display at a time, with blank space at the bottom of the datawindow. There is no scroll bar, but some > >> at the bottom to move through pages and it displays 1 0f 5. Again is this the way it must be or are there any options to get more rows displayed at a time?

A: Configure Deployment property PBDataWindowRowsPerPage ! (default is 20).

Q: We have an MDI application with multiple sheets.  In Windows open sheets were added to a menu, but in webforms each sheet has a tab.  Is this the way it has to be in webforms or are there any options?  Can it be added the menu as in windows and lose the tabs in webforms?

A: For performance consideration, showing MDI sheet as a tabpage is the only way in WebForms and listing MDI sheets opened in menu is a non-supported feature.

Q: Is there a way from a PowerBuilder WebForm application to tell IIS to delete the session directory once the user's session terminates?
A: PB WebForms runtime engine will delete the session directory when user's session terminate.






























Last Revised: Jan 26, 2009
Product: PowerBuilder
Technical Topics: Troubleshooting, Application Deployment, Application Development, Web Application Development
Business or Technical: Technical
Content Id: 1061922
Infotype: FAQ - Technical

© Copyright 2014, Sybase Inc. - v 7.6 Home / Contact Us / Help / Jobs / Legal / Privacy / Code of Ethics