P.S. I use template in the sense of text or document templates - not in the programming sense as used in C++ or other OO languages.
Since I'm creating my resume creator program in Python, I had a few options for saving the data in native format. I've decided to go with JSON for reasons already outlined in an earlier thread.
But the real utility of this kind of program is the ability to export to USEFUL document format that people will actually send to potential employers etc. I had a couple of thoughts about this.
Pros of a text templating system:
- I can pretty much export in whatever format I want by just using the template files. The actual exporting code need have no knowledge of the format itself. It can simply read the template files, do the text substitutions and generate content inside the tags and so on and be done.
- Templates can be customized so it's possible to have a variety of templates for a Resume to suit each person's need.
- Templates make it easier to generate a lot of different outputs. Thus creating more templates in different types of formats will extend program functionality without the necessity to add more code.
Cons of templating system:
- Complex and difficult to understand for lay users.
- Makes the front end to the "export" functionality probably a bit too generic for average users.
- Not possible to have binary export formats or very complex to achieve this.
- May be TOO flexible or overkill.
The other option is simply to do a generic export function but without the option to use templates. This will mean:
- Export functionality is simpler from end-user point of view. No mucking around with custom templates etc.
- End user must simply edit the exported document to customize it. This may be a more understandable workflow for lay users.
- Possible to export to binary formats (templating systems depend on text format).
- Very rigid exporter: no possibility to customize document appearance or styles.
- More of the functionality of the exporter is hard-coded into the actual program rather than being available to end user. Maybe a few options can be exposed, but still requires more coding than templating system.
- Not possible to extend functionality of exporter without adding a lot of extra code.
Currently I'm leaning towards the first option (that of using templates), but the issue is that it is more complex for end users to manipulate templates etc. for customization of templates, but it allows me to supply some basic templates as examples with my program and allow the end user to go from there.
Any more inputs will be much appreciated in regard to using templating systems.
Also any suggestions regarding text templating systems for Python will be much appreciated.