Welcome Guest, Not a member yet? Register   Sign In
No need for templating libraries
#2

[eluser]Colin Williams[/eluser]
Not sure I get the point entirely. This works if you ALWAYS want to use such a templating setup. By using _output() and doing nothing with the supplied argument, you are forced into using this system (not to mention bypassing caching). Kinda sucks if, say, I want to output something simple like JSON or simple strings. Granted, I still could, but it becomes a bit of a hack to do something as simple as printing a string. Using a template class lets you opt-in.


And it's false to say that your aren't using a templating library. You've just merged a very simple and rigid one into the Controller class.

The appropriate use of _output() is not to generate new output, but to run any necessary processes or manipulate what should be output.


Messages In This Thread
No need for templating libraries - by El Forum - 01-14-2009, 06:17 PM
No need for templating libraries - by El Forum - 01-14-2009, 06:37 PM
No need for templating libraries - by El Forum - 01-14-2009, 06:44 PM
No need for templating libraries - by El Forum - 01-14-2009, 06:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB