« On the Love for JavaScript | Main | Unit-Testing JavaScript with QUnit, Sinon, Phantom and TeamCity »

04/23/2012

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Ethan J. Brown

Your issue with mobile providers is one I ran into several years back. At the time, I was using a jQuery based client side template library that mandated templates in comment blocks in the page -- this was well before mustache, handlebars and the 20 other major template engines out there, and any set of standardized concepts on how to handle data-binding or models on the client. The aggressive proxies would strip out the comments, hence removing the templates. Since we had laptop users with aircards, it wasn't immediately obvious this was a mobile issue, until I was able to borrow one and do a little digging. Obviously template libraries have come a long way since then, but the DANGER DANGER point you make about is one to certainly always keep in the back of your mind, because it can really bite you!

Hajder

Great post, thanks! Btw, Handlebars.js does not work in IE6

Ingo Rammer

Hajdar: If IE6 is still a topic for you, than there's quite likely a lot more which doesn't work for your target environment. It's really a pity that this browser is still around, but fortunately, we're seeing a lot of progress there and the instances in which I personally had to support IE6 are getting fewer and fewer.

Hajder

Ok thanks for the quick response, and I definitely agree with you, however with valuable clients that cannot switch it's a problem.

I also tried in IE7, IE8 and IE9 (!), it does not work. Any ideas? it works in Chrome, Opera, Safari & Firefox.

Thanks!

Ingo Rammer

Hadjer: Hmmm ... that's interesting. Just three weeks ago, I've deployed a larger app which needed to support a minimum of IE8 and Firefox 3.0.19 (both on WinXP SP2) based on Handlebars and it worked perfectly.

Ingo Rammer

Hadjer: I've just checked the history of Handlebars and its error log and it seems as if there has been an issue with IE7/8 which has been fixed about three months ago: https://github.com/wycats/handlebars.js/issues/85

Hajder

Ingo: I have checked my code because it seemed strange it didn't work in IE9. As a matter of fact, there was a duplicate element which caused a problem when displaying it on/off. Now it also works in IE6.

Ingo Rammer

Hadjer: Ahh ... that's fantastic. Thanks for taking the time to re-check this and share it!

Hajder

Ingo: what do you recommend for syntax highlighting handlebars files? Eclipse does not offer it by default.

Ingo Rammer

Hajder: My favorite IDE these days is definitely WebStorm (by Jetbrains). While it absolutely excels for all kinds of JavaScript editing, it provides also quite nice support for Handlebars and other "newer" web toolkits, like LESS.

The comments to this entry are closed.


IMPORTANT: This is archived - and quite likely outdated - content, only kept online for reference purposes

Please visit thinktecture.com for up-to-date technical content.