Using DataWindows for Web Forms
One of the nicest features is the simplicity of creating one object that's usable in both Windows and Web applications. The programming code shown for the Windows form earlier is the same as that used for Web Forms. Figure 14
shows the form from the Windows sample application in Figure 12
|Figure 14. A Web Forms Version: Here's a screenshot of the Web Forms version of the sample application running from the same data input form initially designed for the Windows version.|
Despite the effort Sybase has put into the Web version of the DataWindow, there are still more differences between the Windows and Web versions in addition to the tree view type mentioned earlier, which isn't available in the Web version.
One disappointment was that I had to manually code a Transaction object to use it in an ASP.NET application because the control wasn't available in the Web Toolbox. Fortunately, this appears to be nothing more than an error in the install, and you can add the control in code. Here's the code I used to overcome the missing Transaction object:
Sybase.DataWindow.Transaction SQLCA =
transaction1.Dbms = Sybase.DataWindow.DbmsType.Odbc;
transaction1.AutoCommit = false;
"ConnectString='DSN=mySQLServer;UID=;PWD=', " +
|Author's Note: The control provides additional DHTML and stylesheet properties for maximum control of the output.
Sybase's latest upgrade of the DataWindow product is flexible, powerful, easy-to-use and performs very well. The product acts and feels more polished than the initial 1.0 release. The Web Forms capability works well, but imposes a size overhead penalty. DataWindow .NET 2.0 would be a nice addition for anyone developing data-centric applications. The DataWindow object provides one interface for designing reports, nested reports, graphics, labels, and data entry formsand for the most part, these objects work in both Windows and Web Forms.
DataWindow .NET 2.0 provides a logical migration path for PowerBuilder developers moving to .NET. Developers familiar with PowerBuilder 7.0 or later will immediately recognize the DataWindow designer. The majority of the functions and methods are similar to PowerBuilder, albeit with minor changes to some of the language elements. Still, PowerBuilder developers will find DataWindow .NET 2.0 a fast and easy transition for developing data-driven MDI applications in .NET.
It's worth noting that since version 1.0 of the DataWindow appeared, Microsoft has closed the gap considerably with regards to designing and implementing grid-based forms. The latest release of Visual Studio 2005 simplifies creating grid-based forms while minimizing programming. Sybase's DataWindow .NET 2.0 still adds value for those developing data-centric applications.