Building a distributed application
Where to go from here

I hope this article has helped you get to a point where you now have a good idea of what you are up against when building distributed PowerBuilder applications. This section provides a few pointers to what you can consider next as you start building real life distributed systems.

 

In real life...

...you need not take the 'build-the-monolith-and-split' route

I primarily adopted this approach to make you understand where each piece of the puzzle fits in. I wanted to provide a way by which you can 'map' 2-tiered techniques to their n-tiered counterparts. But as you become more comfortable with distributed objects, this approach can actually slow you down and may even cripple your creativity. As you gain confidence, you should start thinking purely in terms of distributed objects. You can develop the server and client components separately. However, you should still make sure that -

  • The application has been well partitioned
  • The server objects have been well designed
  • The server objects have been thoroughly tested

...you will need better error handling

Before you start any serious development, it is important to device a solid mechanism to communicate error from the server objects to the client. In our example application, we checked if the remote update succeeded; and if it did not we gave the user a ridiculously un-informative message. This callous disregard will probably not be acceptable when you are developing real life applications. Hence, you must give error handling adequate consideration. Here are a few ideas-

  1. Define a generic object that can hold error information like error ID, error type, error text, detailed description etc.
  2. Instantiate this object on the server. When an error condition occurs in a remote object's method, it populates this error object with the error information and passes back an error value. The client application can then query the remote error object to find out what the error was.
  3. You can make the error object flexible enough to be able to hold information for more than one error. This is useful in situations where more than one error conditions can occur and errors must be reported back to the client as a batch. For example,when the server object goes through multiple rows to perform pre-save validations. Rather than stopping when the first error is encountered, the server object goes through all the rows and populates the error object with a list of errors. Thus, all the data entry errors are reported to the user in one go. This will reduce the number of calls to the server object for validation.

...application partitioning won't be this easy

It's not an easy task to distinguish between presentation, business logic and persistence.  These tiers often seem to overlap and the decision is sometimes a judgement call. Often you will confront difficult design problems that can be solved in more ways than one. When the time comes to choose between approaches, choose an approach that causes the least amount of dependencies between tiers. Good application partitioning requires that you have excellent specifications(not just a rough idea) of the system that you want to build.

...the users won't give a damn about how you build your system

All they care about is how soon and how well they can get their work done. And that's the bottom line. Don't get carried away by the hype. Remember that your primary goal is deliver systems that really make the end user more productive.

 

 

Advanced Distributed PowerBuilder Techniques

Here are some advanced DPB techniques that you should definitely investigate when developing real life applications-

  • Shared Objects
  • Server Push and asynchronous processing
  • Transaction Pooling
  • Load balancing

You can find more information about these topics in PowerBuilder online manuals and books.

 

Consider HOW

After you have developed a few distributed applications you will realize that such applications are complex, difficult, and that it takes longer to develop such applications. You want a tool that will ease the development of building n-tiered applications. Something that will do the 'plumbing' for you. Something that will make you as productive as you were when developing 2-tiered applications. When you are looking for such a tool, consider HOW from Riverton. HOW combines object modeling and code generation with full round-trip engineering. I had looked at HOW when a learning edition used to ship with PowerBuilder 6.0. I believe it was HOW 1.2. I've been extremely critical of the product as an object modeling tool and have always advocated using Rational Rose. But HOW's greatest benefit is that it generates fantastic code for distributed PowerBuilder applications based on it's OpenFrame framework. Now HOW is in it's 2.0 version and I hear that it is an even better product with good UML support.

 

What's next with DPB 7.0? Get ready for Jaguar!

In this year's user conference Sybase announced it plans to take distributed PowerBuilder to the next level - tight integration with Jaguar CTS, Sybase's industrial strength application server. Here are some of the features to look out for-

  • Tight integration between PowerBuilder and Jaguar CTS
  • Support for native PowerBuilder NVOs in Jaguar CTS
  • Remote debugging of Jaguar components from PowerBuilder

Does this mean that all your efforts at learning DPB will go down the drain and you will have to start all over again? This is a good question. From what has been disclosed so far, the good news is that the migration to Jaguar will be seamless. PowerBuilder will connect to Jaguar CTS using a Jaguar driver in the connection object. There might be some semantic changes, but most of the concepts should remain intact. Personally, I believe that application servers, Jaguar or otherwise, will take center stage in developing the next generation of business applications. It's a good idea to get acquainted with this technology.

 

Distributed PowerBuilder Resources

Websites and articles

PowerObjects' Distributed PB Section
Data Compression over the wire

 

Forums and NewsGroups

powersoft.public.powerbuilder.distributed

 

Books

Distributed Application Development With PowerBuilder 6.0cover150.jpg (9440 bytes)

by Michael J. Barlotta
List Price: $44.95
Our Price: $35.96
You Save: $8.99 (20%)

 

Internet and Intranet Applications With Powerbuilder 6cover150.jpg (8947 bytes)

(Powerbuilder's Developer's Library Series)
by Tom Cervenka
List Price: $43.95
Our Price: $35.16
You Save: $8.79 (20%)
Manning Publications Company



Introduction

Strategy
Building the monolith
Building the PB Client
Building the DPB Server

Setting up the DPB Server
Deploying the PB Client

Points to Ponder
Where to go from here

 DownloadDownload the application

What's Next?

 

Related Links:

Follow Me PowerBuilder 6.0 to bundle HOW

Follow Me Sybase announces strategy and roadmap

Follow Me Moving Client/Server to the Web 1

Follow Me Moving Client/Server to the Web 2

Previous  Next Home
1