Showing posts with label Introduction to Powerbuilder. Show all posts
Showing posts with label Introduction to Powerbuilder. Show all posts

Monday, April 16, 2012

Object Oriented Concepts - An Introduction

Work has been busy for a while. I am finally returning to my blog on PB.
We started looking at PB program as a collection of Objects in the last post. Yes, PB is now an object oriented language, but it sure did not start that way. Sure it has some objects like windows, buttons etc, but does that make it an Object oriented environment automatically? This topic itself is so huge, So, I decided to touch on these first before continuing further with PB.

What  is an Object?

The simplest definition of an object is a thing, a noun or an entity. In the programming world, this has come to mean a self contained programming unit. By hooking different "objects" you can make a program. Objects themselves are not new. Remember the old C programs? When you compile individual C files in a program, they were converted to "object" file. Though it doesn't mean the same, it stands for a program unit. By linking different "object" files, we arrived at the final program (Executable). Then there were modules. Even though there is a subtle difference between a module and an object, in theory they are the building blocks of a program. Remember, COM (Microsoft .Net evolved out of this eventually)? The idea was to have bunch of OLE (eventually called Active-X) that would be glued together in a program. In fact, Visual Basic was invented for such a purpose originally. We will explore more about objects in the coming posts. But, while you are at it, think about another term frequently used in OO: a Class. Several authors allude this to a blueprint, cookie cutter, a mold for creating objects.

What is Object Orientation (OO)?
An object has several other characteristics that makes an object in an Object-oriented language different from earlier definitions of objects. If you Google for the word “Object oriented”, you will find a million links. If you sift through all those, you will come to the following conclusion:
Object Oriented is a new paradigm (though it's been around for 30+ years now) and it is difficult to learn and/or master. Yet you see, every programming language (PHP, Coldfusion, PERL, PYTHON, you name it) out there is joining the OO way. So, if you are going this route, you have to get the concepts right.

Object oriented is many different things to many different people. Even the languages that claim to support OO now, are not fully OO themselves. So, let us discuss fundamental definition of being object oriented. In later posts, we will continue to drill down this topic.
Several books talk about Object Oriented (OO) approach to contain the following four basic characteristics

  • Abstraction

  • Encapsulation

  • Inheritance

  • Polymorphism


We will analyze each of these below.

Abstraction
Almost anything we do with computer software is an abstraction of the real world. An ATM machine is essentially modeled after a real-life teller it came to replace. Abstraction itself is not OO. Cobol and Fortran programs abstracted business models and mathematical models respectively for about 50 years now. But the abstraction in OO, is much closer to the real life. After all, real life is full of objects: people, earth, machines, food, microwaves, books, TV, radio etc.

In OO, we try to call a Radio a radio and define it's properties and operations to emulate real life one (actually a radioObject is more appropriate name for it; of course, it's a software object not a real one, but you could make it to play music!). A software abstraction is context based. For e.g., when we abstract customers, shop owners and employers we are abstracting people. In such an abstraction, we definitely would like to know their names, but we don't need know their race, gender, height, weight etc. Where as, if the person abstracted is a patient, suddenly some of these characteristics matter!

A speedometer in a car is a good example for abstraction. We see the needle to get an idea as to how “fast” or slow the car is going. Abstraction in this case varies between MPH in the US to Kilometers in some other countries. A thermometer, similarly abstracts how "hot" outside temperature is.

Encapsulation
This is the next characteristic of an OO programming environment. Encapsulation, simply means hiding private data and showing proper (public) interface. We don't want to see inner-workings of a microwave or a car when we are using it to heat our pizza or driving to get one. When we shop for a car, we are happy if we find a steering wheel, something that looks like gear, brakes and of course, those 4 wheels that the car needs to “run”. Of course, some of us would like little more glossy finish, but none of these involve putting engines right next to you on the front seat! And of course, the way those engines come pretty well sealed these days, they are very well encapsulated themselves. There is one “interface” you see, the oil cap that lets you fill oil. The content, level of oil, is not immediately visible. If you open and use a dip stick, you can find out the actual level of oil!

