PowerBuilder
Encyclopedia
PowerBuilder is an integrated development environment
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

 owned by Sybase
Sybase
Sybase, an SAP company, is an enterprise software and services company offering software to manage, analyze, and mobilize information, using relational databases, analytics and data warehousing solutions and mobile applications development platforms....

, a division of SAP
SAP AG
SAP AG is a German software corporation that makes enterprise software to manage business operations and customer relations. Headquartered in Walldorf, Baden-Württemberg, with regional offices around the world, SAP is the market leader in enterprise application software...

. It has been in use since 1991, peaking around 1998 with around 100,000 users.

While Powerbuilder's market share has diminished, many applications created with it are still in use. In 2010, Sybase released a major upgrade to PowerBuilder, intended to compete directly with Microsoft Visual Studio
Microsoft Visual Studio
Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all...

.

Sybase sells another programming language called PocketBuilder. It is based on PowerBuilder and used for creating applications that run on mobile devices such as cell phones or PDAs.

Features

PowerBuilder has a native data-handling object called a DataWindow, which can be used to create, edit, and display data from the database. This object gives the programmer a number of tools for specifying and controlling user interface appearance and behavior, and also provides simplified access to database content. To some extent, the DataWindow frees the programmer from considering the differences between Database Management Systems from different vendors.

PowerBuilder also includes a scripting language, PowerScript, which is used to specify the application behavior when events occur . Events usually correspond to user actions, such as clicking on an element of the user interface, or closing a window.
PowerBuilder 10 and above use Unicode internally. This allows the use of characters from multiple languages concurrently. This affects the coding of API calls; however, the upgrade from PowerBuilder 9 to 10 automatically converts your existing API calls for you. Therefore, in PB10, you have a choice of making ANSI or Unicode API calls at the call level. PowerBuilder 10 supports reading and writing to flat files larger than 2 GB. PB8.0 supports the TRY CATCH FINALLY syntax of error handling. PB 10 has a built-in date-picker control.

On April 20, 2010, Sybase released PowerBuilder version 12.0, a major upgrade. It includes the ability to create applications that target several different platforms offered by the .NET Framework
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

, including ASP.NET
ASP.NET
ASP.NET is a Web application framework developed and marketed by Microsoft to allow programmers to build dynamic Web sites, Web applications and Web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages ...

 Web Forms, Windows Forms
Windows Forms
Windows Forms is the name given to the graphical application programming interface included as a part of Microsoft .NET Framework, providing access to native Microsoft Windows interface elements by wrapping the extant Windows API in managed code...

, or WPF
Windows Presentation Foundation
Developed by Microsoft, the Windows Presentation Foundation is a computer-software graphical subsystem for rendering user interfaces in Windows-based applications. WPF, previously known as "Avalon", was initially released as part of .NET Framework 3.0. Rather than relying on the older GDI...

. These features are offered through the new PB.NET IDE
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

, which is built on the Visual Studio Isolated Shell http://msdn.microsoft.com/en-us/vsx2008/products/bb933751.aspx. This latest release is intended to better align PowerBuilder with its competitors http://www.sybase.com/detail?id=1063782 while continuing to offer its most distinguishing product: the DataWindow http://www.infoworld.com/d/developer-world/new-sybase-powerbuilder-12-requires-little-coding-280. In PowerBuilder 12, PowerScript is a fully CLS-compliant .NET language and comes with the ability to deploy fully managed code. The older PowerBuilder IDE (now termed "PowerBuilder Classic" by Sybase) continues to be made available for vanilla PowerBuilder development.

Usage

PowerBuilder is used primarily for building business applications. PowerBuilder is used by some companies in the financial and telecoms sectors. However in recent years, PowerBuilder has seen substantial competition arise from Java development tools and from Visual Studio.

There are a number of third-party tools that build upon and enhance the functionality of PowerBuilder, including Appeon for PowerBuilder, Visual Expert for PowerBuilder, and Enable Multilingual.

History

PowerBuilder was originally developed by PowerSoft in 1991. PowerSoft went public in 1993 and was acquired by Sybase for $904 million in Sybase stock in 1995. The product languished for a long time due to several reasons:
  • Sybase's stock plummeted in 1996 after discovery of inflated sales reports, and many members of the original PowerSoft development team left Sybase.
  • Competition from rival tools for building GUIs to databases, such as Microsoft Visual Basic, Microsoft Access and Delphi, reduced PowerBuilder's market share.
  • PowerBuilder was slow to move to the Web: long after rivals began to support Web development, it continued to be based on two-tier (traditional client-server) technology. Two-tier approaches, while allowing more rapid development, are inherently less scalable than N-tier solutions (such as Web-based database solutions). In a two-tier solution, there must be one connection to the database for each concurrent user, whereas with N-tier solutions, which incorporate connection-pooling technology, a limited number of database connections - sometimes, just a single connection - are multiplexed among a much larger number of actual concurrent users. While two-tier applications continue to be used (appropriately) when the number of users is modest, they are inappropriate for, say, E-commerce scenarios. Also, deployment of two-tier solutions, including management of software updates, is significantly more complicated: Web-based solutions require only a browser on the user's machine, and the latest version of the application's Web pages will always be available.


