| By Geogy Zachariah | Article Rating: |
|
| October 7, 2007 06:45 AM EDT | Reads: |
9,203 |
This article talks about the ease with which DataWindows can be designed and consumed in a Microsoft Visual Studio 2005 environment. The DataWindow .NET version 2.5 has the infrastructure to support this concept. With the earlier versions of the DataWindow .NET, such as 1.0, 1.5 and 2.0, the .NET developers had to depend on a standalone DataWindow Designer tool to design DataWindows before consuming it in the .NET Windows Form or ASP.NET applications.
What Is a DataWindow?
For readers who are new to the concept of the DataWindow, let me give a brief introduction on what a DataWindow is all about. The readers familiar with DataWindows may skip this section. The DataWindow is a very popular PowerBuilder technology for building data-driven applications. For any data-driven application, the most common activities the developers perform are:
- Define the data source.
- Retrieve the data from the data source.
- Present the data to the application user.
- Achieve the CRUD (Create, Retrieve, Update, and Delete) functionality.
The beauty of the DataWindow is that the data-driven applications can be created with very minimal coding. DataWindow consists of two parts.
- DataWindow Object: The metadata describing the data source and presentation information. This is a logical object residing in a .pbl file.
- DataWindow Control: The visual container for the DataWindow object; the Datastore is the non-visual container for the DataWindow object.
The DataWindow object can be visually created and modified using the graphical DataWindow painter. The available containers of the DataWindow object for the .NET developers are the Windows Form DataWindow component and the Web DataWindow component.
These are available to the .NET developers through Sybase's DataWindow .NET product.
"Create" in the article title would mean how to create the DataWindow object and "Consume" would mean how the created DataWindow object can be consumed in the .NET Windows Form and ASP.NET Web applications, all from within the Visual Studio IDE.
Design DataWindows in Visual Studio
DataWindow Designer Visual Studio Plug-ins
A few new custom Visual Studio plug-ins have been created to provide this facility to the .NET developers. In Visual Studio terms they are called packages. There are four packages distributed as part of the DataWindow .NET 2.5 as shown in Figure 1.
The packages communicate with the PowerBuilder native functionality through an interop layer called the Plugout. This explains a little bit about the DataWindow Designer plug-in architecture. The following provides a single line description of each of the packages. Details of the packages are shown in the next sections.
- DataWindow Project: Provides functionality to manage DataWindow projects in the Visual Studio Solution explorer.
- Database Painter: Provides functionality to create database profiles and connections.
- DataWindow Painter: Provides functionality to visually design DataWindow objects in the Visual Studio environment.
- Query Painter: Provides functionality to visually design SQL statements in the Visual Studio environment.
DataWindow Project
A new Visual Studio custom project type with the extension (.dwproj) has been created through this module. This provides the developer with the ability to create DataWindow projects, similar to a C# or a VB project in Visual Studio 2005. The blue rectangular box in Figure 2 shows the DataWindow project hosted in the Visual Studio Solution explorer with a list of DataWindow objects and one of them opened up in the DataWindow painter.
The features provided by this project explorer include the following:
- New or existing .dwproj (DataWindow project) files can be added into the project using Visual Studio's Add New Project or Add Existing Project wizards.
- New or existing .pbl (PowerBuilder library) files can be added into the project using the custom Add New Library or Add Existing Library wizards.
- DataWindow and Query objects can be added into the .pbl files using the custom created Add New Entry wizard.
- Navigate through the pbls, DataWindow objects and query objects.
- Copy and move the DataWindow and query objects across pbls.
- Export DataWindow and query objects as special text files (.srd, .srq).
- Import .srd and .srq files as objects in the project tree.
- Build the project to generate .pbd for all the pbls in the project.
Database Painter
This module helps the developer create and maintain database profiles and connections, and database schema maintenance including tables, views, and users. The equivalent for this in the Visual Studio world would be the Server Explorer containing the DB connections. The red rectangular box in Figure 3 shows the database painter hosted in the Visual Studio dockable window.
A database connection needs to be defined before the user can start creating DataWindow and query objects. Two predefined database profiles are distributed as part of the DataWindow .NET 2.5 installation so that the users can get started with designing DataWindows straight away. This module supports the DataWindow and Query painters by managing the database connections required by the painters.
Query Painter
This module helps the developer create and edit Query objects. The Query objects are logical objects and reside inside the .pbl files of the DataWindow project. They help design SQL statements in a Visual Designer and can be a source for DataWindow object creation.
DataWindow Painter
This is the heart of the article where I describe the DataWindow object design. The DataWindow project, Database painter, and Query painter are the support modules for the DataWindow painter.
DataWindow objects are created using an "Add New Entry" wizard, invoked from the .pbl node of a DataWindow project as shown in Figure 4.
Published October 7, 2007 Reads 9,203
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Geogy Zachariah
Geogy Zachariah is a senior software engineer with the PowerBuilder? DataWindow team in Sybase Singapore.
- Why SOA Needs Cloud Computing - Part 1
- Cloud Expo and The End of Tech Recession
- The Transition to Cloud Computing: What Does It Mean For You?
- A Rules Engine Built in PowerBuilder
- Sybase Named “Silver Sponsor” of iPhone Developer Summit
- How PowerBuilder Got Its Groove Back
- The Cloud Has Cross-Border Ambitions
- Ulitzer Named "New Media" Partner of Greatly Anticipated iStrategy Event in Berlin
- Risks and Enterprise Mobility?
- Steps for Success in Enterprise Mobility?
- Are Mobile Luddites Resisting Mobility?
- Hot Event in Santa Clara Becomes Cool with the iPhone
- The Difference Between Web Hosting and Cloud Computing
- Sybase CTO to Speak at 4th International Cloud Computing Expo
- Why SOA Needs Cloud Computing - Part 1
- Cloud Expo and The End of Tech Recession
- The Transition to Cloud Computing: What Does It Mean For You?
- Five Reasons to Choose a Private Cloud
- Seeding The Cloud: The Future of Data Management
- The Threat Behind the Firewall
- Economy Drives Adoption of Virtual Lab Technology
- Tips for Efficient PaaS Application Design
- A Rules Engine Built in PowerBuilder
- Sybase Named “Silver Sponsor” of iPhone Developer Summit
- Where Are RIA Technologies Headed in 2008?
- PowerBuilder History - How Did It Evolve?
- The Top 250 Players in the Cloud Computing Ecosystem
- Custom Common Dialogs Using SetWindowsHookEx
- DDDW Tips and Tricks
- OLE - Extending the Capabilities of PowerBuilder
- DataWindow.NET How To: Data Entry Form
- Book Excerpt: Sybase Adaptive Server Anywhere
- Sybase ASE 12.5 Performance and Tuning
- Working with SOA & Web Services in PowerBuilder
- Office 2003 Toolbar: A New Look For Your Old PowerBuilder App
- Dynamically Creating DataWindow Objects
