Speedometer mentioned above is also a good example of encapsulation. To “see” speed one doesn't need to look at rotating gears, tires, road etc. They just look at the interface called “Speedometer”.

Encapsulation itself is not a new concept. It's been around since the early days of programming. In Pascal, you could achieve certain amount of encapsulation by proper function design. C of course, offered modular programming (file level – see post “Modular progamming in C” for more information).

Inheritance

The most common meaning for this English word is the property (read “Wealth”) inherited from ancestors when they pass on. And it's not just property that can be inherited. We also talk about some characteristics passed on (genetically). It's this latter mean that's adapted in the computer lingo. Inheritance in OO allows an object to acquire properties and behavior of some other. So, we talk of a Dog object inheriting properties of an animal object (actually class, we will discuss these shortly).

Of course, in real life we don't say Dog inherited from Animal. We say, Dog “Is A” animal. We also say Car “has a” engine. And we have access (reference) to computers in the hotel. These are different types of object relationships in OO. An “Is A” is considered to be inheritance. A “Has A” relationship is called composition. And a reference to an object out there, is an Association.

Of these, Composition and Association were possible is non-OO languages as well. Inheritance itself could be indirectly implemented through these 2. For e.g., in C, using plain structures and function pointers we could mimic any of the above relationships.

Polymorphism

This came from a Greek word. Poly means many, morph – form. For e.g., different forms of shapes. Circle, Square, Rectangle and Triangle are all shapes. Of these, Rectangle and Square are similar, in that they both have sides. Circles and Ovals could be similar.

Now, shape is a noun, an object. How about a verb – an action or behavior? Let's take the word “Play”. Try using this English word in sentences and you will see how many different objects can play in how many different ways. Like playing a piano, like playing Football, Playing cards, playing a part in a play, Play with a child, Playing with life! This is truly a polymorphic word. How about the word, “Talk”? “Talk” to a dog, barks, cat meows and the cow moos, not exactly talk in the human sense, but in the sense of “open your mouth and make a sound” it's the same operation, with various forms!

In this post, we tried to explain what OO is and try to understand the terminologies typically related to the OO. This wasn't totally a technical discussion. Now that we got some definitions out of the way, let's get down to business with the topic of Object Oriented. Try to remember some of the examples when we get to our next post.

Below picture summarizes all these terminology as they relate to a Microwave.


Sunday, July 24, 2011

PB 101 - Contd... Project Workspace

As mentioned earlier, PB is geared up for developing applications for various platforms. We saw how the IDE is built around the Project Workspace, and the tools it provides to access every in the workspace. First let's define the various parts of a Powerbuilder based software development project.

PB 101 - Contd... Powerbuilder IDE

Powerbuilder IDE

PB IDE, just like any other windows application is an MDI application. It is made up of several windows and menus and toolbars. When you open the IDE, it opens up with no Workspace. You need to create/open a Workspace (using options in File menu) to work on a specific project. A  Workspace wraps around one or more Targets which in turn includes one or more Libraries. The libraries contain the objects. The objects themselves have properties and methods like in any Object oriented environment. The objects also contain events as Powerbuilder is an event driven programming environment.

Navigation through the project hierarchy is available through a tool called System Tree. The IDE also contains a full menu toolbar called Powerbar that lets you perform several tasks including creating various components in the project hierarchy. The IDE is made up of several individual tools and wizards, which are called Painters. There is a painter for each type of object and each task in PB.

System Tree & Powerbar

The System Tree is a project explorer. This let's you see the project hierarchy mentioned above, in a tree like fashion. The TreeView object fits this hierarchical structure perfectly. The topmost parent in the tree is the Project Workspace. You can drill down targets and libraries to object properties and methods here. You can expand or collapse at any level in the tree. You can open any existing objects in the System Tree (by double-clicking on them).

Powerbar is the Powerbuilder menu Toolbar containing buttons for important menu items.  You can create new objects by Clicking on the "New" button in Powerbar (or File->New option in the menu).

Clicking on New opens up a pop-up window that has several options (buttons) to open various wizards and tools in PB. You can create workspace, target, PB objects including windows, menus, datawindows from here. You can also open up several tools and wizards, such as Library explorer, Database wizard, File Editor, PB Profiler etc, by creating "New" instances of these. Every such wizard or tool in PB is called a Painter.

