Ajax; Templating; and the Separation of Layout and Logic

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:

  1. 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.
  2. 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.
  3. With separation such as this, applications are more easily skinned and/or receptive to complete UI overhauls.
  4. 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:
  1. <?php
  2. include('xtemplates.php');
  3.  
  4. $tpl=new XTemplate('goodbye.tpl');
  5. $tpl->assign('CHEEZEWHIZ','Bork, bork, bork!');
  6.  
  7. $tpl->parse('main');
  8. $tpl->out('main');
  9. ?>

Here's the Template: goodbye.tpl

HTML:
  1. <!-- BEGIN: main -->
  2.   <div style="font-size:18px;font-weight:bold;">Goodbye Cruel World! {CHEEZEWHIZ}</div>
  3. <!-- 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.


ajax_with_templating.gif

It all works like this:

  1. A User makes a request to view a page
  2. The server-side script calls a series of application functions that generate blocks of templates
    1. 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.
  3. The complete template blocks are sent to the user as a rendered page.
  4. As the user interacts with the interface, two specific things can occur:
    1. 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.
    2. 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.
  5. 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:

HTML:
  1. <!-- BEGIN: stuff -->
  2.   <div>[<a href="javascript:void(0);" onClick="Element.show('add_item');">Add</a>]</div>
  3.   <div id="add_item" style="display:none;">
  4.     <form id="add_item_form" onSubmit="Ajax.Request('ajax.php?'+Form.serialize('add_item_form'),{method: 'post'});return false;">
  5.       Name: <input type="text" name="name"/> <input type="submit" value="save"/> <input type="reset" value="cancel" onClick="Element.hide('add_item');"/>
  6.     </form>
  7.   </div>
  8. </div>
  9. <!-- END: stuff -->

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:

HTML:
  1. <ul id="example">
  2.   <li>
  3.     <a href="/someurl">Click me to delete me</a>
  4.   </li>
  5. </ul>

The Javascript:

