| |
| |
Preface | |
| |
| |
Acknowledgments | |
| |
| |
About this book | |
| |
| |
About the title | |
| |
| |
About the cover illustration | |
| |
| |
| |
Code generation fundamentals | |
| |
| |
| |
Overview | |
| |
| |
| |
A generation case study | |
| |
| |
| |
Benefits of code generation for engineers | |
| |
| |
| |
Benefits of code generation for managers | |
| |
| |
| |
The code generation process | |
| |
| |
| |
The buy/build decision | |
| |
| |
| |
Code generation at its best | |
| |
| |
| |
Top ten code-generation rules | |
| |
| |
| |
Generators you are using today | |
| |
| |
| |
Summary | |
| |
| |
| |
Code generation basics | |
| |
| |
| |
The various forms of active code generation | |
| |
| |
| |
Code generation workflow | |
| |
| |
| |
Code generation concerns | |
| |
| |
| |
Code generation skills | |
| |
| |
| |
Choosing a language for your code generator | |
| |
| |
| |
Summary | |
| |
| |
| |
Code generation tools | |
| |
| |
| |
Building generators with Ruby | |
| |
| |
| |
Parsing XML with Rexml | |
| |
| |
| |
ERb: a great tool for templates | |
| |
| |
| |
Building the language parser toolkit | |
| |
| |
| |
Summary | |
| |
| |
| |
Building simple generators | |
| |
| |
| |
The code munger generator type | |
| |
| |
| |
The inline-code expansion generator model | |
| |
| |
| |
The mixed-code generator model | |
| |
| |
| |
The partial-class generator model | |
| |
| |
| |
The tier generator model | |
| |
| |
| |
Generating for various languages | |
| |
| |
| |
Summary | |
| |
| |
| |
Code generation solutions | |
| |
| |
| |
Generating user interfaces | |
| |
| |
| |
The big picture | |
| |
| |
| |
Designing a good interface | |
| |
| |
| |
Workflow comparison | |
| |
| |
| |
A case study: generating JSP | |
| |
| |
| |
Technique: generating Swing dialog boxes | |
| |
| |
| |
Technique: generating MFC dialog boxes | |
| |
| |
| |
Design tips | |
| |
| |
| |
Tools for generating UIs | |
| |
| |
| |
Summary | |
| |
| |
| |
Generating documentation | |
| |
| |
| |
The importance of structured comments | |
| |
| |
| |
The big picture | |
| |
| |
| |
A case study: augmented SQL code | |
| |
| |
| |
Understanding the JavaDoc and the Doclet API | |
| |
| |
| |
Finding a tool to do it for you | |
| |
| |
| |
Summary | |
| |
| |
| |
Generating unit tests | |
| |
| |
| |
The big picture | |
| |
| |
| |
Preparing for common concerns | |
| |
| |
| |
A case study: augmented C code | |
| |
| |
| |
Technique: the ordered test generator | |
| |
| |
| |
Technique: the test data generator | |
| |
| |
| |
Technique: the test robot generator | |
| |
| |
| |
Finding a tool to do it for you | |
| |
| |
| |
Design tips | |
| |
| |
| |
Summary | |
| |
| |
| |
Embedding SQL with generators | |
| |
| |
| |
PerlSQL | |
| |
| |
| |
Preparing for common concerns | |
| |
| |
| |
Workflow comparison | |
| |
| |
| |
A case study: PerlSQL | |
| |
| |
| |
Finding SQL tools | |
| |
| |
| |
Summary | |
| |
| |
| |
Handling data | |
| |
| |
| |
Code generation versus a library | |
| |
| |
| |
A case study: a simple CSV-reading example | |
| |
| |
| |
Technique: data adapters | |
| |
| |
| |
Technique: binary file reader/writer | |
| |
| |
| |
Finding tools to do it for you | |
| |
| |
| |
Summary | |
| |
| |
| |
Creating database access generators | |
| |
| |
| |
Benefits of database access generators | |
| |
| |
| |
The big picture | |
| |
| |
| |
Preparing for common concerns | |
| |
| |
| |
Workflow comparison | |
| |
| |
| |
A case study: EJB generation | |
| |
| |
| |
Technique: generating JDBC | |
| |
| |
| |
Technique: generating database access layers for ASP | |
| |
| |
| |
Technique: generating database access layers for ASP.NET | |
| |
| |
| |
Technique: Generating database access classes for Perl DBI | |
| |
| |
| |
Technique: generating database access classes for PHP | |
| |
| |
| |
Off-the-shelf: AndroMDA | |
| |
| |
| |
Off-the-shelf: XDoclet | |
| |
| |
| |
Design tips | |
| |
| |
| |
Finding a tool to do it for you | |
| |
| |
| |
Summary | |
| |
| |
| |
Generating web services layers | |
| |
| |
| |
The big picture | |
| |
| |
| |
A case study: generating XML-RPC for Java | |
| |
| |
| |
Technique: generating SOAP | |
| |
| |
| |
Design tips | |
| |
| |
| |
Finding a tool to do it for you | |
| |
| |
| |
Summary | |
| |
| |
| |
Generating business logic | |
| |
| |
| |
A case study: generating Java business equations | |
| |
| |
| |
A case study: the report logic and interface generator | |
| |
| |
| |
Summary | |
| |
| |
| |
More generator ideas | |
| |
| |
| |
Technique: maintaining header files | |
| |
| |
| |
Technique: creating DLL wrappers | |
| |
| |
| |
Technique: creating wrappers for external languages | |
| |
| |
| |
Technique: creating firewall configurations | |
| |
| |
| |
Technique: creating lookup functions | |
| |
| |
| |
Technique: creating macro lookup tables | |
| |
| |
| |
Summary | |
| |
| |
| |
A brief introduction to Ruby | |
| |
| |
| |
The simple system test framework | |
| |
| |
| |
EJBGen code and templates | |
| |
| |
| |
Integrating code generation into your IDE | |
| |
| |
| |
Simple templating | |
| |
| |
| |
Patterns for regular expressions | |
| |
| |
Index | |