Changes between Initial Version and Version 1 of Ticket #2527


Ignore:
Timestamp:
06/14/12 14:08:22 (23 months ago)
Author:
aron.carroll
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2527 – Description

    initial v1  
    33There are three common solutions to templating at the moment. 
    44 
    5 1. Insert the html into <script> tags at the bottom of the page and pull them in using the DOM and innerHTML. This is a very simple solution but not very portable. 
    6 2. Request the HTML snippets as plain text/html using XHR. This adds an extra HTTP request per template but is very clean. It would also be possible to inline the HTML into the JS at the minification stage for production. 
    7 3. Include the HTML in JavaScript strings (horrible to maintain and bloats the js) 
     5 1. Insert the html into <script> tags at the bottom of the page and pull them in using the DOM and innerHTML. This is a very simple solution but not very portable. 
     6 2. Request the HTML snippets as plain text/html using XHR. This adds an extra HTTP request per template but is very clean. It would also be possible to inline the HTML into the JS at the minification stage for production. 
     7 3. Include the HTML in JavaScript strings (horrible to maintain and bloats the js) 
    88 
    99It makes sense to keep these with the other templates so that we can take advantage of localisation where possible. This indicates 1 or 2.