PowerBuilder .NET Architecture

PowerBuilder .NET applications, including system classes and system functions, are built on top of the PowerBuilder WPF runtime library.

The WPF runtime library reuses the existing nonvisual part of the PowerBuilder Classic .NET runtime library, which has been enhanced for compliance with the extended Common Language Specification (CLS). The major difference between PowerBuilder .NET and PowerBuilder Classic is in the presentation layer.

A .NET assembly, Sybase.PowerBuilder.WPF.controls.dll, contains PowerBuilder versions of all WPF controls available in the presentation layer. (Implementations for the DataWindow®, EditMask, and RichText controls depend on additional assemblies.) WPF application development reuses the existing PowerBuilder to .NET compiler (pb2cs) for application compilation.

PowerBuilder Classic and PowerBuilder .NET share the same compiler, which has been modified to correctly generate WPF applications. For example, the WPF runtime library must link binary application markup language (BAML) to WPF controls. The modified version of the compiler accomplishes this linkage for PowerBuilder .NET applications, even though the .NET Windows Forms or Web Forms applications you develop in PowerBuilder Classic do not use BAML or WPF controls.

The following diagram shows the process used by PowerBuilder to create a new WPF application. Once you drag and drop a control or change something in the layout of the WPF Window painter, a corresponding XAML file is generated.



The WPF Window painter also generates PowerScript® code to work as the code-behind file to the XAML files. However, before it can be used as a code-behind file, the PowerScript code is translated and processed by the PowerBuilder to .NET compiler. The generated files are then compiled to a WPF application that contains embedded BAML. The WPF application also references the PowerBuilder WPF runtime engine that enables users to run the deployed application.