top | item 4085780

Backbone Aura Developer Preview

108 points| jashkenas | 13 years ago |addyosmani.github.com | reply

18 comments

order
[+] tlack|13 years ago|reply
Looks really interesting and like pfraze I think it's important that we rethink the way we build our sites and applications; focus on composing applications out of reusable tiny JS components (widgets) will make them more robust and easier to develop in the long run, once we get out of the teething stage of trying to figure out how to structure it all.

That said, the architecture they're proposing here seems a bit convoluted; is there really no simpler way to package together your widgets than calls that bounce around to different objects and 'core' methods?

[+] lowboy|13 years ago|reply
There are many many ways to package and deploy an app. That's a double-edged sword of the javascript ecosphere right now. For larger apps/projects, I think that a clean separation of concerns into widgets with a mediator of some sort is the way to go, and aura establishes such a pattern. Will it fit a blog? Probably not. But then, you won't even need AMD-style modules for most blogs.
[+] pestaa|13 years ago|reply
I have a basic grasp of what Backbone is capable of, but can't really tell what Aura improves on that. At first glance it seems to abstract MVC constructs away and lets you define those widgets with a single function call. Is that what this is about?
[+] ayi|13 years ago|reply
(first of all; sorry for my english) Actually it's not about technical side of things. It's about paradigms and philosophies. Addy Osmani is trying to apply enterprise application development patterns to JavaScript. That what i understand from reading all of his blog posts :)
[+] czzarr|13 years ago|reply
Backbone is very minimalist, which is great because it gets out of your way and you rarely end up bundling huge unused chunks of code with your app. However it also means that you're going to have to write a decent amount of boilerplates and make design choices as to how you want the different parts of your application to work together. This can be non trivial and I would advise any newcomer to do it by hand after reading a book like [Javascript Patterns](http://shop.oreilly.com/product/9780596806767.do) but for people who already know where they are going and understand all the implications of such patterns, a framework like Aura can probably speed up development tremendously. With that said I'm going to dive in the Aura source code asap to see what it really looks like. If you know NodeJS, I think it's fair to compare Aura to Restify and Backbone to the http module.
[+] pfraze|13 years ago|reply
Looks promising. Browser javascript needs good architectural environments, and these are talented devs.
[+] phase_9|13 years ago|reply
"Aura is currently missing two important items needed to help us get out a stable release. These are good unit tests and stronger documentation."

I can understand the lack of documentation, but I balk at the fact that framework developers wouldn't use TDD to guide the development :(

[+] grisha|13 years ago|reply
It seems that TDD is not the best approach to design such framework. When you expect your api change frequently on early stages, tests may be trhown away wery fast and be useless. So it's better to delay writing tests for time, when api becomes stable more or less. You need to know what to test before actually test.
[+] mrkurt|13 years ago|reply
I've found that TDD is pretty crappy for exploratory development on things like frameworks. It's much easier to test once I've hit the point where I know how everything should look and behave.
[+] joelhooks|13 years ago|reply
Ya, the biggest issue is that it makes tacking on tests a lot more tedious/challenging. You have to Crete the seams where TDD evolves them via API.

I generally agree with the notion that "exploratory spikes" are much needed. The trick is to toss those in the rubbish bin and TDD the real API. Bet of both worlds.

[+] bwilliams|13 years ago|reply
Looks awesome. Hopefully some of these features will be pulled into Backbone.
[+] czzarr|13 years ago|reply
hopefully this doesn't happen. Backbone is fine as it is.
[+] lwm|13 years ago|reply
Developer preview? Thank you very much! git clone.....