Today I released 0.0.1 of a Savant template output controller I’ve been experimenting with.
It’s a simple package which automatically correlates objects with their Savant templates.
The paradigm I’m using is to build everything into an object with member variables for the changing/dynamic content. With this, each object has a corresponding template which will output the member variables. The Salty_Savant_OutputControl package automatically populates the Savant templates before they are sent to the client.
It also handles arrays of objects or strings, and even supports optional template output caching with Cache_Lite. Relatively few lines of code, but they really help out when you have 30 DB_DataObjects and want templates for each object to quickly work, and play nice with one another.
I think of this package as the quick bridge between your disparate logic and presentation.
I’ve included a simple example in the package, and I’d be interested in any feedback people have – whether I should have used a Savant plugin, if this is a good idea or bad, etc.
At any rate, I think it’s useful.
Check it out:
Salty_Savant_OutputControl