| By Geogy Zachariah | Article Rating: |
|
| October 7, 2007 06:45 AM EDT | Reads: |
9,184 |
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,184
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.
- Kindle 2 vs Nook
- Confessions of a Ulitzer Addict
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Infrastructure-as-a-Service Will Mature in 2010: Microsoft's David Chou
- Windows 7 – Microsoft’s First Step to the Cloud
- Cloud Expo and the End of Tech Recession
- Jill Tummler Singer, Deputy CIO of CIA, Keynotes at GovIT Expo
- Reality Check at the Cloud Computing Expo
- Visual Studio 2010 Is Cloud Friendly
- Fired SCO CEO Fires Back
- Kindle 2 vs Nook
- The Difference Between Web Hosting and Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- Wave on Ulitzer: Confessions of a Google Wave Fanboy
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Cloud Computing Best Practices
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- Ulitzer.com Named Exclusive "New Media" Sponsor of Cloud Computing Conference & Expo
- Infrastructure-as-a-Service Will Mature in 2010: Microsoft's David Chou
- Eval JavaScript in a Global Context
- Windows 7 – Microsoft’s First Step to the Cloud
- Google Maps and ASP.NET
- Crystal Reports XI & How It Has Changed
- Converting VB6 to VB.NET, Part I
- Creating Controls for.NET Compact Framework in Visual Studio 2005
- Where Are RIA Technologies Headed in 2008?
- How to Write High-Performance C# Code
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Implementing Tab Navigation with ASP.NET 2.0
- i-Technology Photo Exclusive: Bill Gates & Steve Jobs In "Nerds"
- .NET Archives: Getting Reacquainted with the Father of C#
- i-Technology Viewpoint: "SOA Sucks"
- Programmatically Posting Data to ASP .NET Web Applications




























