News for hackers. Stuff that matters.
Re:37signals Basecamp Mobile HTML5 app for WebKit browsers by simonista on Tuesday February 01, 2011 @11:49AM (#2166163)
Could someone explain why something like eco makes sense in this context instead of just using rails (ERB) templates. Presumably you have to query the rails backend at some point to get the data. Are the templates in coffeescript for cache-ability? Thanks!
Re:37signals Basecamp Mobile HTML5 app for WebKit browsers by joshpeek on Tuesday February 01, 2011 @11:56AM (#2166192)
All the eco templates are compiled and shipped along with the JS files. The server backend only sends JSON to the app. Its much smaller and faster to render, plus its cacheable on the client side. Its a huge win over RJS templates.
Re:37signals Basecamp Mobile HTML5 app for WebKit browsers by simonista on Tuesday February 01, 2011 @12:13PM (#2166281)
Thanks. Any downside?
Re:37signals Basecamp Mobile HTML5 app for WebKit browsers by joshpeek on Tuesday February 01, 2011 @12:29PM (#2166349)
Theres some duplication between the server side (Ruby) and client side (JS) models.
Re:37signals Basecamp Mobile HTML5 app for WebKit browsers by nickw on Tuesday February 01, 2011 @01:41PM (#2166654)
This is something I'd really like to see solved in client side frameworks like this.

It seems to me that you could do something similar to how ActiveRecord queries the database for a model's attributes - but instead expose a JSON service that returns a models attributes and validations. But perhaps JS doesn't have the dynamic / meta-programming capabilities to make this happen like Ruby does.

Re:37signals Basecamp Mobile HTML5 app for WebKit browsers by clojurerocks on Tuesday February 01, 2011 @01:00PM (#2166464)
Why do they use js for the client side logic? Cant they use ruby? I know phonegap appelarator and rhomobile allow for this with rhomobile but all ruby. As im playing around with mobile applicaitons more im finding managing the javascript to be somewhat of a headache. So ive been wondering if theres ways to do with with other languages.