First Looks

Add Charts With Ease

Dundas Chart for .NET is an easy-to-use tool for adding chart presentations to ASP.NET and WinForms applications.

Add Charts With Ease

Posted May 3, 2004

People can sometimes grasp a concept or information more easily when you present it to them graphically. This is exactly what Dundas Chart for .NET helps you do. You can use it to create effective chart presentations within WinForms or ASP.NET applications. The impressive array of supported charts includes some chart types you might not have even considered until you see them here.

Dundas Chart's minimum requirements are IIS 4.0 for ASP.NET, and 128 MB or higher of RAM for the WinForms version. The package runs on Windows NT 4.0, 2000, and XP, and it supports C# and VB.NET code.

You can choose between opening the Dundas Chart setup program from the product CD or saving it to a drive. I recommend running it from the CD, because the software doesn't take much time to install, and this way you don't copy files to your hard disk unnecessarily. The browser-based install is smooth and intuitive.

Once the installation is complete, you get a chance to see examples of Dundas Chart charts. The product's documentation presents remarkably intuitive and clear help and examples. In quick succession, you can select a chart style, see an example of that style, and view its source code. The documentation's Chart Gallery lets you see the types of charts at your disposal and pick the ones you want to use. When you select an item from the list of supported charts, you see a graphical representation of the chart with some tabs beneath it. After you choose a chart, you can click on the C# tab or the VB.NET tab to see the source code that generates the chart. You can work through a tutorial on chart elements if you're unfamiliar with creating charts.

Dundas Chart allows you to create a chart in two ways. The easier option is to use the Chart & Data Wizard in design mode when you create your forms (see Figure 1). The wizard lets you select a data source or data set to create your charts. (You can also give the end user the ability to use the Chart & Data Wizard.) Alternatively, you can create a chart with brute force by adding source code to your project by hand —an option that's a little more time-consuming but still relatively easy. This method gives you a way to add charts to an existing project and give your data a nice visual representation it didn't have before.

Dundas Chart gives you the tools to put together effective presentations in virtually no time. You might encounter a small learning curve for some of the charts, but nothing a little experimentation won't help you through. You'll find this easy-to-use package to be well worth the investment.

Dundas Chart for .NET
Dundas Software
Phone: 800-463-1492; 416-467-5100
Pricing: Contact vendor for pricing.
Quick Facts: Chart-creation package using C# or VB.NET for WinForms and ASP.NET.
Pros: Quick and easy to start creating charts; numerous chart styles to choose from; excellent documentation.
Cons: Slight learning curve associated with some of the less-intuitive charts.

About the Author
David Mack is a technical lead for the National Intelligence Division of Titan Systems and an independent consultant. He has more than 10 years of experience in object-oriented programming. Reach him at [email protected].

Add Help to Your Applications

Posted May 3, 2004

Macromedia's RoboHelp X5 simplifies a job you might tend to avoid: adding a help system to your application. RoboHelp provides powerful tools for creating help files.

The core of RoboHelp is an HTML editor similar to Microsoft FrontPage. You can author help files as families of HTML files, complete with hypertext links, folders, image maps, and other familiar Web UI concepts. RoboHelp includes a potent and straightforward HTML editor that supports the standard Web-page features, including fonts, cascading style sheets, and tables. It also supports links, text popups, mapped pages, and other Web navigation tools. RoboHelp also integrates Microsoft Word directly into its environment to let you use the Word editor to generate content.

RoboHelp provides many tools for tasks beyond basic editing, such as locating and correcting broken links (HTML links to missing URLs) and creating tables of contents and indexes. RoboHelp also lets you define browse sequences so that you can put together different sets of multipage instructions that reuse particular pages. For example, suppose your instructions for adding a new user consist of pages a, b, c, and d, while the instructions for adding a user to a group use pages b, c, e, and f. You could create sequences for each of these instruction sets without needing to create multiple copies of pages b and c.

RoboHelp shines at generating the actual help files. It supports a variety of help file formats, including WinHelp, WebHelp, Microsoft HTML format, XML format, and Macromedia's FlashHelp format (see Figure 1). FlashHelp is designed for cross-platform compatibility and rapid loading while supporting animation and audio. You don't need to know Macromedia Flash to use Flash inside RoboHelp. RoboHelp also allows you to set up conditional build instructions for using the same set of pages to generate printed documentation, context-sensitive help, and an online help facility—even though you might have different content for each of these. This capability could be vitally useful to any organization that works with families of applications that share similar UIs.

RoboHelp comes with superb documentation and good tutorials. The documentation includes instructions for integrating your help files with your application. RoboHelp includes several helper functions to facilitate adding context-sensitive help to your application. It also provides a number of reports that let you track how your users are using your help system and that enable user feedback to help you support your applications better.

RoboHelp is an impressive, mature product that's thoughtfully designed and full of useful features. It gives you all the assistance you could ask for in creating application help files—short of writing the actual help content for you.

RoboHelp Office X5
Phone: 800-358-9370; 415-252-2000
Price: $999
Quick Facts: Full-featured help-authoring system.
Pros: Easy to use yet extremely capable; has an excellent help system of its own.
Cons: Source-code integration samples are skimpy.

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].

