Saturday, July 23, 2011

PB 101 - Starting from scratch

the last few posts, we talked about PB a lot. My last post on Hello World gave an introduction to PB as a programming language. Now, it's about time we introduce Powerbuilder, the programming environment itself and how to use it to successfully develop a simple application.

PB as a n-tier tool

PB started as a simple client/server tool. We and PB are now in n-tier world. This means an application could be divided into multi-tiers,  such as a client and one or more application servers connecting to the database in the backend. Even the client can be multiple, as in you may have a PB application client in the office, a web page accessing the same servers etc. Dividing the application logic into logical blocks of client and server(s) is called application partitioning. Java J2EE is a great multi-tier development environment in 3GL. PB has grown into a n-tier tool in the 4GL world.  Sybase has come up with an Application Server called EA Server (originally called Jaguar in version 7). You can now use it to build not only windows applications, but middle tier applications (Application Servers) and Web Applications as well. To handle this new world, PB has completely changed it's own GUI as of version 7.

PB IDE

When you open PB (versions > 8.x), the first thing you will see is the workspace. A workspace comprises of several "Targets" each target representing a piece (partition) of the application that can be independently deployed. A target can be for different type of applications - a windows client application, a Jaguar component, a DLL, a JSP program, a .Net program etc.

To the target, you add the PB libraries, by adding it to the library list. A library list is not only for housekeeping of libraries in a target, but at run-time this serves as the search path for the application to find objects.

And to the libraries, you add objects such as Applications, windows, datawindows etc. When you create a windows client application, an application object will be automatically added to the library just created. Below images show the various parts of a workspace. We will start looking into each of these in detail in the coming posts.

[gallery]

No comments :

Post a Comment

I will be happy to hear your comments or suggestions about this post or this site in general.