Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-05-2011, 11:49 PM   #1
Senior Member
Registered: Dec 2003
Posts: 3,161
Blog Entries: 4

Rep: Reputation: 136Reputation: 136
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:

  • 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.

Last edited by vharishankar; 12-05-2011 at 11:52 PM.
Old 12-08-2011, 12:11 AM   #2
Senior Member
Registered: Dec 2003
Posts: 3,161
Blog Entries: 4

Original Poster
Rep: Reputation: 136Reputation: 136
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackbuild Template creator webpage Alexvader Slackware 3 11-02-2009 05:41 PM
from django.template import Template, gives output firedancer Linux - Newbie 0 11-30-2007 03:08 PM
Template class with a template member... Nicholas Bishop Programming 3 02-21-2005 09:27 PM
c++ template help ashirazi Programming 4 11-16-2004 09:52 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration