|
Comments
|
Today's Top SOA Links
Features Getting from PowerBuilder to the Web (Revisited)
Getting from PowerBuilder to the Web (Revisited)
By: Bruce Armstrong
May. 1, 2000 12:00 AM
There seems to be a lot of "sound and fury" concerning the move from PowerBuilder to the Web. I'm convinced, however, that the majority of PowerBuilder developers don't know how to get there. Many of those who have taken that course have found it more difficult than they first anticipated. If you're in the latter boat, perhaps this article won't be of much interest to you - you've already earned your battle scars. For those of you who have yet to venture into the minefield, perhaps I can guide you along the way. I believe one of the problems PowerBuilder developers face when trying to move to the Web is the variety of options on how to get there. There's the DataWindow plug-in, the window plug-in and ActiveX, and the PowerBuilder Web Deployment Kit. Other options include generating HTML pages from PowerBuilder using the SaveAs() and GenerateHTMLForm() methods, accessing the DataWindow.Data.HTML or DataWindow.Data.HTMLTable properties, or using the Web.PB libraries that came with PB 6.x. The middle-tier PowerBuilder objects could be written as Distributed PowerBuilder applications accessed through Web.PB; they could be deployed directly into EAServer as CORBA objects or compiled into COM objects and deployed into a number of application servers (most likely MTS, but EAServer could be used here as well). If you've deployed your PowerBuilder object into EAServer, either as a COM or CORBA object, there are a number of options on how the dynamic page server "client" can access it. EAServer allows the developer to generate an ActiveX proxy, or C++ or Java stubs that can be used to access either type of object. Finally, while Sybase might prefer that you use PowerDynamo (included in EAServer) as the dynamic page server, once the objects are in an application server there are a number of dynamic page servers that might be considered. This isn't a complete list of all the possible options, but trying to consider all of them can certainly be exhausting!
Narrowing the Choices
In other cases, Sybase's continued support for those options is in question. The PowerBuilder 7.0 release notes indicated that a number of companion products that had been shipped with prior versions of PowerBuilder were now obsolete and would no longer be shipped with the product, among them the Web.PB class library. In addition, the release notes also indicated that Distributed PowerBuilder and Web.PB wouldn't be supported beyond PowerBuilder 7.0. While the SaveAs() method and the DataWindow.Data.HTMLTable property render fairly similar results, they're also comparable to what's returned from the DataWindow. Data.HTML property if the DataWindow's HTMLDW property is set to "No." As a result, these two options are pretty redundant and of the three, only the DataWindow.Data.HTML property should be considered further. The GenerateHTMLForm( ) method generates something similar to what the DataWindow.Data.HTML property generates when the DataWindow's HTMLDW property is set to "Yes." The primary difference is that the GenerateHTMLForm( ) method returns an argument for every row/column combination in the form, whereas the form generated through the DataWindow.Data.HTML property returns only two arguments, context and action, regardless of how many row/column combinations are contained in the form.
The GenerateHTMLForm( ) method would be useful for generating forms used to submit data to an application through CGI (which does expect a separate argument for each parameter passed). That's precisely how Web.PB worked. However, there are some distinct advantages to the two argument approach of the form generated with the DataWindow.Data.HTML property. The first is: there are native PowerBuilder functions added with PowerBuilder 7.0 that can take the context and action arguments and directly apply them back to a DataWindow. The second is more subtle and has to do with maintenance. Each time you add or remove a column with the GenerateHTMLForm( ) method, the function on the user object that received the data from the user has to be modified to add or remove an argument, and the code within the function has to be modified to add or remove references to that new data element. With the DataWindow.Data.HTML approach, the function method and in many cases the function itself can operate independently of the actual data context. As a result, much less work is required to accommodate changes in the data set being passed. That leaves us with two main choices:
Existing PowerBuilder Client/Server Applications
However, if the product is still relatively "immature" and is encountering frequent upgrades, or if the user base is expanding rapidly, which results in a continuing deployment cost, then moving the application to the Web makes more economic sense. In this case, the next thing we want to look at is how much of the application it makes sense to move to the Web. For example, at one of my client sites we looked at an application and determined that the majority of users required only read-only access to a number of reports. There were only a handful of users who actually needed access to the entire application. As a result, we moved the reports to the Web using the DataWindow.Data.HTML property to generate the reports as HTML. The native PB client portion of the application was modified so that it launched the browser to the Web page for those users who did require full access to the application. In another scenario, one of my clients was undergoing a consolidation of what used to be several different offices into a single office. One of those offices, with about 3,000 users, had been doing client/server work for some time and had all the deployment issues pretty well in hand. The other sites, with an additional 6,000 users, weren't anywhere near as far along with client/server or with resolving large deployment issues. The applications developed by the first office now needed to be deployed to an additional 6,000 users; however, the infrastructure that would make it a simple operation was not in place. Here's a great business case for deploying the applications over the intranet: the cost of the additional deployment could be largely avoided. The problem is that we're talking about 100 or more PowerBuilder applications that would all need some degree of rewrite in order to be deployed as "true" Web applications, and the cost of that rewrite would equal or exceed the cost savings from Web deployment. What seems to make more business sense here is the PowerBuilder Web Deployment Kit.
PowerBuilder Web Deployment Kit
One obvious limitation of this approach is it requires NT servers to run the application on (and many of them to support a large number of concurrent users). There are competing products in this marketspace that suffer from the same limitation. In addition, the client runtime is a native Windows application, which means it (currently) works only for Windows clients. Competing products use a Java application on the client, making them applicable on a broader range of client-operating systems. However, my own experience shows that those Java-based runtimes run significantly slower than the native Windows runtime used by the PBWDK. Therefore, if you're supporting only Windows clients and client performance is an issue, the PBWDK approach offers a significant advantage over the competitors. An often overlooked feature is that the PBWDK comes out of the box with support for load balancing between servers in a cluster through "PBWDK server farms." Finally, although application-use problems are sent to the server NT log, they can also be routed to an e-mail address so the administrator can resolve them (as needed) with a more real-time response time.
New PowerBuilder Applications
The choice of how to deploy those newly written or rewritten components (COM or CORBA) will depend a great deal on whose component server you'll end up using (something that may not be under your control). If you have the option to use EAServer, then do so. You can deploy the objects as either COM or CORBA, but CORBA is the more native method and allows for remote debugging. If you've been told another component server is already the corporate standard (e.g., Microsoft's MTS) and it supports COM, then COM will be your only option. Currently PowerBuilder supports the deployment of CORBA components only in EAServer. You may find yourself similarly constrained in the choice of a dynamic page server. For example, while you may be able to deploy your components into EAServer, and EAServer has PowerDynamo essentially "built in," you may find corporate standards dictate the use of a scripting language that requires a different server product (e.g., ASP or ColdFusion). In the case of one of my clients, ColdFusion is the de facto standard. The approach there is to code ColdFusion pages that call PowerBuilder components in EAServer. For a number of reasons I found we needed to use the ActiveX proxy that Sybase provides so ColdFusion could make COM object calls to the CORBA deployed PowerBuilder object. The reasons were twofold:
Conclusion
Reader Feedback: Page 1 of 1
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 |
|||||||||||||||||||||||||||