|
Read all 1 Reviews
|
Write a Review
|
|
About the Author
Location: Land of Bweebada Babada
Reviews written: 412
Trusted by: 150 members
About Me: ...jazz was never meant to be a museum piece, under glass... Miles Davis
|
Migrating a killer app from PowerBuilder 6.5 to 8.0
Written: Aug 07 '01
Pros:Easy Migration Tools, New Target Technology, More web oriented
Cons:Early versions with Sybase are often buggy
The Bottom Line: PowerBuilder 8.0 is the most current version of the best RAD software tool on the market, converting to it was daunting but do-able.
Conversion Time
Ground breaking nuclear-geneticist Hermann Joseph Muller said, “Life is a whole ceaseless change. There is no sign of physical limit yet.” Bearing that in mind it occurred to me that I should begin to test the limits of PowerBuilder 8, and see if i could disprove Muller. The easiest way it seemed to me to go about this heady undertaking was to convert our EMS natural gas trading and accounting application. It was written in PowerBuilder 6.5 with the PFC and Transact -SQL for the motors behind the screens. EMS has 600+ PowerBuilder programs, over 1700 stored procedures, 604 triggers, 179 views, and 400+ tables. Migrating this application was not something that happened quickly, but PowerBuilder8 made this a somewhat painless transition.
For those of you unfamiliar with my love affair with Sybase and PowerBuilder, PB is a software package that was created in the early eighties to allow for the editing and creation of Windows applications. Their claim to fame is the DataWindow, which is an easy means of allowing your Window to access data in a database scenario. They also feature very rapid application development. If a person is familiar with programming, they can learn and work with PowerBuilder very quickly. It takes a very long time to get good at however.
It further occurs to me as i begin to look at my beta version of PowerBuilder 8, that i am quite comfortable with PowerBuilder 6.5 and not so sure that i wanted to move off of it and into the unknown. PowerBuilder 6.5 is solid, marketed by Sybase as solid, and was designed as a developer’s environment. And it also flew in the face of the old implementation theory….”let the other guy work the bugs out.” Instead of ducking, or waiting for the coming storm, i decided to plow ahead…
Glossary
Pibble - A software container in PowerBuilder where you can store Windows, Menus, Structures, and Objects.
Object - A generic, term for programs and various other pieces of software that you want to be able to globally access.
Database - A collection of data elements gathered in a way that can be easily accessed and used.
Application - A collection of Pibbles that all work toward a common software goal. A collection of like software.
Target - A collection of like Applications that make up a bigger picture in software.
PowerScript - The actual language that a programmer uses when writing PowerBuilder.
PFC - PowerBuilder Foundation Class – A collection of software designed in PowerBuilder to accommodate more rapid development. These are objects and programs that can be used and re-used. They allow for a more common look and feel to the software and easy deployment of changes.
Exception - A software error that allows the programmer to produce an exit condition or send the user a message about the problem encountered.
Migration - Converting a program written in an older version of software to a newer version, often necessary to continue to receive support from software companies, and very often increases system speed and efficiency.
Preparing the Application for Migration
The first step in starting this migration was to move all of my pibbles and objects to one of my local drives. This is an important step in speeding up your migration. If you attempt to migrate from a network, it can really take a lot of time, and it will just mean tying up a pc for a good while, creating unnecessary network traffic and tying up your development environment – slowing productivity and losing programmer time. Doing the migration locally and then copying back to the network is a necessary first step. Then you will need to establish your library list with the local directory as the starting point on the library list. You can use the PowerBuilder editor or just any text editor to make the changes.
You can then open the application in PowerBuilder 6.5 and paste in this new library list, that way when you go to make the transition to PowerBuilder 8, it will look for the pibbles that you are going to migrate on your local drive. After you have pasted in the new lib list, then you will save your application object, close PowerBuilder 6.5 and get ready to start the fun. Several EMS modules left me high and dry when attempting to recreate of find my old lib-list. So, one of the things that you can do if you have an old app and have forgotten the lib-list or nobody has it or it is just gone…you can export the Application Object to a folder, and then edit the SRA file after you get it saved out on your hard drive somewhere. That application object is going to have the library list in it as text. You can then copy and paste it out of there and into your word processor so that can assure yourself that you have truly gotten the best and most efficient code.
Another preliminary step is having the PowerBuilder stored procedures (PowerBuildersyc.sql & PowerBuildersyc2.sql) run on the server where you want to access databases. You will not be able to see the tables, procs, triggers, or anything else that you need for your nice smooth database connection without that being run. Our DBAs run them for me on the various database boxes and then I am able to access the data from PowerBuilder, in this case from PowerBuilder 8.
Once you have done that you will have to create a Workspace. This PowerBuilder object gives you a means of grouping applications or targets. This will have a .PWB extension. The Workspace is new to PowerBuilder 8 and it will give you a way of opening and deploying multiple targets at once. There are two kinds of targets, web targets, and Powerscript targets. Both the Workspace and Target concepts are aimed at the web development environment. Targets are considered an excellent way of allowing you to “build, manage and deploy HTML, images and other resources needed for a web site”…to quote Sybase.
Once you have created a Workspace for your applications, you will have to select your application that controls the pibbles that you are going to migrate. This will bring up a list for the migration, and here is where PowerBuilder will stop you with the Migrate Application dialog box and tell you that the application you are opening was from an older version and must be migrated. It will also give you the opportunity to browse for more pibbles if you have more that you need to add.
You need to make sure that you connect to the database so that when PowerBuilder starts regenerating the DataWindow objects it will find the tables and columns in question. As you start the process, PowerBuilder will begin by naming your application object with a .pbt extension, making it into a target – which is the PowerBuilder 8 way of saying application object. Then it will begin reading in the objects in the pibbles that you are moving, and regenerating and rebuilding them in PowerBuilder 8. Then the system will allow you to begin editing your objects and working in PowerBuilder 8. Another of the features of the Target that i was able to make nice use of was searching by Target. It has always been frustrating to search by one pibble at a time, plunking your way through, and so being able to search through a Target gives you the ability to run through multiple pibbles…bravo Sybase.
Heading for Warmer Climes
PowerBuilder then uses the Migration Assistant to move through your pibbles, objects and methods and it scans them, and then it processes through moving them to the newer version, and capturing the errors, obsolete functions and obsolete events and listing them so that you can fix if necessary. The Migration Assistant can also be used selectively to pick a single pibble or object to migrate. You can choose PFC or PowerScript and PowerBuilder will check for obsolete functions or events and it will also go through the code for problems with reserved words. The display will show the obsolete code, and the pibble, object name and line where it is found along with a suggested replacement. This all come in for display in the Output window at the bottom of the screen.
PowerBuilder has a nifty new way of capturing the errors that can come up as well. As it began to crash and burn, i got a message saying essentially, “PowerBuilder is about to crash, do you want to capture the information?” – and if so, you can get a sys dump of sorts, and save it off to disk in a text file format. This will be very helpful in tracking down some of those mysterious PowerBuilder system deaths that occur from time to time. This text file shows the registers active, the O/S version, the status of memory, and what modules are loaded at the moment of pain.
I did get more than my fair share of obsolete objects, or renamed ones in my information area of the Migration Assistant. I also had a good number of conflicts between Instance Variable names and exceptions. Sybase still is not killing these things off summarily, which is both wise and merciful on their part. Someday dwDescribe may actually stop working, but for now, it just keeps rolling along. PowerBuilder also has several new-reserved words, and you will have to change any variable names that conflict with these: TRY, CATCH, FINALLY, THROW, and THROWS.
Post Software Coitus
After I generated all of my pbds and executable I had to make up new folders for the PowerBuilder 8 run time DLLs. While not something that we are likely to forget, it does pay to mention it after all. If you follow lists and patterns as i do, it pays to have every detail mentioned.
There are a number of objects now obsolete in PowerBuilder 8, and some moved to other places in PowerBuilder. The release notes list these changes, and there are warnings as usual for obsolete objects that come with the migration. PowerBuilder 8 has a few new concepts, but for the most part, the transition to this new system was straight ahead for a complex – client/server environment. The large number of objects involved only extended the time involved in the transition between versions. The application is up and running, and seems to have gained a certain amount of speed between versions. So far, all is well with PowerBuilder 8 and EMS.
Reprinted with the permission of the delighted author, me
PowerBuilder Developers Journal - June 2001
Recommended: Yes
Read all 1 Reviews
|
Write a Review
|
|
|
|
Related Deals You Might Like...
Sybase PowerBuilder 12.5 is the second full-fledged .NET release of the market’s favorite application development tool, bringing true power and ea...
Sybase PowerBuilder 12.5 is the second full-fledged .NET release of the market’s favorite application development tool, bringing true power and ea...
Sybase PowerBuilder 12.5 is the second full-fledged .NET release of the market’s favorite application development tool, bringing true power and ea...
Platforms: Windows 98 Windows NT Windows 95
|