DevPartner Fault Simulator: Simulate Faults in Your Code
Compuware's DevPartner Fault Simulator helps you make sure your code is as reliable as possible. Plus first looks at InstallShield 10.5 and other new products this month.
Compuware's DevPartner Fault Simulator helps you make sure your code is as reliable as possible. It generates exceptions and helps you evaluate how your code handles those exceptions (see Figure 1). Fault Simulator is integrated with Visual Studio .NET 2003 and supports C# and Visual Basic .NET. It offers limited support for Visual C++, and it supports Windows 2000, Windows XP, and Windows Server 2003.
Fault Simulator is easy and intuitive to install. It installs the .NET Framework for you automatically if you don't have it installed already. You will have to download a license file from Compuware to complete your installation. The software is easy to use once you take a few minutes to understand it. You can right-click on certain lines of code to see which exceptions that code can throw; Fault Simulator displays a jagged line beneath the code that supports this feature. I recommend going through the code and selecting all the faults you want to simulate before executing your application. Then start the Fault Simulator monitor and start your application. You will see how your code handles the exceptions thrown. You can use conditional logic to determine when faults are generated.
Fault Simulator provides a report outlining which exceptions were handled and how they were handled. The report is broken down into three tabs. The first tells you if your code was handled in the catch portion or the finally portion. It also lists the method name, the class, the source file, and the line number. The second tab features the call stack that gives you memory information associated with your function calls. The third tab tells you how your simulated faults were configured.
You can simulate environmental exceptions that are outside of the .NET Framework, including disk I/O, COM, network, and Registry exceptions. You can simulate these exceptions in unmanaged code, and you can keep them in a file called a fault set. Save the set so you don't have to re-create all that work each time you want to use the simulator. You can modify the fault set once it's created. It's possible to execute Fault Simulator through a standalone application or in scripts, which allow you to integrate the simulator into your nightly builds or automated testing.
The documentation is concise and easy to follow. It contains a small tutorial on structured exception handling that is excellent, especially if you're new to .NET programming. DevPartner Fault Simulator pays for itself easily in no time by increasing the robustness of your code.
DevPartner Fault Simulator
Phone: 800-521-9353; 313-227-7300
Price: Contact vendor for pricing.
Quick Facts: Simulates exceptions being thrown at various points in your code; you can execute the product in the IDE, standalone mode, or scripts.
Pros: Increases reliability, good informative reporting, tightly integrated with Visual Studio .NET.
Cons: Doesn't support managed C++.
InstallShield 10.5: Deploy Complex Apps Easily
by Don Kiely
Deployment can be one of the trickiest parts of software development to get right. InstallShield has long been one of the deployment-industry leaders, and its new InstallShield 10.5 Premier Edition is an impressive product. It is the first version released since Macrovision acquired the brand.
Not much looks different from the previous InstallShield X when you first start up InstallShield 10.5, but you soon realize the company has broadened the scope of the product and plenty is new (see Figure 2). Many of the new features support new technologies, including Windows Installer 3.0, MySQL databases, IIS Web services, and J2EE application servers. You can create deployment packages for all 32-bit versions of Windows, several flavors of Unix and Linux, and Mac OS 10.0 and later.
InstallShield has widened its support for deployment scenarios to include an Update Service so that users can check for updates to your software from within the app and be notified of new components. You can create trial-ware versions of your app without changing the source code, but this feature is not available for Java or .NET apps. The product offers support for MSI 3.0 so you can create patches for your apps and deploy them using Windows Installer.
InstallShield still lets you create and modify packages using wizards, various editors, and low-level tools. However, new features let you change XML files at installation, specify files that are always overwritten regardless of file date/time and version number, create local and network repositories of common installation elements, and modify Windows users and groups. Overall, I found this new version to be easier to work with and a bit more intuitive, although it took some time to learn to use the new features efficiently.
One of the best improvements to InstallShield is its help library. The company has reorganized it from a reference-based help system to a task-based system, making it easier to get help with a specific task. The descriptions are a bit terse occasionally, but for the most part, the help system is as enlightening as it should be for a product as complex as this one.
The one blemish in an otherwise great product is the InstallShield Update Service. No matter how many times I either installed or downloaded an update, it was never removed from my list of available updates. The feature seems to work fine for custom software products, so either the company hasn't fully implemented the update service for its own products or the feature has flaws.
With this new version, InstallShield has once again become my preferred deployment tool. I'll never use many of its features, but having this kind of breadth available means that I'll likely have the support I need for just about any scenario I face deploying my apps out to users.
InstallShield 10.5 Premier Edition
Phone: 800-374-4353; 847-466-4000
Quick Facts: Robust, cross-platform installation package and development tools.
Pros: Robust UI to access features; wide platform and scenario support; flexible approaches to custom tasks.
Cons: Update service problems; breathtaking price.
Don Kiely is a senior technology consultant. When he isn't writing software, he's writing about it, speaking about it at conferences, and training developers in it. Reach him at firstname.lastname@example.org.
TierDeveloper 4.0 Enterprise: Generate Middle-Tier Code Quickly
by Don Kiely
AlachiSoft's TierDeveloper 4.0 Enterprise Edition is an object-relational mapping and code-generation tool for enterprise applications. It supports most of the major database engines, including SQL Server, Oracle, and DB2, with more on the way. It includes both a standalone IDE and a designer integrated into VS.NET, and it can generate either C# or VB.NET code (see Figure 3).
At every step you can select which tables to include in the code output, customize the data types of each object's attributes, join tables in various cardinality relationships and nested parent-child relationships, and define custom hooks for pre- and post-data-access processing. One of TierDeveloper's biggest strengths is that you don't have to stay with the standard load, insert, update, and delete operations. You can define your own custom operations, ranging from calling custom stored procedures to defining bulk operations on the underlying data.
The main focus of the product is on generating middle-tier components you can use either locally or remotely through .NET remoting or Web services. TierDeveloper also generates rudimentary UI code for either an ASP.NET or WinForms application. The resulting UI is not something you'd want to deploy directly to users, but it's great for testing middle-tier objects, and you can adapt portions for your production UI. As part of the UI generation, TierDeveloper creates an XML file that maps object attributes to the UI so you can customize the resulting interface.
The XML file used to customize the ASP.NET or WinForms GUI is not well formed because it has a comment inserted before the XML declaration. The help file is not indexed or searchable. In some situations, the code generator doesn't produce the right standard data-access methods, because the associated constants are out of sync. This causes a compiler error that requires you to change generated code, which is overwritten if you regenerate the code. If you opt to generate stored procedures, TierDeveloper doesn't apply them to the database automatically, requiring an extra step.
There is no support for customizing the templates used to generate code, so you're stuck with what TierDeveloper produces (the company promises it for a future version). Worse, there's no easy way to customize the generated code so that your changes survive a regeneration of the project. As the database schema changes during development, typical projects require repeated regenerations and thus cause the loss of customized code.
Nevertheless, TierDeveloper is remarkably flexible with its options for generating code and its slick UI for setting options. This version is worth considering for initial code generation if you're willing to make changes manually to accommodate database schema changes and custom code. And once the company provides support for customizing the code-generation templates and protects custom code, this will be a killer tool.
TierDeveloper 4.0 Enterprise Edition
Phone: 800-253-8195; 925-236-3830
Quick Facts: A flexible middle-tier, code-generation and object-relational mapping tool.
Pros: Nice IDE that's both standalone and integrated with VS.NET; creative options for customizing generated code; support for major databases.
Cons: No protection of custom code; can't customize code-generation templates.
CMS400.NET 4.7Manage Web Content in .NET
by Ken Cox
Ektron CMS400.NET 4.7 is an enterprise-level Web site content-management system that is built on the .NET Framework and uses SQL Server or MSDE for storage. It offers productivity features for content providers, administrators, and Web developers. Users who write and edit Web content will appreciate Ektron's excellent online WYSIWYG word processor. eWebEditPro is implemented as an ActiveX control, and its installation page does a good job of walking unsophisticated users through browser security warnings. The work area's error handling could be improvedI eventually traced some oddball ASP.NET errors to a session timeout.
The workflow features appeal to administrators. An author can check in Web content and mark it for review by multiple approvers. An e-mail notification option alerts approvers to new content while informing the author of each step. You can avoid dated material by scheduling start and end times for pages. The convenient report section lists content that needs updating and tracks assigned tasks and the check-in status of pages.
CMS400.NET ships with a useful and attractive sample Web application that serves as a training ground. Its installation went smoothly until it tried to access the database. The documentation (in PDF format) says, "The installation program checks to see if MSSQL is installed on your server. If it is not, MSDE2000 is installed." However, I ended up installing and configuring the database engine myself. The setup, quick-start, user, developer, and administration manuals are polished and professional and include many possible error messages. It's unfortunate that CMS400.NET's Web interface doesn't offer the help text as context-sensitive HTML.
Chances are, you'll want custom branding in your content-management solution. You or a graphic designer can create templates using Visual Studio .NET 2003. To ramp up quickly, open the sample site in the VS.NET IDE, add the CMS400 server controls to your toolbox, and explore the existing pages with the developer guide at hand. The main server controls include Login, Menu, Calendar, FormBlock, and ContentBlock. These act as formatters and holders for XML and XHTML markup stored in the database (see Figure 1). You can add runtime text to a page by dragging and dropping the control and assigning the ID of the source content. A navigation tool, CMS Explorer, helps you locate the IDs for content blocks. The system's design permits unlimited transformations because you can dig right into the raw XML source.
Ektron's standard license keys are bound to a permanent URL, which means you could face hassles and expense if you need to move to a new domain. That said, CMS400.NET has many usability and convenience features that all members of the Web team will appreciate, whether their role is to install, develop, maintain, or deploy Web content on the .NET platform.
Phone: 866-435-8766; 603-594-0249
Price: $7,200 per URL for 10 users; $29,999 per URL for unlimited users
Quick Facts: Enterprise-level, content-management and workflow system built on the .NET Framework.
Pros: Easy to use for administrators, authors, and developers; excellent online word processor; supports workflow and content approval; professional documentation.
Cons: Missing some error handling; no context-sensitive online help; license tied to a specific URL.
Ken Cox is a programming writer and .NET developer in Toronto. Ken is an MVP for ASP.NET. Reach him at email@example.com.