Template Engines and the future in web apps
by
, 03-10-2009 at 04:35 PM (992 Views)
I'm coding some projects, and I can only say that I actually love the php template engine Smarty. I have had discussions here on CodeCall and several taught it is a bad idea, but I find it wonderful. I just love the two layer functionality, and that it's already made, I don't have to re invent the wheel.
It gives me a lot of advantages, as I don't have to think about any outputs when writing my pages, I only have to think about pushing the relevant data to the template engine,
then, when writing the templates, I don't have to think about the coding at all, all I need to think of is how to do the layout and data placement. sure, it is a little but of looping through data for lists and everything, but it's pretty simple.
Sure, it might be a little bit slower than outputting the html directly from the php script, but in my world, millisecond performance isn't that important when it comes to web pages. a user doesn't care if it takes 0.023 or 0.099 seconds of server time. and the computers that runs these scripts, are usually so powerful, that it handles this without any problems.
But back to the template engine. some other things I really love is that is has built in support for simplify form makings, generate a select box from an array goes in one function call, just give the array as a parameter. the same with groups of radio buttons or checkboxes. it simplifies most of the output coding.
Your designer won't have to do much more than the divs and spans and the css to make the page work perfect, just add in a few variables into the code, and it's done, and as you can link templates to each other as include files, the framework of a page layout is done in one file, and the special layout on data pages is easily inserted into the "main part" of the page. the menu is as easily inserted and treated as a module, or how you want it to work.
For me, this is taking web development to a higher level.
Sure, Web 2.0 might have outran this technology, but then, it's a client application fetching server data, it's no longer a server generated - client visualized system, it's longer from thin clients than ever, as this becomes client-server applications in a browser. I don't say it's wrong, but is it what the world needs? or is this how the computer industry wants?
The fashion in thin clients comes and goes, probably so the existing thin client hardware shall be outdated til next wave of thin cliend fashion, so they can sell a new client, and in between the thin client waves, they can sell a new desktop computer as the thin client was taken out of business. This makes me think, that Web 2.0 might not be just a new way of making web pages...
so, that's all for now!










