First Looks

Transform XML Visually

Visual XSLT 2.0 integrates seamlessly into the VS.NET IDE to provide a powerful environment for developing XML transformations and XPath queries.

Visual XSLT 2.0 is a multifunctional add-in to VS.NET for developing XML transformations and XPath queries. It integrates so well into the VS.NET environment that it's hard to tell where ActiveState's features start and Microsoft's leave off. After installation, a new Visual XSLT project type becomes available, and several new menu items appear, including XPath Workshop, Schema Mapper, and Template Matches. You can launch other features, such as the Visual XSLT debugger and output view, from existing IDE menus.

This tool can save you hours of the reference-lookup, development, and debugging time you'd spend performing some XML transformations by hand. Visual XSLT pops up lists of valid tag names, attributes, and values as you type, similar to VS.NET's code editor. You can type </ to close any element, and the appropriate end tag appears. You can locate a matching end tag by positioning your cursor (using the keyboard) before the opening < to show the closing > in bold. You can change the syntax-highlight colors to whatever scheme suits you. Some of these features aren't switched on by default in the IDE, but the Visual XSLT tutorial shows how to enable them.

The Schema Mapper starts a transformation by inferring the schema, based on your "before" and "after" sample XML content (see Figure 1). For example, if you want to move several element nodes in the source to attributes in the resulting file, you point the Schema Mapper to samples, drag the elements from the existing schema, and drop them onto attributes in the new schema. This saves lots of time and is easy to use, although moving and deleting mappings is tricky until you learn where to position the mouse on the design screen.

You can use VS.NET's Start Without Debugging feature to build transformations. If the output isn't right, you can put a breakpoint into the XSLT page and step through its code with the debugger—exactly as you would do with a .NET-supported language.

Another component, XPath Workshop, is a highly capable and interactive query designer. You can use it to drill down into your XML file, select a node, and let the tool formulate an expression that retrieves the value from the node. Or, you can try out expressions by entering them in the textbox to see the resulting node set.

Visual XSLT 2.0 is an excellent XSL package that works smoothly inside VS.NET. Unfortunately, its accompanying documentation needs an overhaul. The presentation appears unpolished because of its unnumbered procedural steps, cluttered layout, distracting "Things to Note" entries, and excessive copyright notices. ActiveState should provide quality, context-sensitive help that meshes seamlessly with Microsoft's user-assistance format.

About the Author
Ken Cox is a VB.NET developer in Toronto building e-commerce Web applications and XML Web services. Ken is a former broadcast journalist and a Microsoft MVP for ASP.NET. Reach him at [email protected].

Visual XSLT 2.0
ActiveState

Web: www.activestate.com
Phone: 866-866-2802
Price: $295
Quick Facts: VS.NET add-in for visual design and debugging of XML transformations and for creating XPath queries.
Pros: Well-designed, interactive, and integrated tools; easy to use; many time-saving features.
Cons: Documentation is unpolished and cluttered.

Create PDF Documents in .NET

Posted January 12, 2004

O2 Solutions' PDF4NET opens the world of Portable Document Format (PDF) documents—and a new approach to .NET reporting—to your applications. Its powerful yet easy-to-use class library allows you to generate and edit PDF documents from C#, VB.NET, or any other .NET language (see Figure 1).

Your applications can use Adobe's free and readily available Acrobat Reader to let users view documents you generate with PDF4NET. PDF is a reasonably compact, yet flexible, document format. It supports a variety of graphics, formatting, and linking options. PDF is almost as common as HTML, but offers the advantage that you don't need to worry about PDF's compatibility with multiple browser versions, as you do with complex HTML. However, PDF's special encoding makes the format a little more difficult to edit than HTML, so you can't edit it with a simple text editor, such as Notepad—you must use a special editing tool. PDF4NET turns VS.NET into a PDF editing tool.

The PDF4NET class library is easy to understand yet robust. However, you still must do quite a bit of work to create a lengthy document, as you would with any other complex format. You start by generating a PDFDocument object. You add PDFPage objects to create new pages and add other objects to your pages' canvas objects.

PDF4NET supports a wide variety of fonts and text-formatting options. You have the option of using HTML formatting sequences on your text. You also can place text within boxes easily and exploit PDF capabilities by defining outlines, page templates, watermarks, and customer page numbering. PDF4NET also lets you add links to locations within your current document, in external PDF documents, in other types of documents, and in Web pages.

PDF4NET provides extensive graphics support. It includes objects for defining lines, ellipses, arcs, and polygons. You have complete control over your lines' color, width, dashing, and other attributes when you draw an object. You can include JPEG, BMP, GIF, PNP, or EMF objects directly in your documents.

O2 Solutions' support staff is knowledgeable, helpful, and prompt. PDF4NET's help could be improved by integration of the help files into VS.NET. I'd also like to see the product's installation add links to PDF4NET's help to the Windows Programs menu. However, you should have little trouble understanding the PDF4NET documentation and the product itself. This is a useful and comprehensive tool that supplies an effective way to add PDF reporting to your .NET applications. No runtime fee is associated with PDF4NET, regardless of how widely your applications are distributed.

About the Author
Andy Clark is a consultant with iGate Inc. in the Richmond, Va., area. He holds PMP, MCSD, and SJCP certifications. Reach him at [email protected].

PDF4Net
O2 Solutions

Web: www.o2sol.com
Phone: +4-0-788-347-487
Price: $699
Quick Facts: Class library for creating PDF documents with VS.NET tools.
Pros: Easy to understand and use; no runtime fees.
Cons: Help does not integrate into VS.NET.

Cut Database-Management Costs

Posted January 12, 2004