[caption id="attachment_139" align="aligncenter" width="1024" caption="Powerbuilder System Tree and Powerbar"][/caption]

Fig 1 - Powerbuilder System Tree & Powerbar
PB New Options - Here showing several types of PB Objects

Fig 2- New Option in Powerbar leads to "New" options Pop-up

Painters

As mentioned above Powerbuilder IDE is essentially made of several Painters. Each specific component type has it's own Painter (Object Editor) and several tasks have associated Painters (Tools or Wizards). So you will see Window Painter, Datawindow Painter, Database Painter, Library Painter etc. Each Painter is self-contained unit and has it's own menu (and toolbar), a control(s) list and properties sheet. As you can see, Powerbuilder IDE itself is designed in an object oriented way.

You open the individual component painters when you open an object in System Tree View or when Click on New on he menu bar.  Several task and tool painters can be opened in Powerbar.

Here are some of the Painters are available in PB:

  • Application Painter

  • Window Painter

  • Menu Painter

  • DataWindow Painter

  • Function Painter

  • User Object Painter

  • Database Painter

  • Library Painter

  • Project Painter (this is used to build applications - sort of compiler/linker options window; more about this later).


PB IDE - Other parts

Apart from these, the IDE UI has the following components:

An Output (child) Window which shows all the messages from the PB IDE environment, such as compiler outout, error messages etc.

A To-Do List Popup - Here you can enter a "todo" list. You can enter your own laundry list of things to be done in a project. Some of the wizards in PB also create To-Do entries automatically.

PB IDE includes a Browser window, which lists out all the objects in the project. This tool is very useful in locating objects in a large project with lot of libraries. As of version 10.5, it does not have a search capability yet, but you can navigate through libraries and types of objects to easily locate an object. Once found, you can "Edit" the object.

There are also several tools and wizards available in PB. Application Profiler, Debug Window, Database Painter, EA Server Profile etc. Each of these have special Toolbars attached to them.

See below link for more information (The link is for PB 11.0, but still applicable to any version > 8.x in general).

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc37772_1100/html/pbgs/CBBCHDJG.htm

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]

Thursday, November 11, 2010

More about PB from my Hello World post

In my earlier post, I wrote a very simple program in Powerbuilder (PB) to print/show Hello World. I tried to compare with many other programming languages there. In that post, there were several concepts introduced. But, being a simple post, I ignored most of the details. We will try to analyze the details here and this way explain what it means to program in PB.

Interpreted or Compiled


From that list of examples I had, there is one thing that stands out. PB looks a lot more like C/C++/Java, at least in commenting style. But, then we see it has the simplicity of Basic program that it's usually thought of as originating from. It also has a lot of similarities with Visual Basic (For that matter with other flavors of BASIC such Power basic as well). PB is actually the tool and it uses proprietary language called PowerScript. Like BASIC this is an interpreted language, but not interactive (In a BASIC interpreter, results were displayed as soon as you type a command (or a command block) and press ENTER.). In PB, though the  code is interpreted, it's not the original code that you typed in, but an intermediate code it generated when you compiled (generated) or ran. More on this below.

 

Object Orientedness:


PB is at the very least, an Object based language. Windows environment contains windows with several controls or widgets on each window. The various controls and windows (objects) talk to each other through events and methods (functions). Now, this itself doesn't make it object oriented, but definitely object based. In PB (as in VB) an application is made up of several objects such as Application, Windows, Buttons, Text Boxes (and Data windows - more on this later). You cannot have a program without an application and you cannot communicate with the users without windows or buttons. So essentially when we build a PB application, we are reusing these "objects" as templates to make our own objects. Thus, by the very nature PB is Object based.

Real Object orientation came to it in later versions. A rudimentary "user object " was introduced as early as ver 3.0 and by Ver 5.0 Pb introduced Object-oriented concepts such as function overloading. Many of us still write object based code in PB, but there have been some movements to make it more and more object oriented. There were several frameworks developed for PBincluding PFC, which is still strong in the Client/Server world. A more sophisticated EAF was developed for PB in an enterprise n-tier world.  A lot more companies seem to be dusting off their old PB programs and try to upgrade latest versions of PB. So, as a developer you will see both object-based and object-oriented code out there. This is different from Java perspective which is Object Oriented to the core, but not unlike C++ where people continue(d) to code C style programs.

