
The author discusses that
code generation
is the core activity of any developer and his focus in this chapter will be on
code generation
tools. The author suggests to spend time on thinking about automating a repetitive task instead of doing it. The author then gives an example of generating stored procedures using a tool. The
code generation
tools are classified in two categories:
- Passive that dumps the code and forgets
- Active which are then classified in several other categories
- Code munger
- Inline-code expander
- Mixed-code generator
- Partial-class generator
- Tier generator
- Full-domain language
The author clarifies that
code-generation
is not just restricted to code but a variety of end products can be developed using the technology such as:
- Database access code
- User interface code
- Documentation
- Unit tests
- Web services
- DLL wrappers for legacy code
- Configuration files or initialization files
- Scripting files
- Installation files
The author then discuss a specific example of generating code directly from a database table using MSDataSetGenerator tool in .NET. The author then also provide a list of other tools available and briefly mentions their functionality. The author then provides an example of how he uses one of the
code generation tool
to help create code for his DownloadTracker application. The author then provides a list of pros and cons of using
code generation tools
.
No comments:
Post a Comment