Suppose I'm building a fairly large browser-based interactive media application, and I have these requirements:
- Webkit-only (let's assume chrome on the desktop)
- Tablet & Desktop versions, probably with minor differences in the UI
- Completely client-side: no server interaction whatsoever
- Best performance possible
- Fully internationalized
- I'm going to be building a LOT of these applications
- Long-term maintainability is NOT a priority (no TDD here)
- Reuse and leverage from project-to-project IS a priority
- Designers rule the roost - a lot of time will be spent on appearance and animation
- Very short development schedules
- Small, brilliant team
I'm looking for advice from people who have done something like this before, to avoid making some bad choices up front.
I know JS & CSS3 inside and out, but I'm smart/experienced/old enough to know that there are benefits to using an architectural framework that someone else developed instead of rolling my own. However, those benefits only inure if the apps I'm writing match the framework developer's goals.
I spent a day trying to get my head around SenchaTouch and concluded that it great for building something completely different than what I'm building. (By analogy SenchaTouch/ExtJS is Swing, and I'm looking for Flash.) Also, Sencha seems to go to a lot of trouble to change Javascript into a class-based system, instead of just accepting/embracing that it is a prototype-based system. That bugged me.
I've spent a day learning all about backbone.js, and I really like it, except 1) I don't really need ANY of the server interaction stuff (although I might use it to bootstrap all the UI elements from resource files), and 2) it completely punts on keeping views up to date. But perhaps that's a good thing? I'm not clear on that.
I've looked at knockout.js and although it does worry a lot about keeping views up to date, none of the demos I've looked at tackle internationalization. My i18n needs are simple: every text string that appears in my app needs to come from a table (and the language in use can be changed at any time). When I see something like this in the knockout.js home page:
optionsCaption="choose..."
I worry about how easy it's going to be to make that string dynamic, based on a run-time variable setting. That is, if I wanted to write the equivalent of:
optionsCaption=l10n("choose")
is there a reasonably painless way to do that, and what's involved in having a change of language automatically propagate throughout the UI?
Any strong recommendation that I look at yet another framework, that might be a better fit?
Also, I'm assuming we'll use either jquery/ui or zepto, probably zepto, to eliminate lots of boilerplate in the dynamic page update and animation stuff. Any helpful thoughts on that part of the architecture?