Gupta Technologies' SQLBase 8.5 is a full-featured database management system for Windows and NetWare that focuses on reducing the total cost of database ownership. SQLBase comes with a full set of administrative tools and database-connectivity options. It implements standard SQL, including the SQL99 extended join capabilities.

SQLBase integrates its administrative tools—a server-management console, a connectivity manager, and SQLTalk—into a unified SQLConsole utility (see Figure 1). SQLTalk enables you to pass SQL commands to a SQLBase database. SQLTalk also implements extended SQL commands for viewing server statistics, formatting SQL reports, and tracing stored procedures.

SQLTalk is similar to SQL Server's Query Analyzer, and SQLConsole is similar to Enterprise Manager. SQLTalk and SQLConsole give you the tools you need to manage databases, but they require you to be more comfortable with SQL's Data Definition Language than you need to be when you use the Microsoft products. SQLBase implements far fewer functions through point-and-click interfaces than SQL Server.

SQLBase supports SQL99 syntax, so it allows the NATURAL JOIN as well as the INNER JOIN and OUTER JOIN clauses. The NATURAL JOIN allows you to use a foreign key to join two tables without specifying the key in the clause. For example, if you use the Dept_Id foreign key to join Employee to Department, the NATURAL JOIN uses the Dept_Id key without requiring you to type it in.

Gupta supplies a .NET data provider with SQLBase, as well as drivers for OLE DB, ODBC, and JDBC. The database is relatively easy to use from either VS.NET or VB6.

SQLBase minimizes administrative and support costs in several ways. It extends its file sizes automatically when necessary. It's designed to recover from system failures automatically and maintain database integrity with minimal database administrator (DBA) intervention. SQLBase also provides a silent-installation capability that's ideal for integration with turn-key applications.

Gupta Technologies' support staff is knowledgeable, prompt, and helpful. The documentation is solid, and SQLBase comes with a number of simple examples showing how to access the database within an application.

All of this makes SQLBase ideal if you create standalone applications and want the capabilities of a full relational database without requiring your customers to hire DBAs. You might also want to look into SQLBase if you work with distributed systems. Its ease of maintenance and installation could be crucial in supporting an application that's deployed to numerous servers. You'll find yourself doing more scripting to create database objects, but this isn't a bad thing when you're creating multiple database servers.

About the Author
Andy Clark is a consultant with iGate in the Richmond, Va., area. He holds PMP, MCSD, and SJCP certifications. Reach him at [email protected].

SQLBase 8.5
Gupta Technologies
Web:
www.guptaworldwide.com
Phone: 866-274-8782; 650-596-3400
Price: $393.99 single user from Programmer's Paradise
Quick Facts: Full-featured DBMS for Windows and NetWare systems.
Pros: Supports full SQL99 syntax; includes .NET data provider; reduces runtime administration.
Cons: Support tools less straightforward than SQL Server Enterprise Manager.

Manage ODBC Databases

Posted January 12, 2004

WinSQL 4.0 integrates a variety of powerful tools for database work into a simple standalone GUI product. These tools help you develop queries, understand and document databases, and manage families of related databases.

WinSQL works with Open Database Connectivity (ODBC) databases. Synametrics Technologies offers a set of optimized ODBC drivers with WinSQL that target Oracle 8i, SQL Server, DB2, Sybase, MySQL, and other relational databases. However, WinSQL works with any database that has ODBC drivers, including flat text-file databases.

WinSQL starts with a GUI that consists of a catalog pane and a query pane. The catalog pane displays a hierarchical grid that shows a database's tables, stored procedures, views, and other elements. The grid allows you to examine scripts, view table definitions, and even generate test data. You also can print the information in the catalog. The catalog pane's only shortcoming is that it doesn't show user- and permission-grant-related information.

You use the query pane to develop SQL statements. WinSQL passes the statements you enter on this pane to the database, then displays the results in a readable grid. You also can publish the results in HTML pages, export them in text files, or store them in a database. The query pane supports parameterized queries and has a number of features for saving your queries in standalone files or workbooks.

WinSQL includes a wizard for creating SQL statements, similar to the wizards supplied with Access and VS.NET. Like the Access and VS.NET wizards, WinSQL's is useful for creating simple SELECTs but not for building UNION statements or subqueries.

WinSQL comes with an impressive Entity Relationship diagramming tool (see Figure 1). This tool lets you select the tables in the diagram, displaying any foreign-key relationships defined in the database automatically while still allowing you to add relationships to the diagram. You can print diagrams or move them to the clipboard in order to paste them into an external application, such as Word or Paint.

You'll find several other useful tools in WinSQL. For example, the database difference tool compares two database schemas to identify differences and publish them in an HTML report. This tool is especially helpful if you work with distributed systems or synchronize between development and production databases.

Synametrics Technologies' support staff is knowledgeable, helpful, and responsive. WinSQL is an impressive product. I recommend it particularly if you do more with databases than develop SQL statements. The tools in WinSQL will shine if you find yourself designing and managing diverse database systems.

About the Author
Andy Clark is a consultant with iGate Inc. in the Richmond, Va., area. He holds PMP, MCSD, and SJCP certifications. Reach him at [email protected].

WinSQL Professional 4.0
Synametrics Technologies
Web:
www.synametrics.com
Phone: 732-605-7088 Ext. 1
Price: $179 (includes ODBC Drivers)
Quick Facts: A powerful set of tools for working with relational and flat-file databases.
Pros: Includes a variety of tools for building queries and working with database schemas.
Cons: Query Wizard is useful for simple queries but doesn't show information on database users and privileges.

comments powered by Disqus
Most   Popular

Upcoming Training Events