Use A Code Generator
If you need to create a bunch of code and don’t have a lot of time. One technique I use is to use a code generator to do most of the programming for you. I have used this process many times generating wire-frame HTML mock-ups or generating stubs for Struts or JSF applications.
By following the steps below you can create a code generator in any language:
- Create all your templates
- Add variables to all your templates where you want to add content
- Write a program to convert your templates to text files
- Populate your database, usually with a CSV/Excel file.
- Run your generator
For simple programs you will still need to create your basic template, but you can skip the database creation if you parse a CSV file, or maybe you can just pre-fill your data into arrays within your generator program.
Comments
No comments yet.
Leave a comment