User Interface (IDE)


When we did the hello world, we mentioned what we coded and what we saw. But, we did not mention how or where we coded it. A Java program can be coded in a simple text editor like Notepad or more sophisticated Eclipse or Netbeans. It can then compiled and executed in a DOS (or unix/linux) command line. Or like in Eclipse, all these functionality can be done in one tool. Such tools are called IDE - Integrated Development Environment. PB has been IDE from the beginning. In fact, you cannot code or compile PB outside Powerbuilder (not exactly true, particularly the compiling part). Unlike other tools, PB is a more complete IDE and allows you, as a developer, to debug and run from within itself. Also, the code that you put into PB is actually stored in files with the extension .pbl in proprietary format. More on these later.

[caption id="attachment_95" align="alignnone" width="300" caption="Powerbuilder Workspace"]PB Workspace[/caption]

Types of Applications built in PB


What is not revealed in the Hello World program is what kind of programs can be written in PB. Apart from the windows programs, PB can also be a great Client/Server tool. In fact, in corporate environments it is mostly used as a Database programming tool. It's strength lies wholly on the simplicity of database connectivity with the use of Datawindows.  With the advent of EA Server, PB can be a great n-tier development tool as well, like Java J2EE. (More on these later).

PB portability


As mentioned above, PB runs in an interpreted mode. When you compile a PB program, it gets compiled into p-code, a proprietary bytecode. In this regard PB is very much like Java. Just like Java, there are options to compile into native machine code, but typically p-code is preferred. Thus, to run a PB application, you need to install a PB runtime. This is very much like a Java VM. (In fact in EA Server terminology, this is called PB VM). So, theoretically, PB application can be ported and run anywhere PB runtime was available. There were Unix versions of PB available. But, you need a specific version of PB runtime to run a program generated with a specific version of PB. Here it is different from Java, where future runtimes are guaranteed to be backward compatible and thus can run older versions of Java classes.This makes PB less portable. Also, by the windowing nature of it, it naturally fits into Microsoft Windows. The direction Sybase is taking, seems to confirms this. PB12 is, apart from being a windows application builder, also an IDE for .Net plaform.

Starting from my next post, I will go into more details about using the product.

History of PB

Powerbuilder grew from the modest beginnings in the early 80's to where it is now. Those of us who have worked with it for a long time know that it's come a long way as a product. But how many of know it's real history (sort of like the history PC programming world itself)? It was originally conceived and produced by a company called Powersoft. Now it is owned by Sybase. We all knew that it was "bought out" by Sybase in the 90's and what it did to the product. But how many of us know the background of it? Both Powersoft, the company, and Powerbuilder, the product had their fair share of competitions from big giants, threat of hostile takeovers. After initial days of glory, it did lie in the dumps for some time and several wrote death sentence for it. Yet, time and again it came back up again and with PB 12 seems to have gained a new life. I can write about all those here. But, I won't try to re-invent the wheel as there have been several nice posts about the subject. I am listing a few, that I liked, here:

An Article by Chris Pollach

 

History of Powerbuilder from the maker of PBLPeeper

A nice blog about Powerbuilder and other tools

The displaced guy or your personal IT guy on the web!

Hello World!

This is my real first post in Powerbuilder. (I wrote a lot about PB and my association with it before). Like it is customary for any tutorial or book on programming to start with a program to print Hello World, I will try to do the same in Powerbuilder.

Before I jump into it, let's some simple ones: (I am only including the actual lines and not full program code here,  please refer to the really interesting site that prints hello world in various languages - here)

In a Pascal program, you can just say,

[sourcecode language="delphi"]
{Hello World in Pascal}
writeln("Hello world");
[/sourcecode]

