- We start with one of the most well known frameworks, Backbone.js. With Backbone, your data is represented in Models.
- Second is Ember.js. Whilst Backbone is fairly low level, with a lot of code that you need to write yourself, such as code to update the view when model data changes, Ember does a lot of that work for you.
- Next up is Google’s offering, the relatively new Angular.js. Angular takes a slightly different approach by doing data binding directly in your HTML.
- Finally, I wanted to pick something different to all of the above and went with Batman.js, and not only because of the name.
You may want to read Who Is Murdering PhoneGap? It’s jQuery Mobile as a reference.
Sure, you knew all about that, since you are very security aware. This video explaining XXXSS attacks is so awesome, that after seeing it you may be tempted to start using NoScript: a Firefox plugin that blocks all scripts on non-trusted sites.
AJAX can make a site difficult for search engines to index if the technology is not implemented carefully. There are two main search engine issues around AJAX: making sure that search engine bots can see your content, and making sure they can see and follow your navigation.
This is not my opinion. I’m quoting Google’s advice on applying AJAX:
… view it in a text-only browser such as Lynx. Viewing a site as text-only can also help you identify other content which may be hard for Googlebot to see …
Try a text-only browser like “lynx” or “elinks” and you will be shocked by what Google will see!
The “Selenium Grid” approach is good but costly. It is well described in “Headless Functional Testing with Selenium and PhantomJS”.
Lots of people are using AJAX to load multiple parts of their website in separate requests. Where you normally have one request for the HTML, the web server now handles multiple requests for HTML from the browser. That way the web browser is tricked into thinking that the website is loaded after the first request of HTML. This allows the visitor to look at something (which according to some UX guru’s is important), but it will slow down the actual loading of the website. It is even worse if you consider that this behavior will put a higher strain on your web server, resulting in slower serving of the page during peak hours (when it matters most).
NB: Thanks to Niko Schmuck I found an excellent post that explains in a much more subtle ways why progressive enhancement is important, read it! Please also read this excellent article from Chris Taylor on AngularJS and why not to use it.