3 ms·
Backbone is intended for JavaScript-driven web applications. If you're doing most of your logic and HTML rendering on the server-side, then it's not appropriate
by jashkenas 16y ago
Backbone is intended for JavaScript-driven web applications. If you're doing most of your logic and HTML rendering on the server-side, then it's not appropriate for you.
However, if you have an application with a lot of JavaScript interactivity, or a single-page application where the entire interface is driven from JavaScript (this is the case for us), then it helps to structure your client-side code with a little more oomph than just jQuery provides.
Taken to the extreme, in our case, the DocumentCloud workspace is effectively an empty body tag, and all of the HTML rendering and interesting logic happens in JavaScript models and views -- you never have to refresh the page. The server-side Rails code becomes smaller and less complicated, essentially delegated to performing validations and authentication and serving JSON to the client. Think GMail, or New Twitter, or 280 Slides...
- silverlight 16y agoOkay, that makes sense. Thanks for the reply. So basically this is for those folks who are making real "web applications" -- meaning applications where a lot is happening on the client side, typically more of a "single URL/page", with dialog boxes and whatnot as opposed to a bunch of pages in the more traditional "web site" sense. I have often considered trying out Cappuccino, but for some reason none of the websites I build end up being "web applications" in this sense. But I can't help but wonder if that's because they aren't, or if it's because I'm not thinking about them the right way. It's outside the scope of this topic, but I can't help but ask: "How do you know when a website becomes a web application"? Is it the scope of the problem (trying to do "one thing", e.g. edit a photo, vs. presenting an entire web site full of information?) Or is it truly just a preference thing? I can only think that as projects like Node.js gain prominence, the lines will continue to be blurred...
- jashkenas 16y agoThe line is as blurry as you'd like to make it. A great example of this is Google Instant. Old Google.com was a web page -- and Google Instant is now a web application, the page doesn't refresh, and sends down JSON data which is rendered into your search results by JavaScript...