Build Your Own Templating System in Four Years

by chromatic

Jim Thomason has an excellent writeup at Perl Monks called The History of a Templating Engine. It's almost a rite of passage for Perl programmers to write a simple templating system, and novice programmers somehow universally fail to understand why writing yet another templating system is an exercise in pain, frustration, and usually unmaintainable, unremarkable code. Jim's account of the evolution of his system and the lessons he learned is, hopefully, a great bucket of cold water to cool those youthful urges.


3 Comments

peter renshaw
2006-09-11 16:29:37
Busted link. You can find the article (jimt) at: http://perlmonks.org/?node_id=572402


You can tell perlmonks is an old forum. If built now if would probably have a cooler url something along the lines of *perlmonks.org/monk/jimt/572402* which is much easier to write and locate.

chromatic
2006-09-11 17:13:00
Thanks, peter. I fixed the URL. It was a typo on my part.


(Did you know I helped build the software behind Perl Monks? Someday I do hope it gets better links.)

peter renshaw
2006-09-20 14:58:23
Hey Chromatic I think I sort of did [0], old perlmonker (& /.). I remember having a look through the source especially at schema level (not much to look at, everythings a node: less code, simplicity) and reading why you re-built it after slash. Urls are a minor consideration. I think the most interesting thing built in is the moderation system.


Did you know about the Dunbar number [1] and its implications when you built the system? (and experience with /., no doubt) I ask this because perlmonks runs with precision & order. Just like a monastry should. Compare this to /. (Jungle) and reddit (Urban jungle). The moderation makes a huge difference in sig/noise from the lower ranks. Something large new systems are just coming to grips with.


Reference
[0] Everything2.com, 'The E2 Backstory (idea)'
http://everything2.com/?node_id=1238158
[Accessed Thursday, September 21, 2006]
[1] lifewithalacrity.com, 'The Dunbar Number as a Limit to Group Sizes, Chistopher Allen'
http://www.lifewithalacrity.com/2004/03/the_dunbar_numb.html
[Accessed Thursday, September 21, 2006]