Impact of “heavy” client-side logic

Most PowerBuilder applications are developed utilizing a 2-tier architecture. In other words, all the PowerScript and embedded SQLs are coded in the Visual objects, for example Window, CommandButton, etc. In contrast, a 3-tier architecture would encapsulate all non-visual logic in PowerBuilder NVOs (Non-Visual Objects). The reality is even if your application utilizes NVOs, chances are it is not a pure 3-tier application if PowerBuilder NVOs are not exclusively utilized to encapsulate all non-visual logic. But don't rush to partition your application just yet!

Most applications developed as a 2-tier architecture perform great in Appeon. In fact, there are many situations that a 2-tier application when deployed by Appeon will actually perform faster than a 3-tier application. The reason is if a PowerBuilder NVO is deployed to the middle-tier or application server, time must be spent to call the server and get the results back to the client. Of course, your non-visual logic running on an application server will run faster than at the Web browser. The key question is how much performance do you gain by running a particular block of code on the application server vs. how much performance do you lose due to the server calls.

As a rule of thumb, it is recommended to partition your non-visual logic to the middle-tier only when the particular block of code runs unacceptably slow at the Web browser. In such cases, it is likely that the application performance will benefit, and as such, it is worthwhile to invest the time to partition such logic. However, if the non-visual logic is only slightly sluggish, it may be possible to optimize the code without having to partition it to the application server.