LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Resume creator - export options : template vs non-template approach (https://www.linuxquestions.org/questions/programming-9/resume-creator-export-options-template-vs-non-template-approach-917321/)

vharishankar 12-05-2011 10:49 PM

Resume creator - export options : template vs non-template approach
 
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:


Pros:
  • 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).
Cons:
  • 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. :)

vharishankar 12-07-2011 11:11 PM

I've gone ahead and used the template approach.

The advantages pretty much outweigh the disadvantages as I need no special libraries or anything special to export to a variety of different (text-based) formats. Simply using the string.Template class and about 200+ lines of code, I can export to practically whatever format I choose, provided I can write the template for it. :D


All times are GMT -5. The time now is 01:26 AM.