PowerBuilder 12, through compatibility with Web technologies such as ASP.NET, represents an attempt to regain market share. In order to move developers to newer versions, PowerBuilder 12 provides migration utilities that attempt to simplify migration http://www.sybase.com/pbmigration.

Summary of PowerBuilder features

Powerscript is an Object-Oriented programming language. Nearly all of the visual and non-visual objects support Inheritance
Inheritance (computer science)
In object-oriented programming , inheritance is a way to reuse code of existing objects, establish a subtype from an existing object, or both, depending upon programming language support...

, Polymorphism
Polymorphism in object-oriented programming
Subtype polymorphism, almost universally called just polymorphism in the context of object-oriented programming, is the ability to create a variable, a function, or an object that has more than one form. The word derives from the Greek "πολυμορφισμός" meaning "having multiple forms"...

, and Encapsulation
Information hiding
In computer science, information hiding is the principle of segregation of the design decisions in a computer program that are most likely to change, thus protecting other parts of the program from extensive modification if the design decision is changed...

. The programmer may utilize a common code framework
Software framework
In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software...

 such as PowerBuilder Foundation Classes
Power foundation classes
The PowerBuilder Foundation Class Library is a set of PowerBuilder objects that are customized and used to develop class libraries. These objects can be used to provide corporate, departmental, or application consistency. PFC also includes objects that are used as is for utility purposes, such as...

, also known as PFC, to inherit objects from and leverage pre-existing code.

The DataWindow is the key component (and selling point) of PowerBuilder. The DataWindow offers a visual SQL
SQL
SQL is a programming language designed for managing data in relational database management systems ....

 painter which supports outer joins, unions and subquery operations. It can convert SQL to Visual representation and back, so the developer can use native SQL if desired. DataWindow updates are automatic—it produces the proper SQL at runtime based on the DBMS to which the user is currently connected. This feature makes it easier for developers who are not experienced with SQL.

The DataWindow also has the built-in ability to both retrieve data and update data via Stored Procedures
Stored procedure
A stored procedure is a subroutine available to applications that access a relational database system. A stored procedure is actually stored in the database data dictionary.Typical uses for stored procedures include data validation or access control mechanisms...

. The user picks the Stored Procedure from a visual list.

RDBMS Interfaces

PowerBuilder offers native interfaces to all major databases, as well as ODBC and OLE-DB
OLE DB
OLE DB is an API designed by Microsoft for accessing data from a variety of sources in an uniform manner. It is a set of interfaces implemented using the Component Object Model ; it is otherwise unrelated to OLE...

