I've seen a significant amount of programming tools in my career and the list of tools that I actually keep in my toolbox over the long term is quite short. I feel like when I have too many tools, I'm dragging around a toolbox that is too heavy to be efficient. Not only do these things take space, but they also take resources and sometimes conflict with one another. One tool that I've consistently used in the last few years that I can't seem to go too long without is CodeSmith. CodeSmith is essentially a code generator. However it can be used for other tasks that include the automated generation of content based on any template. I've used it myself to generate automated database documentation and I must say that I am very happy with the performance, robustness and flexibility of the tool. CodeSmith also allows you to automate very interesting tasks, for example, we write providers for ASP.NET quite often here. While the reaction of a typical coder may be to simply create a template project, CodeSmith goes a lot further than this. Not only can you create a few classes on the fly (I've seen CodeSmith create hundreds of project files in less than two minutes) but you can also say point to an XML file or a Database and the tool (with the right template) can create anything from a provider to a complete BLL/DAL infrastructure just by reading the schema of the database. My favorite use of CodeSmith is to create those pesky DALs that are so repetitive in pattern but are always a bit different. I also use it to create the Stored Procedures to support these DAL classes. Not only can you use CodeSmith with SQL Server but you can also use it with other engines, such as MySQL.
Friday, December 05, 2008
Keep on typing code monkey
at
7:00 AM
Subscribe to:
Post Comments (Atom)


0 comments:
Post a Comment