(In Delphi which is based on Pascal, it is written as,

[sourcecode language="delphi"]
{Hello World in Delphi}
WriteLn('Hello World');
[/sourcecode]

In C, you can do

[sourcecode language="cpp"]
/*Hello World in C*/
puts("Hello World!");
[/sourcecode]

In Basic Language, (which contributed to  Powerbuilder's Powerscript) you can do

[sourcecode language="vb"]
10 REM Hello World in BASIC
20 PRINT "Hello World!"
[/sourcecode]

Coming to the more Object oriented world,

In C++ you can write,

[sourcecode language="cpp"]
/*Hello World in C++*/
cout << "Hello World!" << endl;
[/sourcecode]

And in Java, this would be,

[sourcecode language="java"]
/*Hello World in Java*/
System.out.println("Hello World!");
[/sourcecode]

Well, almost of all of them print to a console - a text based screen, like in DOS, Unix, Linux. The same task of showing hello world to the user takes a bit more, when it comes to a windowing world (like MS windows, X-windows, Apple mac interface). The presentation becomes little more important. After all, in such an operating environment, everything is shown inside a window, so our program needs to write into one such too! In a windowing environment, simplest way to present a text is using some type of message box, which is a small window showing the text (and may be some question buttons).  Luckily windows API offers functions to create such a messagebox with ease. Let's see how we could do the same in Java, for a windowing environment:

[sourcecode language="java"]
/*Hello World in Java -windowing version*/
javax.swing.JOptionPane.showMessageDialog(null,"Hello world!");
[/sourcecode]

Swing is a package available in Java to create an application for a windowing environment.
Coming back to what we started with, to print Hello World in Powerbuilder, we could do something like above using a messagebox. Luckily PB offers a function for that - MessageBox. So, in the simplest form, we will do,

[sourcecode language="cpp"]
/*Hello World in Powerbuilder-Simple*/
MessageBox("Hi from Powerbuilder", "Hello World!")
[/sourcecode]

We are almost done. Like almost all of the examples above (except BASIC which was interpreted, you just type that one line and it did print it), we need to wrap this line in a program. In the java example above,
we would do,

[sourcecode language="java"]
// Hello World in Java using Swing GUI
class HelloWorldSwing {
static public void main(String args[]) {
javax.swing.JOptionPane.showMessageDialog(null,"Hello world!");
}
}
[/sourcecode]

Notice the main function. That is the entry point in various languages like C, C++, Java. This is the function that is called when the program is executed.

Powerbuilder is built slightly differently. It does have an entry point function - actually an event. This will be the open even of an Application object. Just like the class with main function becomes entry point object in Java, an Application object is the entry point object in Powerbuilder. So in it's simplest form, we simply add the messagebox function in the application open event and just run the application. When run, this is what you will see,





Well, that's for showing the simplest way. But a typical PB application is built not just with application object, but with one or more windows as well. We will see about that in a later post.

Saturday, September 18, 2010

What is Powerbuilder?

Powerbuilder is an IDE, an integrated Development Environment, a tool where a programmer do everything within it, including design and develop screens/reports, write command line programs, compile, deploy applications all from within Powerbuilder.

This is in contrast to programming in languages like C or Pascal, where you use a text editor to edit, a compiler to compile and copy files to deploy.

IDE's and case tools were popular in early 90's. There were several such tools that promised "less or no coding" and yet develop and deploy enterprise applications. Powerbuilder was one of many tools available. I remember reviewing PB, Visual Basic (VB), Gupta SQL windows and Oracle CDE (successor to SQL forms in windows). Of all these, I took to PB easily, I liked SQL windows better (I remember it was more colorful and windowy!). Oracle CDE (forms 4.0) didn't measure up. And Visual Basic needed more programming.  I remember the days when VB and PB were constantly compared and contrasted. Each had it's own strength but PB won in some of the corporate contracts. The datawindow, and the quick reporting capability were probably some of the secret.

Contrary to popular belief, it's not a tool for non-programmers - managers, Business Analysts and the like. Yes, several tried, but any serious screens in PB always needed programming. To this day, I hear people brushing it as a child's play in the world of complex Java and .Net applications. But PB is used, surprisingly, in building big corporate applications, even today. And such serious development activities always involve programming. Programming in a language called Powerscript. It's basic with a twist. Long before Java became so popular, it took some tenets of C++ and became Object oriented. (OO pundits may not agree and call it more Object based than object oriented, but that's a topic for another post!). Oh, about PB for managers, Sybase made another tool called Info-maker, a trimmed down version of PB, which didn't require programming (or lacking programming, depending on who looks at it).

PB is definitely easier to use to build screens and rudimentary database applications. I feel, the user interface is definitely easier to use than that of VB, but then I've been using it for many years. The strength of Powerbuilder, as against other tools was and has been the datawindows, a compiled widget readily available to include in any windows. Strictly speaking, a datawindow is a window that may have many controls on it, but the difference is that a datawindow is managed by PB routines as against windows API. For this reason, Sybase always suggests to combine many different controls in a window into a single datawindow, wherever possible, for performance.

A datawindow widget is not much unlike ADO or DAO objects in VB. The strength of the datawindow is that it's built around SQL (what's called a datasource - there are other data sources, more later) and by keeping the SQL in PB itself and database neutral, we could make the same datawindow work with many different databases, like Oracle, Sybase, Informix etc.