JavaScript:
  1. var myrules = {
  2.   '#example li' : function(el){
  3.     el.onclick = function(){
  4.       Element.removeChild(this);
  5.     }
  6.   }
  7. };
  8.  
  9. 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:

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”

  1. pingback pingback:
    Ajaxian » Ajax Templating - Seperation of Layout and Logic

    […] 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. […]

    Reply to this comment.
    1
  2. Avatarmph

    What software did you use to make that diagram?

    Reply to this comment.
    2
  3. AvatarMatt
    Author Comment

    I used Adobe Photoshop…perhaps I’m a masochist? :)

    Reply to this comment.
    3
  4. pingback pingback:
    Sam’s random musings » Ajax Templating - Separation of Layout and Logic

    […] rel=”lightbox”> In this informative blog entry, BorkWeb.com shares a method for creating a templating system generated wholely with Ajax and PHP. […]

    Reply to this comment.
    4
  5. AvatarMorgan

    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=23

    I like the idea of a templating engine, but smarty has always seemed like overkill, I will shamelessly rip you off and investigate your spproach :)

    Reply to this comment.
    5
  6. Avatardylan

    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.

    Reply to this comment.
    6
  7. AvatarJustin

    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.

    Reply to this comment.
    7
  8. AvatarArnaud

    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/

    Reply to this comment.
    8
  9. Avatarsp
    9
  10. AvatarMatt
    Author Comment

    sp, I think this is more along the lines of the Web 1.0 version :) Web 1.0 Templating Diagram

    Reply to this comment.
    10
  11. Avatarsp

    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” :).

    Reply to this comment.
    11
  12. pingback pingback:
    Neil Mix »

    […] 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. […]

    Reply to this comment.
    12
  13. pingback pingback:
    warpedvisions.org » Blog Archive » Ajax and templating

    […] March 18th, 2006 in Links An article on Ajax; Templating; and the Separation of Layout and Logic. […]

    Reply to this comment.
    13
  14. pingback pingback:
    aNieto2K | De todo un poco » Lo último de lo último en Ajax

    […] El ajax en Templates Pretenden separar el layout de la lógica … demasiado complejo […]

    Reply to this comment.
    14
  15. pingback pingback:
    Wordpress » Blog Archive » Ajax Templating - Separation of Layout and Logic

    […] 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. […]

    Reply to this comment.
    15
  16. pingback pingback:
    BorkWeb » Oooo event:Selectors for Prototype

    […] 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. […]

    Reply to this comment.
    16
  17. pingback pingback:
    BorkWeb » A Simple Server-Side Ajax Handler

    […] 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. […]

    Reply to this comment.
    17
  18. AvatarMatt
    Author Comment

    @ Justin:

    You make a good point, Justin. Why use a templating engine when PHP works just fine? The truth of the matter is this, your designers are not always developers in a development team. Templating allows for that true separation of layout and logic to allow each member to do their part accordingly. Now, you make the argument that designers now deal with crazy templating syntax now…but that depends on your templating engine. I choose XTemplates because there is no logic in the templating system…just a mechanism for outputting variables and grouping blocks of code.

    Reply to this comment.
    18
  19. pingback pingback:
    Ajaxian » Writing Your Server-Side Ajax Handler

    […] 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. […]

    Reply to this comment.
    19
  20. pingback pingback:
    BorkWeb » Practicing What I Preach

    […] 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. […]

    Reply to this comment.
    20
  21. pingback pingback:
    WiredPress » Archive du blog » 웹서비스 플랫폼

    […] BorkWeb.com에서 웹2.0의 주요 구현 기술 플랫폼을 나타내는 한장의 그림을 보았다. 클라이언트-서버기반 기술은 여전하지만 아래의 그림을 보면 Ajax 플랫폼이 특징이라고 할 수 있다. 조만간 Ajax 플랫폼들이 나올 것이라고 한다. 그러나 무엇보다도 중요한 것은 고객의 경험이 우선이라는 것이다. 경험을 극대화할 수 있는 서비스와 플랫폼이 사랑(?)받을 것으로 본다. 그것이 유선 서비스이든 무선 서비스이든… […]

    Reply to this comment.
    21
  22. trackback trackback:
    Anonymous

    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…

    Reply to this comment.
    22
  23. pingback pingback:
    One Measly Dollar » Blog Archive » links for 2006-03-25

    […] Ajax; Templating; and the Separation of Layout and Logic Responding to Ajax calls with a PHP script. (tags: ajax php howto) […]

    Reply to this comment.
    23
  24. AvatarSamad

    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.fr

    Reply to this comment.
    24
  25. AvatarSamad

    Here is an example :

    asdf

    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 :
    asdf

    can someone help me plz :)

    Reply to this comment.
    25
  26. AvatarSamad

    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.

    Reply to this comment.
    26
  27. AvatarMatt
    Author Comment

    Hrm…I attempted to re-create your error and I wasn’t able to. Here’s a simple example using your set-up [url=http://borkweb.com/examples/event_selectors_example.html]event:Selectors example[/url].

    In that example (just view source), I am doing an onload=”EventSelectors.start(Rules);” in the body tag, which initializes all of the event:Selector rules. I’ve also ensured that all functions being referred to in the Ajax.Request call are defined and that all the files are in the appropriate location.

    Are you still on the hunt for an example that uses XTemplates? Oh, and check back this weekend if you want because I’ve had a change of heart with event:Selectors and Behaviour, in terms of page load times.

    Reply to this comment.
    27
  28. AvatarSamad

    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

    Reply to this comment.
    28
  29. AvatarRaymond Julin

    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 = ‘

  30. ‘;
    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 :)

  31. Reply to this comment.
    29
  32. AvatarRaymond Julin

    Woops, looks like that broke the comment feature. You’ll get the point anyway ;)

    Reply to this comment.
    30
  33. pingback pingback:
    dhruba.net :: Binary Thoughts » Client side templating and its implications on Web application development

    […] “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? […]

    Reply to this comment.
    31
  34. AvatarContent Management

    It helps a lot to have template and code separate - specially in maintenance and when you want to re-use the code.

    Reply to this comment.
    32
  35. AvatarTrope

    You used PHOTOSHOP????? Wow.

    Nice article.

    Reply to this comment.
    33
  36. pingback pingback:
    Schone HTML met Javascript | Scriptorama

    […] 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. […]

    Reply to this comment.
    34
  37. pingback pingback:
    BorkWeb » Learning What I Know

    […] 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. […]

    Reply to this comment.
    35
  38. pingback pingback:
    BorkWeb » Remote JavaScripting Example - Part I

    […] 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. […]

    Reply to this comment.
    36
  39. pingback pingback:
    BorkWeb » The Ajax Experience

    […] 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. […]

    Reply to this comment.
    37
  40. Avatarkatalog

    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” :).

    Reply to this comment.
    38
  41. AvatarTim

    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.com

    Reply to this comment.
    39
  42. AvatarPokoje Gościnne

    Which good book about AJAX, You can reccomend?

    Reply to this comment.
    40
  43. AvatarPizzeria

    AJAX RULES js go home :)

    Jelonka

    Reply to this comment.
    41
  44. AvatarMartino

    Thanks, i was desperately looking for that info!, great and excellent article, it’s realy helpful. Covering some points I really needed, really useful.

    Reply to this comment.
    42
  45. AvatarAblaze

    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’);

    Reply to this comment.
    43
  46. Avatarharun kaya

    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. :)

    Reply to this comment.
    44
  47. Avatarphp indir
    45
  48. Avatarasp indir
    46
  49. Avatarmirko

    Script.aculo.us is very useful library… And also xtemplates is very good i use this…

    Reply to this comment.
    47
  50. Avatarhikaye

    thanks for all..

    Reply to this comment.
    48
  51. Avatardizi izle

    thanks for all ..

    dizi izle

    Reply to this comment.
    49
  52. Avatariznik

    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.

    iznik

    Reply to this comment.
    50
  53. Avataradult forum

    very good article thanks

    Reply to this comment.
    51
  54. AvatarGörsel dersler

    very good article thanks

    Reply to this comment.
    52
  55. Avatarilanlar

    thanks for all..

    Reply to this comment.
    53
  56. AvatarHikayeler
    54
  57. AvatarResimler
    55
  58. Avatarmsn names

    thankx man :)

    Reply to this comment.
    56
  59. Avatarmsn nickleri

    thank you man

    Reply to this comment.
    57
  60. Avataroyun hileleri

    thanss for man

    Reply to this comment.
    58
  61. Avatarksk

    than you adamım

    Reply to this comment.
    59
  62. AvatarVideoSaati.Net

    VideoSaati.Net Video İzle VideoSaaTi

    Reply to this comment.
    60
  63. Avatardiziizle

    thanks for all ..

    Reply to this comment.
    61
  64. Avataronline video
    62
  65. Avatarmsn avatar
    63
  66. Avatardizi izle

    thanks a lott..

    Reply to this comment.
    64
  67. Avataroyun hileleri

    Thank you man

    Reply to this comment.
    65
  68. AvatarTarkan Metamorfoz
    66
  69. Avataralternatif

    very good thanks

    Reply to this comment.
    67
  70. Avatarhirdavat
    68
  71. Avatarmatkap

    nice man.. good

    Reply to this comment.
    69
  72. Avatarpoker

    nice article, thanks

    Reply to this comment.
    70
  73. AvatarHikaye
    71
  74. AvatarÇanta
    72
  75. AvatarSUV
    73
  76. Avatartrading guide

    thanks for the information!

    Reply to this comment.
    74
  77. Avatarfilm indir
    75
  78. Avatarpatent