by dools · 14y ago · 0 comments
So like, you'd want to be able to have something like:
<article>
<title><% print article.title %></title>
</article>
then do something like: $tpl->article = fetchSomeArticleFromTheDb()
$tpl->output('template_name',Format::PDF)
My argument to that would be that there's no realy need for that abstraction - you don't gain anything by it because you have to have some abstracted output engine that is capable of doing that HTML can already do, which is like, HTML :)Hey, I'd love to continue the discussion, but I think the HN comments are kind of limited in how much they want you to discuss here, feel free to email me iain@workingsoftware.com.au
EDIT: oops, code formatting
One of the useful applications of dools' ideas is that you could have a mockup which included lorem ipsums or other dummy text. This would make it easier for web developers to test layout.
OTOH, as I say, I am not at all convinced that it is a net win for programs that generate multiple formats of output./
I will probably post something on the selection and design of our templating system for LedgerSMB in my blog too (http://ledgersmbdev.blogspot.com) by the end of the week.