Ajax; Templating; and the Separation of Layout and Logic
Contents:
The Background
I have often mentioned my process of expanding my proficiency of Ajax. Through my journey I have made a number of wrong turns and hit my share of stumbling blocks. All of that has been a learning experience and I'm learning still. I began fiddling with XMLHttpRequest as many do - blissfully ignorant of the many frameworks that exist to make Ajax super easy. My code was bloated with some neat...'features' (pronounced: bugs).
Then I discovered the Simple Ajax Toolkit (SAJAX), which was simpler than doing raw XMLHttpRequest but really not all that simple. My latest step into the world of Ajax, and the toolkit that holds my love (currently) is Prototype...and I like my Prototype served with a side of Script.aculo.us. *drool* UPDATE: I now use jQuery for all my Ajax and DOM manipulation goodness.
While Ajax is the cause for the article, the heavy focus is on templating. For the past few years I have been using XTemplate as my templating library (I'm a PHP buff) and have been happily separating my logic from my layout...unitl I ran smack dab into the power of Javascript. My PHP still kept its separation from HTML as is the purpose of XTemplate, but it was my HTML that became littered with little nuggets of Javascript all over the place. No matter the method to my Ajax madness, this was my problem.
What Exactly Is Templating And Why Do It?
Templating is definately not new and its use has been debated back and forth for quite some time. But like I stated above, the goal of templating is to keep logic separate from layout which is a good thing for a couple of reasons:
- Less clutter. Face it, HTML and whatever server-side scripting language you choose to use are two different beasts. Mixing them together is visually unappealing making code hard to read...and hard to read code is hard to debug.
- Coders can develop code. Designers can develop layout. With templating, you are able to achieve this separation and avoid the need for a developer to butcher a designer's layout to make it function with an application. Each can design/code on their own then combine their efforts with ease.
- With separation such as this, applications are more easily skinned and/or receptive to complete UI overhauls.
- Did I mention less clutter?
Let me give you an example of what I mean with a simple Goodbye Cruel World application:
Here's the PHP script: goodbye.php
-
<?php
-
include('xtemplates.php');
-
-
$tpl=new XTemplate('goodbye.tpl');
-
$tpl->assign('CHEEZEWHIZ','Bork, bork, bork!');
-
-
$tpl->parse('main');
-
$tpl->out('main');
-
?>
Here's the Template: goodbye.tpl
-
<!-- BEGIN: main -->
-
<div style="font-size:18px;font-weight:bold;">Goodbye Cruel World! {CHEEZEWHIZ}</div>
-
<!-- END: main -->
Here's the output:
Goodbye Cruel World! Bork, bork, bork!
Obviously that is an extremely simplistic example. With XTemplates I can get pretty complex and include files, loop over and parse out some complex block structures, assign arrays into template variables, etc. If you want to see a more complex example of a template, check it out here.
Templating Seems Sexy, How Does It Work In An Ajax-ified Environment?
I thought you'd never ask. For this, I have created a diagram to detail how I combine Ajax, PHP, and Templating all in one.

It all works like this:
- A User makes a request to view a page
- The server-side script calls a series of application functions that generate blocks of templates
- Each section that can be updated/rendered by Ajax calls are separated into their own templates, which enables them to be called on initial page load and separate Ajax-triggered calls from the client.
- The complete template blocks are sent to the user as a rendered page.
- As the user interacts with the interface, two specific things can occur:
- An Ajax.Updater (see Script.aculo.us) is triggered, which makes an Ajax callout. The callout is sent to the Ajax Handler (which is a PHP script) which handles the call and invokes the appropriate application functions. Those functions initialize template blocks and output HTML. The HTML output by the server is received by the client and inserted into the User Interface.
- An Ajax.Request (see Script.aculo.us) is triggered, which makes an Ajax callout. The callout is sent to the Ajax Handler (which is a PHP script) which handles the call and invokes the appropriate application functions. No templates are initialized or output to the client...instead, the client manipulates the DOM on its own to give proper feedback to the user.
- Rinse and repeat as needed.
If we keep all HTML within templates and use modularized functions to initialize and render those templates, we achieve extreme layout/code reuse.
Sounds Cool...So What's The Problem?
Well, a server-side scripting language coupled with a templating engine is all well and good. But if as we throw Ajax into the mix, suddenly we are working with a lot of Javascript in addition to the a server-side language and HTML. Through my journey in Ajax development my templates - which were havens away from code - were overrun with Javascript code! Eegad.
Now, don't worry. I place my Javascript in separate Javascript files and include them where appropriate with ye olde <script> tag, which I have done from the beginning. No, the issue has been handling user events; onClick, onMouseOver, onMouseOut, etc. Ajax functions primarily based on user interaction, so onClicks and whatnot are core. My templates soon began to look like this:
As you can see, the once separate layout was laden with code.
The Solution
In a fully layout separate from logic in an Ajax environment, you need to make use of Javascript event handlers. My personal choice is Behaviour which my friend, Zach, posted about yesterday.
Behaviour (coupled with Prototype) gives you easy-to-follow separation of javascript and HTML. Hugely cool. Hugely useful. Here's an example:
The HTML:
The Javascript:
-
var myrules = {
-
'#example li' : function(el){
-
el.onclick = function(){
-
Element.removeChild(this);
-
}
-
}
-
};
-
-
Behaviour.register(myrules);
That example creates a bulleted list (as is readily obvious in the HTML code). What nifty is the Behaviour Javascript logic. myrules says that any <li> tag with a parent id of #example will have an onclick that causes the li tag to be removed.
And of course, besides Behaviour there is a slew of other solutions that when combined together make for a sweet, modularized, separated solution. Here's what I use for my PHP/Ajax applications:
- XTemplates (PHP Templating Library)
- Prototype (Ajax/Javascript toolkit)
- Script.aculo.us (DOM manipulation library built on Prototype)
- Behaviour (Event library)
Here are some standards I stick to:
- Keep CSS (.css) styles separate from the Template files
- Keep JavaScript (.js) files separate from Template files
- Keep HTML in the Template, don't spatter it around the PHP scripts
- Modularize as much as possible
- Heavy Code reuse
The Drawbacks
Obviously in a Templated/Event Handled environment there are some drawbacks and I'd be stupid not to mention them. Here goes:
- There is some overhead when using a templating engine. With XTemplate, the layout engine is a PHP class that loads the template and parses through it as dictated by the application functions
- True separation - separating out your Javascript into .js files, your CSS into .css files, your server-side scripts into various files (the initial script, a functions script, and your ajax handler(s)), and your layout into template files - generates a lot of files to deal with. The larger your application, the more you will need to micro-manage the organization of these files, which in and of itself can be a daunting task.
- Ummm...I can't think of any more just yet. I'm sure more will come when I've lived in this environment a lot longer.
Summary
Layout and Logic separation is a beautiful thing; keeping one language from another has some true value in readability. To do it half-way gains you nothing. True separation has been a blessing in my development and debugging. If you haven't at least tried it, check it out, it may be what you were looking for (even if you didn't know it).
Oh and a definate Kudos to Zach Tirrell for starting me down the road of templating and Gmail/Google Maps/Casey Bisson for driving me to check out Ajax.
Discuss This Article
|
|
146 Responses to “Ajax; Templating; and the Separation of Layout and Logic”
-
pingback:
Posted: Mar 14th, 2006 at 7:26 amAjaxian » Ajax Templating - Seperation of Layout and Logic 1 -
mph
Posted: Mar 14th, 2006 at 8:18 amReply to this comment.What software did you use to make that diagram?
2 -
pingback:
Posted: Mar 14th, 2006 at 9:42 amSam’s random musings » Ajax Templating - Separation of Layout and Logic Reply to this comment.[…] rel=”lightbox”> In this informative blog entry, BorkWeb.com shares a method for creating a templating system generated wholely with Ajax and PHP. […]
4 -
Morgan
Posted: Mar 14th, 2006 at 10:09 amReply to this comment.This is a great article. It appears that my own investigations into this stuff is following yours. I have been giving a lot of thought on the best way to implement an API for my PHP scripts that are called by my AJAX requests. I recently wrote up a short blurb on my intoroductory thoughts to this, I called it a “pseudo-framework” and named it SWAP (Services with AJAX and PHP).
http://morgan.blizzo.com/?p=23I like the idea of a templating engine, but smarty has always seemed like overkill, I will shamelessly rip you off and investigate your spproach :)
5 -
dylan
Posted: Mar 14th, 2006 at 1:25 pmReply to this comment.Good article. I work with ASP.NET and do a similar thing: I have webcontrols that output xml and then pass that through an xslt. The xslt has all the html in it (no html in compiled code). The javascript layer then applies all the events to the html from a separate .js file.
I hear the development line of prototype.js has a $$() function that will do the same thing as Behaviour.js, but it’s not yet on their release version. I’m looking forward to not having to include the extra Behaviour library. Something to keep an eye on for the next prototype.js release.
6 -
Justin
Posted: Mar 15th, 2006 at 12:29 pmReply to this comment.Great walk through. Behaviour looks pretty cool, maybe I’ll give it a try.
I’ve been thinking about PHP templating for a year or two since I started using smarty. The more I use it the more I think to myself: Why don’t I just use php it is already a templating engine. Here’s my reasoning:
1) PHP is a templating system natively.
2) Adding an extra layer of code on top of PHP just slows it down.
3) You can easily seperate out your php scripts that generates UI from application logic just the same as you do with your templating engine.
4) You can still load your templates up with whatever variables you want.
5) Is it really any harder for a designer to have to deal with little php fragments as apposed to some templating engines syntax? Debatable I guess.The one reason I see to use templates is caching of rendered content. However, for web sites with highly dynamic content caching can’t be used much.
With PHP: Templating engines get you in the habit of separating your UI from your application logic but once you make that realization you don’t actually need the seperate templating system.
7 -
Arnaud
Posted: Mar 17th, 2006 at 2:47 amReply to this comment.You might want to have a look at savant (http://phpsavant.com) which is “a powerful but lightweight object-oriented template system for PHP. Unlike other template systems, Savant by default does not compile your templates into PHP; instead, it uses PHP itself as its template language so you don’t need to learn a new markup system.”
One thing a template system should give you is output escaping without having to write htmlspecialchars all over the place.
Good ressources: http://www.phpwact.org/pattern/template_view and the comments at http://www.sitepoint.com/blogs/2005/07/26/savant-template-engine/
8 -
sp
Posted: Mar 17th, 2006 at 2:34 pmReply to this comment.I`m fond of diagrams and graphics :)
http://mechanicalmind.ru/selectpost.php?id=209 -
sp
Posted: Mar 17th, 2006 at 11:41 pmReply to this comment.I`m sorry, I`ve missed your 1.0 version.
Besides, I think classic server-side templating is somethink like “web one-with-a-half” :).11 -
pingback:
Posted: Mar 18th, 2006 at 12:20 amNeil Mix » Reply to this comment.[…] Interesting while not too surprising: behaviors are a great way of separating logic and content. I guess those wacky Microsoft people might have had a clue after all. And they even used CSS selectors to manage the application of behavior to elements. I’ve always marveled at the design of I.E. DHTML behaviors. WAY ahead of its time. […]
12 -
pingback:
Posted: Mar 18th, 2006 at 12:18 pmwarpedvisions.org » Blog Archive » Ajax and templating Reply to this comment.[…] March 18th, 2006 in Links An article on Ajax; Templating; and the Separation of Layout and Logic. […]
13 -
pingback:
Posted: Mar 19th, 2006 at 2:08 pmaNieto2K | De todo un poco » Lo último de lo último en Ajax Reply to this comment.[…] El ajax en Templates Pretenden separar el layout de la lógica … demasiado complejo […]
14 -
pingback:
Posted: Mar 19th, 2006 at 3:37 pmWordpress » Blog Archive » Ajax Templating - Separation of Layout and Logic Reply to this comment.[…] In this informative blog entry, BorkWeb.com shares a method for creating a templating system generated wholely with Ajax and PHP. While Ajax is the cause for the article, the heavy focus is on templating. For the past few years I have been using XTemplate as my templating library (I’m a PHP buff) and have been happily separating my logic from my layout…unitl I ran smack dab into the power of Javascript. My PHP still kept its separation from HTML as is the purpose of XTemplate, but it was my HTML that became littered with little nuggets of Javascript all over the place. No matter the method to my Ajax madness, this was my problem. […]
15 -
pingback:
Posted: Mar 21st, 2006 at 9:29 pmBorkWeb » Oooo event:Selectors for Prototype Reply to this comment.[…] My article on the Separation of Layout and Logic touched on a key point of heavy Javascript use in an Ajax rich environment…the need for separation of Javascript code - namely events - from the HTML. Behaviour was my suggested CSS/Javascript event selector framework. […]
16 -
pingback:
Posted: Mar 22nd, 2006 at 6:02 amBorkWeb » A Simple Server-Side Ajax Handler Reply to this comment.[…] In my recent post on ‘Ajax; Templating; and the Separation of Layout and Logic,’ I refer to an Ajax Handler that sits server side to handle Ajax calls. Some elaboration is in order. […]
17 -
pingback:
Posted: Mar 23rd, 2006 at 6:11 pmAjaxian » Writing Your Server-Side Ajax Handler Reply to this comment.[…] Following up on his previous article on Ajax templating, Matthew Batchelder has posted the other half of the equation - the PHP script that responds to the Ajax requests. In my recent post on ‘Ajax; Templating; and the Separation of Layout and Logic,’ I refer to an Ajax Handler that sits server side to handle Ajax calls. Some elaboration is in order. […]
19 -
pingback:
Posted: Mar 24th, 2006 at 8:55 pmBorkWeb » Practicing What I Preach Reply to this comment.[…] MasterWish was built using SAJAX as the tool of choice for Ajax communication but as I’ve mentioned in the past, I am a Prototype convert. My knowledge of Ajax, JSON, and general application structure has been morphing so much in recent weeks that I have held off in completely revamping the wish list site. […]
20 -
pingback:
Posted: Mar 24th, 2006 at 9:15 pmWiredPress » Archive du blog » 웹서비스 플랫폼 Reply to this comment.[…] BorkWeb.com에서 웹2.0의 주요 구현 기술 플랫폼을 나타내는 한장의 그림을 보았다. 클라이언트-서버기반 기술은 여전하지만 아래의 그림을 보면 Ajax 플랫폼이 특징이라고 할 수 있다. 조만간 Ajax 플랫폼들이 나올 것이라고 한다. 그러나 무엇보다도 중요한 것은 고객의 경험이 우선이라는 것이다. 경험을 극대화할 수 있는 서비스와 플랫폼이 사랑(?)받을 것으로 본다. 그것이 유선 서비스이든 무선 서비스이든… […]
21 -
trackback:
Posted: Mar 26th, 2006 at 5:51 amAnonymous Reply to this comment.BorkWeb Ajax; Templating; and the Separation of Layout and Logic…
While Ajax is the cause for the article, the heavy focus is on templating. For the past few years I have been using XTemplate as my templating library (I’m a PHP buff) and have been happily separating my logic from my layout…unitl I ran smack dab in…
22 -
pingback:
Posted: Mar 27th, 2006 at 9:13 pmOne Measly Dollar » Blog Archive » links for 2006-03-25 Reply to this comment.[…] Ajax; Templating; and the Separation of Layout and Logic Responding to Ajax calls with a PHP script. (tags: ajax php howto) […]
23 -
Samad
Posted: Apr 27th, 2006 at 4:05 amReply to this comment.Hello,
I have some trouble with Event:Selectors, xtemplate and scriptaculous :(I can’t separate Javascript from html using Event:Selectors, it doesn’t handle events.
Can you give us a simple example how to use all this tools together, a simple script would be nice :)
Thx a lot.
Samad : Samads@hotmail.fr24 -
Samad
Posted: Apr 27th, 2006 at 6:20 amReply to this comment.Here is an example :
It doesn’t work and i have a JavaScript error :
Erreur : syntax error
Fichier source : http://test/ajax/scriptaculous/samad2.php
Ligne : 1, Colonne : 33
Code source :
new Ajax.Request(’php_call.php’, );but it works when :
asdfcan someone help me plz :)
25 -
Samad
Posted: Apr 27th, 2006 at 6:49 amReply to this comment.damn, sorry te code is :
when the error occured :
new Ajax.Request(’php_call.php’, {method:’post’, postBody:’thisvar=true&thatvar=Howdy’, onSuccess:handlerFunc, onFailure:errFunc});this one works :
new Ajax.Request(’php_call.php’);in the tpl file.
26 -
Samad
Posted: Apr 28th, 2006 at 2:16 amReply to this comment.Thx.
I’ve tested your example and manage mine and it works ;)
For the Xtemplates example, it will be nice !! yep i’m still loooking for it plz :)
Thxa lot
28 -
Raymond Julin
Posted: Apr 30th, 2006 at 5:22 amReply to this comment.Thats all nice but it doesnt really solve much. You are not talking about templating in terms of javascript/ajax here, rather just templating in php and not cluttering your html with onClick handlers. We all know onclick is bad obtrusive js.
Personaly i’ve started using dojo toolkit which lets me do something like this:dojo.event.connect(document.getElementById(’tagToAddOnclickTo’), ‘onclick’, ‘handlerMethodRequestsAjax’);
That removes all need for onclicks etc and uses events instead, all nice and fine.
However its not good practive to call a php script every time you modify the page layout, and when you call that php script you certainly dont want it to return prefabricated html code (keyword: reuse).
So, you send xml or json and then render the page using javascript and modifying the dom.
This is where templating would be nice, now i hack together the html to be inserted like:var html = ‘
- ‘;
html += ‘‘;
…If we could get that bit templated for reuse it would be really cool, i’ve solved it by creating dedicated rendering objects whos only task is to render the code for the passed collection of data, but thats not good enough for heavy a heavy ajax site. Specialy when im really working mostly with php and use templating for everything then this javascript stuff feels itchy :)
29 - ‘;
-
Raymond Julin
Posted: Apr 30th, 2006 at 5:28 amReply to this comment.Woops, looks like that broke the comment feature. You’ll get the point anyway ;)
30 -
pingback:
Posted: May 1st, 2006 at 9:03 amdhruba.net :: Binary Thoughts » Client side templating and its implications on Web application development Reply to this comment.[…] “What on earth is that” was my first reaction when I read about it. In fact what I am talking about here is the complete separation between JS and HTML. Your initial reaction might be, as mine was, to ask why? Surely, client-side code doesn’t need to be separated from client-side code? Does it? Surely it becomes even less compelling when you’ve got the same developer working on both which is normally the case? Is this separation even possible given that JS must latch onto event declarations in HTML in order to act upon them? […]
31 -
Content Management
Posted: May 4th, 2006 at 6:57 amReply to this comment.It helps a lot to have template and code separate - specially in maintenance and when you want to re-use the code.
32 -
Trope
Posted: May 29th, 2006 at 8:38 amReply to this comment.You used PHOTOSHOP????? Wow.
Nice article.
33 -
pingback:
Posted: Jul 7th, 2006 at 12:34 amSchone HTML met Javascript | Scriptorama Reply to this comment.[…] Deze ‘rules’ gelden voor id “list” en bijbehorende list items (<li>). Bij een onclick event wordt de functie click() aangeroepen. Dankzij Behaviour worden er bij kliks op de links functie click() aangeroepen en dit allemaal zonder enig Javascript code in de HTML. Let wel op dat je de bestanden op de juiste volgorde binnenhaalt! Je kunt natuurlijk meerdere rules aanmaken en ook andere events gebruiken. Zie de Behaviour documentatie voor meer informatie. Naast de eerder genoemde voordelen, heb je in feite ook je Javascript logica gescheiden van je HTML presentatie. Met andere woorden, een simpele template engine. Op Borkweb vind je een uitgebreide AJAX template engine, zeer net! Natuurlijk met Behaviour en iedereens favoriete Javascript library Prototype. […]
34 -
pingback:
Posted: Aug 15th, 2006 at 4:42 pmBorkWeb » Learning What I Know Reply to this comment.[…] Development. XHTML, CSS, Javascript, PHP and MySQL…I do it all, however, I did not learn them all at once…but over a series of years. I think the key concept is to really try and keep your logic from your design - keep the MySQL/PHP side of things separate from the XHTML/CSS side of things ( e.g. Ajax, Templating, and the Separation of Layout and Logic). Javascript is a bit of a wildcard and bridges between both the presentation and logic. […]
35 -
pingback:
Posted: Sep 22nd, 2006 at 8:48 amBorkWeb » Remote JavaScripting Example - Part I Reply to this comment.[…] At Plymouth State we work in a multi-server environment and often wish to display dynamic content from one server in an Ajax-like fashion on another server’s website. My co-worker, Zach Tirrell, and I have drummed up a solution that works to keep our layout and logic separate, while still serving our end users in a smooth, seamless, non-iFramed manner. […]
36 -
pingback:
Posted: Oct 10th, 2006 at 10:00 amBorkWeb » The Ajax Experience Reply to this comment.[…] MasterWish - a one and a half year old brainchild of a couple of other developers and myself - has been my playground after work hours. I began my experimentation with Ajax using that site, as PSU tended to slap my hand when looking into Ajax at work. Through that experimentation, I began to understand the workings of Ajax and how it would work into the PHP/Templating environment I was so comfortable with. Once I had dug down, I promptly posted my “Ajax; Templating; and the Separation of Layout and Logic” article that Ajaxian blogged about, along with the follow-up article. […]
37 -
katalog
Posted: Oct 15th, 2006 at 3:10 amReply to this comment.I`m sorry, I`ve missed your 1.0 version.
Besides, I think classic server-side templating is somethink like “web one-with-a-half” :).38 -
Tim
Posted: Nov 16th, 2006 at 9:09 amReply to this comment.Hi,
I just finished writing about my approach to templating. It is something I call PTE, short for Php Template Engine. It is a way to use Php as the template engine instead of having a template engine that has to parse a file I use Php to parse the file. It’s not a new approach, but I think I have a few ideas on how to make it work well.
- Tim
http://www.ThePhpPro.com39 -
Pokoje Gościnne
Posted: Apr 16th, 2007 at 11:12 amReply to this comment.Which good book about AJAX, You can reccomend?
40 -
Pizzeria
Posted: May 24th, 2007 at 7:57 amReply to this comment.AJAX RULES js go home :)
Jelonka
41 -
Martino
Posted: Jul 2nd, 2007 at 9:19 amReply to this comment.Thanks, i was desperately looking for that info!, great and excellent article, it’s realy helpful. Covering some points I really needed, really useful.
42 -
Ablaze
Posted: Oct 3rd, 2007 at 3:07 pmReply to this comment.hats all nice but it doesnt really solve much. You are not talking about templating in terms of javascript/ajax here, rather just templating in php and not cluttering your html with onClick handlers. We all know onclick is bad obtrusive js.
Personaly i’ve started using dojo toolkit which lets me do something like this:dojo.event.connect(document.getElementById(’tagToAddOnclickTo’), ‘onclick’, ‘handlerMethodRequestsAjax’);
43 -
harun kaya
Posted: Dec 23rd, 2007 at 6:09 amReply to this comment.Good article. I work with ASP.NET and do a similar thing: I have webcontrols that output xml and then pass that through an xslt. The xslt has all the html in it (no html in compiled code). The javascript layer then applies all the events to the html from a separate .js file. :)
44 -
php indir
Posted: Dec 27th, 2007 at 4:10 amReply to this comment.THANKS
45 -
asp indir
Posted: Dec 27th, 2007 at 4:11 amReply to this comment.thank you
46 -
mirko
Posted: Dec 27th, 2007 at 3:29 pmReply to this comment.Script.aculo.us is very useful library… And also xtemplates is very good i use this…
47 -
hikaye
Posted: Dec 28th, 2007 at 4:53 amReply to this comment.thanks for all..
48 -
dizi izle
Posted: Dec 29th, 2007 at 3:36 amReply to this comment.thanks for all ..
49 -
iznik
Posted: Dec 29th, 2007 at 3:37 amReply to this comment.Good article. I work with ASP.NET and do a similar thing: I have webcontrols that output xml and then pass that through an xslt. The xslt has all the html in it (no html in compiled code). The javascript layer then applies all the events to the html from a separate .js file.
I hear the development line of prototype.js has a $$() function that will do the same thing as Behaviour.js, but it’s not yet on their release version. I’m looking forward to not having to include the extra Behaviour library. Something to keep an eye on for the next prototype.js release.
50 -
adult forum
Posted: Dec 29th, 2007 at 6:43 amReply to this comment.very good article thanks
51 -
Görsel dersler
Posted: Dec 30th, 2007 at 4:36 amReply to this comment.very good article thanks
52 -
ilanlar
Posted: Dec 30th, 2007 at 4:37 amReply to this comment.thanks for all..
53 -
Hikayeler
Posted: Dec 30th, 2007 at 4:38 amReply to this comment.thanks man
54 -
Resimler
Posted: Dec 30th, 2007 at 4:39 amReply to this comment.thanks
55 -
msn names
Posted: Dec 30th, 2007 at 8:06 pmReply to this comment.thankx man :)
56 -
msn nickleri
Posted: Dec 30th, 2007 at 8:07 pmReply to this comment.thank you man
57 -
oyun hileleri
Posted: Dec 30th, 2007 at 8:07 pmReply to this comment.thanss for man
58 -
ksk
Posted: Dec 30th, 2007 at 8:08 pmReply to this comment.than you adamım
59 -
VideoSaati.Net
Posted: Dec 31st, 2007 at 9:33 amReply to this comment.VideoSaati.Net Video İzle VideoSaaTi
60 -
diziizle
Posted: Jan 2nd, 2008 at 9:41 amReply to this comment.thanks for all ..
61 -
online video
Posted: Jan 2nd, 2008 at 9:42 amReply to this comment.than you
62 -
msn avatar
Posted: Jan 2nd, 2008 at 9:44 amReply to this comment.nice man
63 -
dizi izle
Posted: Jan 3rd, 2008 at 6:59 amReply to this comment.thanks a lott..
64 -
oyun hileleri
Posted: Jan 4th, 2008 at 3:19 pmReply to this comment.Thank you man
65 -
Tarkan Metamorfoz
Posted: Jan 5th, 2008 at 11:26 amReply to this comment.thnkss….
66 -
alternatif
Posted: Jan 7th, 2008 at 3:02 amReply to this comment.very good thanks
67 -
hirdavat
Posted: Jan 7th, 2008 at 1:42 pmReply to this comment.thnx for..
68 -
matkap
Posted: Jan 7th, 2008 at 1:43 pmReply to this comment.nice man.. good
69 -
poker
Posted: Jan 8th, 2008 at 3:33 pmReply to this comment.nice article, thanks
70 -
Hikaye
Posted: Jan 9th, 2008 at 8:56 amReply to this comment.thanks
71 -
Çanta
Posted: Jan 9th, 2008 at 9:16 amReply to this comment.tahanks
72 -
SUV
Posted: Jan 10th, 2008 at 9:55 amReply to this comment.thanks.
73 -
trading guide
Posted: Jan 10th, 2008 at 7:22 pmReply to this comment.thanks for the information!
74 -
film indir
Posted: Jan 12th, 2008 at 6:54 pmReply to this comment.thanks
75 -
patent
Posted: Jan 13th, 2008 at 2:


[…] In this informative blog entry, BorkWeb.com shares a method for creating a templating system generated wholely with Ajax and PHP. While Ajax is the cause for the article, the heavy focus is on templating. For the past few years I have been using XTemplate as my templating library (I’m a PHP buff) and have been happily separating my logic from my layout…unitl I ran smack dab into the power of Javascript. My PHP still kept its separation from HTML as is the purpose of XTemplate, but it was my HTML that became littered with little nuggets of Javascript all over the place. No matter the method to my Ajax madness, this was my problem. […]