Create PDF Files on ASP Web Sites

Posted May 3, 2004

AspPDF 1.0 is an ActiveX component that lets you read, create, and modify Portable Document Format (PDF) files on the fly and send the resulting file to an HTTP stream for a browser or to a directory for storage (see Figure 1). The control is licensed on a per-server basis for rapid generation of PDFs on ASP Web sites, but it should work in any application that supports COM. Note that this product generates PDFs using existing PDF files and/or computer code; it doesn't convert Word documents or PostScript files to PDF.

Consider a manual installation of AspPDF on your production server, because the setup routine creates an unwanted IIS virtual directory and prompts for a Web server restart after registering the COM component. You'll probably need to adjust file permissions or create your own web.config file to run the samples on your localhost. The license agreement shouts that you can only "use this product ON A SINGLE MACHINE," but, according to Persits support, the license actually allows use on two machines—one for development and one for production.

The AspPDF object model is well-defined and easy to manipulate. You use the top-level PdfManager object to create other objects such as a document, page, canvas, font, or parameter. Building a complicated PDF exclusively in code is a labor- and code-intensive process: You must retrieve text to insert into cells, add the cells to tables, put the tables into the page, then assemble pages into a document. You can create documents speedily by starting with a PDF page such as a form with blank areas. Use AspPDF's OpenDocument method to get a copy of the form page to use as a template. Then, you can fill in the blank areas with data from a data source or user input.

The hard part is "painting" the data to the exact coordinates on the page. A nice add-on would be a design-time tool that displays a static PDF and stores the coordinates as you visually pinpoint locations to insert data. If you have the full Adobe Acrobat product, it's far easier to assign data-input fields in the template PDF and reference them by name with AspPDF.

Generation of the resulting PDF is fast, whether you build the entire document in code or merge data with an existing PDF. You can write it to a temporary file for download through a hyperlink or push the document out on an HTTP stream. AspPDF supports the security features of the latest PDF releases, including passwords and encryption.

The online documentation for AspPDF is a series of HTML pages with adequate, realistic examples in VBScript and C#, but not VB.NET. HTML Help would be a preferable format because it provides search and index functions. Although the COM-based AspPDF works well for classic ASP sites as well as ASP.NET, a managed-code version for pure .NET applications would be a welcome addition.

AspPDF 1.0
Persits Software
Phone: 800-268-0689; 212-785-1611
Price: $299 for a single-server license
Quick Facts: COM component that reads, generates, and outputs PDF files to an HTTP stream or physical directory using ASP or ASP.NET.
Pros: Creates database-driven PDFs quickly; good samples; supports latest encryption and security standards.
Cons: Building PDFs in code can be labor-intensive; uses older COM technology; documentation doesn't cover VB.NET.

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

Speed Your Development

Posted May 3, 2004

Workstate's Codify 1.3 is a simple, inexpensive tool for using and building code templates. It's well integrated into VS.NET and comes with basic templates for C++, C#, and VB.NET (see Figure 1). You can also extend Codify to work with other languages outside of the VS.NET environment.

Templates let you standardize your team's development by adding predefined code to projects automatically. For example, if you want to ensure that all your classes support a tracing method, you can define a template that includes the code for tracing, then use this template for new classes. Templates also provide an effective mechanism for encouraging a variety of development standards and for promoting effective coding. Once you have an efficient template, reusing it ensures continued efficiency.

Another advantage to templates is that they can speed development by reducing time you might spend writing the same code repeatedly. Codify's templates are far more effective than copy-and-paste editing, because the product supports parameterized templates. For example, suppose you want to ensure that all your database-table-access classes use an identification property, but you know that the property name will change from table to table. In this case, you can make the identification property name a parameter, then fill in the parameter with an appropriate name for each new class.

Codify comes with predefined templates for creating remote application-configuration files, SQL Server stored procedure wrappers, class properties, strongly typed collections, Visual Studio add-ins, and a number of other useful operations. Codify is at its best within the Visual Studio environment, but it also includes a standalone editor. You'll also find a standalone file-builder tool for generating template-based code outside the VS.NET environment.

You do face a fair amount of work if you choose to build your own templates. Codify requires you to develop software for creating the generated code. Workstate provides a straightforward API and an editor for defining parameters, but it's up to you to use the API to implement your template. This isn't terribly difficult—and it does make Codify a flexible and efficient template tool—but you should be aware of the time you must invest up front.

Workstate's support team is responsive and knowledgeable. However, the company needs to improve the documentation for Codify. For example, the documentation for the template-generation API consists only of a documented sample template. The sample is thorough, but the API should still be documented fully within the help system.

Codify reflects thoughtful design and can generate a variety of template types. Once you've written your templates, you'll find them simple to use. Codify is a good, affordable choice if you're prepared to do the type of work that developing good templates requires.

Codify 1.3
Phone: 614-559-3904
Price: $75
Quick Facts: Basic tool for creating C#, C++, and VB.NET code templates.
Pros: Integrates fully into VS.NET.
Cons: Poor documentation.

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].


comments powered by Disqus

Subscribe on YouTube