First Looks

CodeSmith Professional: Generate Code Rapidly

CodeSmith Professional Edition is code-generation tool that uses a template-based approach with a syntax similar to ASP.NET's. Plus a quick look at Graphics Server .NET.

Nearly every non-trivial software development project has at least some code that you've probably written dozens of times: standard CRUD stored procedures, data-access code, objects based on your chosen framework, and so on. Any object-oriented application is a great candidate for using code-generation tools to create this kind of redundant code. CodeSmith Tools' CodeSmith 3.1 Professional Edition is the first commercial version of a freeware code-generation tool.

CodeSmith's template-based approach to code generation uses a tag syntax similar to ASP.NET's, making it a familiar environment for many developers (see Figure 1). The product comes with a variety of pre-built templates to get you started, including some for generating stored procedures based on a database schema, creating objects based on Rocky Lhotka's CSLA framework, creating common collections objects, and other common programming tasks. You can modify the templates as you wish or use any of them as a starting point for custom templates.

CodeSmith Professional Edition consists of two primary tools: CodeSmith Explorer and CodeSmith Studio. CodeSmith Explorer, available as both a standalone version and a VS add-in, provides a control panel for running templates, editing them using a text editor of your choice, and maintaining templates. CodeSmith Studio is a complete template development environment that includes a code editor that rivals that in VS. It also features tools to write .NET code using the CodeSmith API and build the template when you're ready. The company has done a great job providing template tools that any VS developer will be comfortable with.

CodeSmith, based on the .NET Framework, uses ASP.NET's tag syntax and allows code-generation automation using C# and VB.NET. CodeSmith can generate any kind of text-based files you want to create a template for, including stored procedures, Java, and documentation.

CodeSmith 3.1 includes a complete online help file that does a great job of documenting the product and providing a complete reference to its features. It'll take some work to learn how to use the product effectively, but the documentation, sample templates, and online forums provide all the help you'll need.

CodeSmith 3.1 is an impressive product. Eric Smith, CodeSmith's creator, recently teamed up with Rob Howard and Telligent Systems to form CodeSmith Tools to continue to develop the product. Given its current high quality and the new partnership, CodeSmith has a bright future.

CodeSmith 3.1 Professional Edition
CodeSmith Tools
Web:
www.codesmithtools.com
Phone: 214-420-1330
Price: $299
Quick Facts: Complete code-generation package based on templates and the .NET Framework.
Pros: Great tools for managing and editing templates; includes many usable templates; reasonably priced for the value.
Cons: Takes some time and effort to learn to use effectively.


Bring Your Data to Life
>by Andy Clark

Graphics Server .NET provides an outstanding set of tools for adding graphs to your VS.NET applications. These tools work within both WinForms and ASP.NET, and they support a large variety of graphs with an object-oriented API that is both powerful and easy to use. Version 2.5 adds support for widgets and other graphics devices that take charting well beyond the presentation graphics arena (see Figure 1).

Graphics Server .NET supports all of the standard graphs, including pie, line, area, bar, and Gantt charts. Most of these charts have both 2-D and 3-D versions. It also supports radar, scatter, polar, and a variety of other graphs you might not have heard of. All of these graphs are implemented with the developer in mind. You can control fonts, scales, captions, and overall style. Further, you can easily set the graphs to show lines at set standard deviations from the norm, a common requirement for quality measurements. You can also color-code unusual values automatically. You can configure these features at design time using Graphics Server's Chart, Layout, and Style designers. The WinForms version of Graphics Server .NET also provides property pages that allow users to modify chart characteristics at run time without any additional developer code.

Graphics Server .NET 2.5 goes beyond presentation graphics to support widgets, which are special devices such as thermometers, meters, gauges, and sliders that you can use for dashboards or as special controls. These devices support a rich event interface so that you can allow users to modify data directly using widgets. The devices can also help users make quick observations about important status variables.

Note that there is strong support for event-based development throughout Graphics Server .NET. As you would expect, some events are available in the WinForms version, but not the ASP.NET version. However, the ASP.NET version provides tools for managing the large number of images that can pile up on a Web site. Graphics Server draws a new image and stores it on your Web site whenever a user creates a new graph. Graphics Server provides properties to prevent these image files from building up.

Graphics Server's support is both responsive and knowledgeable, and the product documentation is excellent. It features both introductory and reference documentation and lots of sample code for both C# and VB.NET. All of this is integrated into a Resource Center that does a good job of showcasing what is possible with the product's amazing variety of graphs.

Graphics Server is an impressive product that supports many different graphs in ASP.NET and WinForms, as well as custom-developed graph types. It's easy to use and strongly supported. I would like to see a document that clearly delineates what requires additional scripting in ASP.NET, but you can deduce most of the differences between WinForms and ASP.NET with a little common sense. Graphics Server .NET is a strong tool for helping your users understand and manage their data.

Graphics Server .NET 2.5
Graphics Server Technologies
Web:
www.graphicsserver.com
Phone: 800-231-1293; 206-625-6900
Price: $2,999 (site license)
Quick Facts: Adds support for a variety of graphs to WinForms and ASP.NET.
Pros: Supports a wide variety of graphs with lots of flexibility.
Cons: Documentation doesn't clarify which functions require additional scripting within ASP.NET.

About the Author

Don Kiely is a senior technology consultant in Fairbanks, Alaska. When he isn't writing software, he's writing about it, speaking about it at conferences, and training developers in it. Reach him at [email protected].

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube