PowerBuilder Authors: Chris Pollach, Yeshim Deniz, Jayaram Krishnaswamy, Kevin Benedict, Avi Rosenthal

Related Topics: PowerBuilder

PowerBuilder: Article

Twenty-Four Reasons To Consider PowerBuilder 12

PowerBuilder 12 has been released: definitely one of the most ambitious releases in many years

PowerBuilder 12 has been released.  The new version represents a huge leap forward as far as support for .Net development, particularly reflected by the introduction of a new .Net IDE based on the Visual Studio Isolated Shell.  That doesn't mean that people who aren't doing .Net development with PowerBuilder (the people doing "classic" development) have been left out.  There are also a number of enhancements in the "Classic" 32 bit IDE as well.  We'll cover some of those first.

Classic IDE Enhancements

1.        Support for Windows 7.  Officially, the release notes indicate support for "Windows 7 Professional 32-bit".  There are several editions of Windows 7, including Starter, Home Basic, Home Premium, Professional, Enterprise and Ultimate (http://en.wikipedia.org/wiki/Windows_7_editions).  Only Premium and above (Enterprise and Ultimate) can connect to a network, so it makes sense for a program like PowerBuilder to only officially support Premium and above.   It should also be safe to assume that programs that fully support Premium will work on Enterprise and Ultimate as well.  However, all of the editions other than Starter also come in a 64 bit version.  No word on when Sybase will announce compatibility or official support for the 64 bit versions of Windows 7.  (Not that it would run as a 64 bit program, just that it would be officially supported to operate as a 32 bit program on that OS).

2.       Web Service Client Enhancements.  Web service client functionality in the "classic" IDE has been enhanced through support for adding and getting cookies for proxy through the PBAddCookie and PBGetCookies methods.  In addition,  a new Web Services Client extension class (like SoapConnection and SoapException) has been added called SoapPBCookie which has 11 different methods for interaction with web service client cookies (GetComment/SetComment, GetCommentUri/SetCommentUri, GetExpired/SetExpired, GetExpires/SetExpires, GetHttpOnly/SetHttpOnly, GetName/SetName, GetSecure/SetSecure, GetTimestamp, GetURI/SetURI and GetValue/SetValue).  In addition, several new methods have been added to the SoapConnection class for dealing with proxy servers when using the .Net engine.  AddToBypassList and RemoveBypassList allow you to specify URLs that can be accessed without going through the proxy server.  SetBypassProxyOnLocal indicates that connection to intranet URLs don't have to go through the proxy server.  SetUseDefaultProxySetting allows the web service client to read the proxy settings from the Internet Explorer settings.

3.       Miscellaneous Enhancements:

a.       RichTextEdit Control:  Functionality has been enhanced to deal with table grids that have been copied into the control.  Previously, the only way to clear the entire grid was to insert a new blank RTF document.  Simply clearing the control would leave the table grids in the control.  Clearing a portion of existing text required copying out the portion to be kept, inserting a blank document and then copying the desired text back in.  The Clear function has been enhanced with an optional Boolean argument to indicate whether table grids should be cleared from the selected text.  A new ClearAll function has also been added to clear the entire control including table grids.

b.      DataWindow:  A new OriginalSize property has been added for button and picture controls in the DataWindow, similar to the existing OriginalSize property on stand alone button and picture controls.

c.       Database Enhancements: A GenerateEquallsNull database parameter has been added for all database interfaces to allow variation in how null comparisions are made.  The default ("No") means that the original "IS NULL / IS NOT NULL" syntax is used.  When the parameter is set to "Yes", the syntax is changed to " = null / <> null".  The only database I'm aware of that uses this syntax is Microsoft SQL Server when ANSI_NULLS has been turned off.  A NCharBind database parameter has also been added for "native" SQL Server (SNC) connections.

PowerBuilder .Net IDE Features - The new IDE adds a great deal of new functionality for PowerBuilder developers:

4.       Editing Enhancements - As mentioned previously, the new PowerBuilder.Net IDE is based on the Visual Studio isolated shell.  That means that many of the more advanced code editing features of that IDE are now available to PowerBuilder developers.  For example, the PowerBuilder.Net IDE supports Intellisense - somewhat akin to the AutoScripting feature in PowerBuilder Classic, but with a number of additional features.

5.       Windows Presentation Foundation (WPF) applications - WPF is the .Net next generation approach for GUI applications running natively on the client.  PowerBuilder 12.Net supports the creation of WPF application, in part by introducing new WPF control classes that are all .Net wrappers around standard PowerScript controls.  As a result, you can continue to use the PowerBuilder.Net window painters much the same way as you would with the PowerBuilder Classic version, but the result is WPF.  WPF is based on Extensible Application Markup Language (XAML), which in turn is also the basis for Silverlight, Microsoft approach for RIA applications operating within a browser and for applications for the upcoming Windows Mobile 7.  While PowerBuilder.Net does not support Silverlight with this initial release, much of the groundwork has been laid for Silverlight support, opening up the possibility of creating RIA web applications and Windows Mobile 7 applications from it in future versions.

6.       WPF DataWindows - In order to support creation of WPF applications, a new version of the DataWindow was also introduced that renders WPF output and compiles to fully managed code.

7.       Skinning Applications - One of the built in features of WPF is that the purely visual aspects of you application is saved out in a separate XAML file from the code that implements its functionality.  As a result, skinning an application only requires the creation of custom XAML files to apply different visual characteristics.  While it has been possible to use third party tools to skin PowerBuilder applications in previous versions, the functionality was not native, and the skinning didn't apply to the DataWindow because of the way it rendered its visual characteristics.  Now that everything in PowerBuilder.Net supports WPF, skinning is possible throughout the application, is built in, and is rather simple.

8.       Windows Communication Foundation (WCF) services - WCF is the .Net next generation approach for implementing services.  Significant enhancements in WCF include support for transport mechanisms other than SOAP and build in support for web services standard such as WS-Security.

9.       No more PBLs! - What appear to be PBLs in the PowerBuilder.Net solution explorer are directories, with a direct correspondence between files in that directory and PowerBuilder objects in the "pbl".  Since the source code is now being saved out in a text file, it means that normal source control operations can now be applied directly to the files.  You are no longer limited to providers supporting a particular source control API.  Those that do support the API that the Visual Studio shell support have the advantage of allowing you to work directly within the IDE, but you can also use other source control systems and work with the files directly with their tools (e.g., the Tortoise SVN plug-in for Windows Explorer).

10.   Ability to save an object with compile errors - Sounds like an odd "enhancement", but one of the things that many developers learn early is that "save early, save often" isn't just a good idea for retirement savings, it's also a good idea in software development.  It's all too easy to do something that might lead to a system crash, only to discover that the last time you saved your work was 4 hours prior to the crash and all the work since is gone.  The difficultly to date doing that with PowerBuilder is that PowerBuilder never allowed you to save an object until every script in that object could compile without errors.  Sometimes when you're in the middle of debugging or rewriting something, you may want to save your work without having to ensure that it can all compile.  Because of PowerBuilder's restrictions though, you were often forced to comment out huge blocks of code just so the IDE would allow you to save the object.  With PowerBuilder.Net, saving an object and compiling it are now two separate operations.  As a result, you can save your code at any point, whether it's capable of compiling or not.

11.   Support for Add-Ins to the IDE - Back when PowerBuilder 10 was released, one of the new features was the PowerDesigner Plug-in for the PowerBuilder IDE.  The PowerDesigner Plug-in was based on a more generic Plug-in API that the engineers introduced into the IDE, tantalizing us with the possibilities that other plug-ins would become available and that we might be able to create our own.  Sybase never documented the API though, and so nothing else ever bore fruit out of that.  Now that PowerBuilder is based on the Visual Studio isolated shell though, plugins can be developed in any .Net language (including PowerBuilder .Net).

12.   Better support for arrays - In previous versions of PowerBuilder, you either defined arrays as bounded or unbounded in their declaration, and they stayed that way.  In PowerBuilder.Net, you can declare an array as unbounded, and then dynamically limits its bounds at runtime.  Previous versions of PowerBuilder didn't allow you to return an array from a function without wrapping it in an object or structure.  In PowerBuilder.Net, you can now return a bare array from a function.  Finally, PowerBuilder.Net supports the declaration of "jagged" arrays (arrays of arrays).

13.   Additional DataWindow Graph Styles - PowerBuilder.Net adds Bubble, Cone, Donut (including 3D Donut) and Radar graphs to the styles of graphs available within a DataWindow.

14.   DataWindow Graph Tooltips - All DataWindow graph styles support a tooltip property that can provide information about the category, series and/or value of each data point in a graph.

15.   DataWindow Graph Palettes - You can create a custom palette for a graph and load and save it as an XML file.

16.   Interfaces - PowerBuilder.Net supports the creations of interfaces, which can then be applied to an object to enforce its compliance with the interface without having to inherit from it.

17.   Inheriting from .Net classes - PowerBuilder 12 allows you to inherit from a .Net class and then extend its functionality.

18.   Parameterized Constructors - You can now overload the default constructor for objects to provide a custom constructor that takes arguments.

19.   Properties - You can create properties in your objects that wrap instance variables of the object, leaving them protected and requiring access through the properties.

20.   Bit operators - PowerBuilder.Net adds a BitRight and BitLeft operation to handle bit shifting functionality.

21.   User Defined Enumerations - PowerBuilder.Net adds support for creating your own enumerated types.

22.   Delegates - PowerBuilder.net can consume .Net delegates either synchronously or asynchronously.

23.   Generics - PowerBuilder.Net can consume .Net generic classes and methods.

24.   Support for adding third-party controls - Like previous versions of PowerBuilder allowed you to include 3rd party ActiveX controls in your application, PowerBuilder.Net allows you to add 3rd party .Net controls to applications you create with the new IDE.  However, PowerBuilder.Net allows you to include 3rd party controls in DataWindows, not just in windows.  It will also allow you to inherit from those 3rd party controls provided they are not XAML based controls (XAML does not support visual inheritance).

You should download the evaluation version and try it out yourself.  Definitely one of the most ambitious releases in many years.

More Stories By Bruce Armstrong

Bruce Armstrong is a development lead with Integrated Data Services (www.get-integrated.com). A charter member of TeamSybase, he has been using PowerBuilder since version 1.0.B. He was a contributing author to SYS-CON's PowerBuilder 4.0 Secrets of the Masters and the editor of SAMs' PowerBuilder 9: Advanced Client/Server Development.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.