PB has changed a lot over the years. People who have seen it in the 90's will definitely realize the transformation. The IDE itself started packing more in version 7.0. Now, in version 10.x and beyond, it's turned into a true development tool. (Rumor has it that PB 12.0 could actually be used as an IDE for .Net development!). The question still remains, in the world of Eclipse and Netbeans, Java and .net, why PB? That too enterprise edition costs a bundle when Java is all free. This blogger aims to ask some of those questions and try to find answers live on this blog.

Currently I am working at the City of LA where we use Powerbuilder heavily in a clustered EA Server environment. We even have extensions on the web using JSP and Coldfusion. The software is a tax software used by thousands of businesses in and around LA. This is no child's play. EA Server is to Powerbuilder like weblogic to Java. It's an application container that can run PB objects and Java objects alike and it uses CORBA (how much it reminds me of Forte UDS!).

From the simple client/server tool, PB has reinvented itself several times to become a n-tier platform here. Earlier PB turned out a non-visual object (NVO) that proved vital to this n-tier platform. An utterly client widget, datawindow, gave birth to (non-visual) datastores that eventually helped them to be n-tier objects as well.

But then again, I feel, Sybase lost several opportunities to build it up and market it as the greatest tool on earth (I don't mean exactly that, but at least the ads should say it, right?).  They are constantly toying with the ideas and drop them like a fly. Most recently, the EA framework, built by Cynergy Systems for Sybase, that can be used to build Enterprise applications in PB/EA Server environment has been discontinued. EA Server itself is dangling. You hear about PBNI, PB ORCA, I've used them too, but their future is always questionable. In the world, where every version of a software gets better with time, some of these tools inside PB appear and disappear. With PB becoming an IDE to .net, their neutrality to languages may be disappearing. And finally, with SAP buying Sybase recently, the whole existence of PB as a tool may be in jeopardy. (You think this is not possible, think what happened to Forte UDS. Sun bought this company only to kill the software, as it was a competition to Java J2EE at the time. How did they do it? They created a lousy tool called Forte for Java to erase the name Forte and eventually pulled the plug on many websites that talked about the old Forte).

We will go on a journey here in  this blog, where I will not only share my experiences with the tool, but also technical articles, how-tos about PB.

Saturday, January 16, 2010

My Journey with and without Powerbuilder

As I mentioned in my previous post, I worked on Powerbuilder (PB) for a while, went away and finally came back to using it. I came  in contact with Powerbuilder in the early 1990. I was working for a Consulting company and we evaluated several products to port an existing applications written in B-Trieve/C and some others in d-Base.

The version I came to see was ver 3.0 and it really took me by surprise. In those days, writing windows programs was not easy. Anyone written programs in C/C++ programs would understand. I also dabbled in a few tools, including C and Turbo Pascal. Remember all those resource files you had to do, to make a screen? PB (and few other tools of the day) changed all that. It was called the 4GL (4th generation language, as against C which was a 3GL language). These were the times when CASE tools were also becoming popular. See this wiki article for more on those.

So, PB naturally had a lot of competition. Microsoft Visual Basic, Gupta SQL, Oracle forms for windows (CDE) were there to name a few. We did try each of these, but PB fared better than the rest. (Of course Oracle forms was there already, which was popular and did the job, but it wasn't a windows application builder. It's cousin Oracle CDE didn't do a good job at the time). Powerbuilder had something unique that made it win that round of the competition, the datawindows.

I joined one of the medium sized consulting companies in 1994. They got me into a shipping company, APL, in Oakland, CA. The company was porting their mainframe programs to client server world using Powerbuilder/Oracle. It was an ambitious plan, but it definitely looked glamorous (Kind of what mobile apps are to the current generation). With only some exposure to the product, I joined APL as a PB expert. All those mainframe programmers felt threatened and wanted to learn PB from me as quickly as possible to keep their jobs! Legacy has to go and the glitter of client/server was in! I saw several legacy products getting migrated from mainframe and other platforms to PB. There were products to bring mainframe data into PB screens including a "screen scraper" from Mitem View!

At that time Powerbuilder was owned by a company called Powersoft. It was a cute Client/Server product that allowed one to create windows screens that would connect to a database server and these were to replace those complex mainframe applications. It was like gold rush! For over 5 years, PB was ruling the corporate world. And like the gold rush came the bust as well.

The year was 1999. Sybase acquired PB by then. By then PB projects were dwindling down, and PB links on the web started disappearing on the web.  Java was in, at several of those places that went into PB earlier. Client/Server was not going to cut it any more and n-tier was the word. They did come up several contraptions to put themselves in the n-tier world, but none really succeeded back then.

I was in Toronto, trying to win a PB project at the time. I did some prototypes, but the local Sybase developers undercut us. They came with the just released PB 7.0, which we hadn't seen. Their prototype and PB, both included a Treeview structure (sorta what you see in windows explorer). That was end of PB career, or so I thought at the time. I left the PB scene like 1000s of other programmers seeking greener pastures. Java came to the rescue, I also had an opportunity to get to know a great product called Forte. (Forte was a truly OO and n-tier product from the get go. More about it in another post).

Then, came recessions, job losses. In 2004, surprisingly, PB came to my rescue in an unsuspecting place in Fremont, CA. That kept me going a bit more and I branched into Oracle world. And another recession brought me back to the PB world again.

I recently took a job at the city of LA, in supporting and enhancing their Powerbuilder application running against EA Server.

In the world of short lived technologies and dying programming tools, I am amazed to find this product not only surviving, but evolving into what it is today, Powerbuilder + EA Server (Jaguar). In the upcoming posts, I will share some of my experiences and views about the tool!

Born Again Powerbuilder

I am a born again Powerbuilder (developer)! That's right I program in Sybase's Powerbuilder, again!

Like many I also left it sometime in 1999 when it looked like fading. But, Powerbuilder has proved it's worth and reserved it's place and pace in the ever growing world of Java, C++ and .Net. It has not only survived the onslaught of new technologies, but I feel it is coming out of hibernation.

To those who don't have a clue as to what Powerbuilder is, it's a client server development tool that a small company called Powersoft brought out in the late 80's. It had it's hay days in the 90's during the hysteria in corporate world to migrate out of "legacy" mainframe applications to Client/Server. Few of us, that knew Powerbuilder were the "new kids on the block" and the new order priests. But it all dried down soon after Sybase took over. By then internet programming took over and the rest is history.

Now, Powerbuilder is becoming "legacy" application itself and I know what those Mainframe programmers must have felt when we "Client/Server" programmers arrived. One consolation: Powerbuilder did not die while competition like Visual Basic, Gupta SQL and Oracle CDE slowly disappeared in the corporate scene, either naturally or because of company policies. At least, it has been a recession proof job finder for me.

If anyone tries to search "Powerbuilder" on the net, they may be up against broken links and/or old contents. There hasn't been any good books written on the subject and while it seems to be dying, you also hear about Sybase bringing out the Powerbuilder ver 12.x and Pocketbuilder etc. They also silently integrated Java into their product line.

I recently took up yet another Powerbuilder job maintaining a PB 10.x application using EA Server 5.5. I intend to share with you my experiences and my love-hate relationship with the product.

Hope you find this useful.