, in the Enterprise version. There are many connectivity options that allow performance monitoring and tuning, such as:
  1. Asynchronous operations (so a long-running query won't "lock up" the application)
  2. Static Binding on or off
  3. Integrated Security
  4. Tracing of all SQL
  5. Isolation Level
  6. Password Expiration Dialog
  7. Blocking Factor
  8. Number of SQL statements to Cache
  9. Use Connection Pool
  10. Thread Safe
  11. Trace ODBC API Calls


Due to the information about the database schema (such as primary key information) that are stored in PowerBuilder's data dictionary, the code required to implement data display and browsing is greatly simplified, because the dictionary information allows generation of the appropriate SQL behind the scenes. Here is a sample PowerBuilder update script:

dw_1.AcceptText
dw_1.Update

PowerBuilder supports the following ways of interacting with a database:

DataWindow: this is the simplest approach, relying on automatically generated SQL.

"Embedded SQL": Embedded SQL supports SELECT, INSERT, UPDATE, DELETE and cursors. This option is used when the developer desires more control than is available with the DataWindow option. Example:

UPDATE my_employee SET STATUS = 'A';
IF sqlca.sqlcode<>0 THEN ...

"Dynamic SQL": This is a form of parameterized SQL, where the user builds a string that may optionally have bind variables. Dynamic SQL may be used to create cursors as well.

PowerBuilder supports Active-X
Object Linking and Embedding
Object Linking and Embedding is a technology developed by Microsoft that allows embedding and linking to documents and other objects. For developers, it brought OLE Control eXtension , a way to develop and use custom user interface elements...

 and OCX controls, both visible and non-visible. It also can use OLE Automation as a client. However, PowerBuilder supports only late binding, not early binding. Therefore, when using OLE Automation, a dropdown of possible actions is not provided. PowerBuilder can be a DDE client or server. This allows it to interoperate with other applications.

PowerBuilder can make Windows and third-party API calls, and, in general, works well with third-party libraries in DLL files, however it does not directly support callback functions.

PowerBuilder offers a "/pbdebug" runtime switch, which creates a log file. This can help track down a bug "in the field", as the user simply emails this log file to the developer. It has another feature which can log all SQL statements to a file. It also has built-in performance profiling, an integrated debugger, context-sensitive help, and an active newsgroup to provide support.

PowerBuilder applications are typically compiled to p-code, which is then interpreted by the PowerBuilder runtime. Although it can be compiled to machine code (called c-code), a typical business application does not run any faster. Only applications which do an unusually large amount of computations with little I/O are likely to benefit from compiling to machine code.

Criticism

Extensibility of the language was rather limited for older versions of PowerBuilder. The technologies provided to overcome this (ex. PowerBuilder Native Interface, or PBNI) are still rather tricky. To develop a solution that includes external C++ code may not only require a competent C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 developer, but also a PowerBuilder expert to guide the developer through the myriad of subtleties of the language and the PowerBuilder Virtual Machine
Virtual machine
A virtual machine is a "completely isolated guest operating system installation within a normal host operating system". Modern virtual machines are implemented with either software emulation or hardware virtualization or both together.-VM Definitions:A virtual machine is a software...

.

For PowerBuilder 12 http://www.sybase.com/powerbuilder12beta, released in late 2010, Sybase states that this extensibility is less of an issue http://www.sybase.com/powerbuilder12, because PowerBuilder .NET's APIs allow the use of "off the street XAML" including control templates and skins as well as its ability to use custom WPF controls with less effort than its historic use of External Function calls and PBNI to access external resources.

Sybase has released regular updates to PowerBuilder at intervals of every 1.5 years or so. Moreover, in each of these releases, Sybase regularly incorporates modern development paradigms into the IDE, and provides the ability to develop for .NET. PowerBuilder 12.5 introduces even more .NET and WPF support http://blogs.sybase.com/powerbuilder/2011/08/powerbuilder-12-5-released/.

The (classic) Powerscript language itself, which is still available for compatibility reasons, is known as "a language built around the DataWindow" amongst developers with PowerBuilder being the "IDE built around the DataWindow".
Since PowerBuilder 12.0, the (now .NET-compliant) PowerScript language is fully compliant with the common language specification (CLS), and can be compared with C#, Java or VB.NET.
The language now supports Arrays, Delegates, Parameterized Constructors, User-defined Enumerations and Generics. http://download.sybase.com/beta/pb12ctp/Sybase_PB12_FeaturesforPublicCTP.pdf. PowerBuilder 12.5 introduces support for Multithreading, the ability to consume RESTful (Representational State Transfer) Web Services and Batch Command Processing. For the "classic" PowerScript, various smaller enhancements were added,too. http://blogs.sybase.com/powerbuilder/2011/08/powerbuilder-12-5-released/.

Community

PowerBuilder is known for its loyal customer base and ease of development http://chrispollach.pbdjmagazine.com/10_reasons.htm.
Consequently, there are a variety of grass roots community groups and resources for PowerBuilder developers to share and convene. These include the International Sybase User Group http://www.ISUG.com and what some call the very first technical journal devoted to an IDE, PowerBuilder Developer's Journal http://pbdj.sys-con.com/. There are also blogs from TeamSybase http://www.sybase.com/developer/sdncommunity/powerbuilder and evangelists http://blogs.sybase.com/powerbuilder available. PowerBuilderTV http://www.powerbuilder.tv is series of webinars by and for the PowerBuilder community with webinars by PowerBuilder evangelists, developers and vendors.

Some PowerBuilder Tools

  • Appeon for PowerBuilder - Deploys existing or new PowerBuilder projects as Web applications that runs natively on either .NET or Java servers and OS.
  • Visual Expert for PowerBuilder - Visual Expert helps in sharing the knowledge of your applications. It also automates impact analysis and checks code quality.
  • Enable Multilingual - Enable makes PowerBuilder applications multilingual quickly and easily. Using Enable, developers can only need to make a few small changes to the original PowerBuilder code to go from monolingual to multilingual.
  • Visual Guard for PowerBuilder - Visual Guard is an access control and application-level permissions tool. It helps you centralize view and control of users and their rights in PowerBuilder applications

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK