|
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Features Deploying PowerBuilder Applications as ASP.NET WebForm Applications
Improving developer productivity
By: Abdul Azeez
Sep. 12, 2008 08:00 PM
PowerBuilder 11.0 supports deploying existing PowerBuilder client/server business applications as an ASP.NET WebForm application. This greatly improves developer productivity without having to learn a new development language and preserves PowerBuilder development skills. Although the deployed WebForm application retains all the functionality of its original client/server application, due to the technological shift in the running environment from a two-tier client/server environment to a three-tier Web paradigm, some features of PowerScript will not be supported in a Web environment. And due to language restrictions between .NET and PowerScript, you may need to rework/refactor your code to make it suitable for .NET development.
Language Restrictions It's better to know these language differences in advance and correct them in the PB code prior to deployment. The following are some of the syntax and semantic issues between PowerScript and C# languages. Syntax Issues If withdraw_amount > 2000 then Else In this PowerScript code, whenever it encounters the goto statement, it transfers control back to the label "surcharge" even though the label is declared inside the if statement. The PowerScript compiler successfully compiles this piece of code and executes it. However, if you try to deploy this application as an ASP.NET WebForm, this code conceptually gets translated into the following C# code: if (withdraw_amount > 2000) } In C# the GoTo statement is not allowed to jump to a label to a different scope and the translated code results in a compilation error. Hence when you intend to deploy a PB application to an ASP.NET WebForm application, avoid using a GoTo statement in the PowerScript code. It is recommended that you totally avoid GoTo statements even if the applications are not compiled as ASP.NET Web applications. Local functions (Window or User Object functions) are an alternative to labels and instead of using GoTo, you can call these functions. Reader Feedback: Page 1 of 1
Latest Cloud Developer Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week
Breaking Cloud Computing News
|
|||||||||||||||||||||||||||||||||||||||||||||||||