JavaScript Jabber: Backbone.js
javascriptjabber.com
javascriptjabber.com
Progressive enhancement I think has really become a law of moses in recent times, probably mainly due to the speed in which browsers have progressed, and the powerful browsers on all modern phones - it just isn't practical.
To be honest, I think having your app work without javascript these days is a little naive view about the future of the web. Javascript is here to stay and not that many people will be on non javascript powered browsers.
Which also persuades me to really care even less about the semantic web. Twitter bootstrap is a good example - it really is DIVitis, but really who cares? its rapid application development, it make the web look and act far nicer and more consistent, and it progresses the web as a platform.
Having your web app still work (through non Ajax'd GET, POST etc) for the 7 seconds it takes to download the javascript just isn't worth it - especially with html5.
Unless your web application happens to actually be a series of <form>s, your JavaScript probably starts to become your content. To use an example from today, how would one go about building this without JavaScript? Without losing the heart of it in the translation to static HTML?
http://www.nytimes.com/interactive/2012/02/13/us/politics/20...
Before I go off on to much of a rant, I do want to clarify - having the javascript be the content is fine for a special 'once off' page like the one in the grandparent post. In this case its probably replacing a flash animation. Its also fine for applications where you have a tight handle on the people and devices which will use it.
However as a general practice its a bad idea. A few very important cases that this breaks:
* The googlebot and archive.org
* Vision impaired users
* Services such as readability and instapaper
All of these could be better served by having a symantec table of data, which is then then enhanced and presented in a different manner by javascript.
The saving grace is that the 2012 internet has excellent mobile sites (they suck on mobile with user-scalable=0 or maximum-scale=1, but on a desktop browser things flow excellently).
Sadly you're sane understanding doesn't jive with the HN echo chamber, but you're spot-on. The web is more than just tech demos.
The solution is to come up with best-practices and tools that allow both interactive and static versions to exist in tandem, with minimal overhead.
Catering to lowest common denominator means technology, for all humans, lags behind. This is a massive issue. Either the tools for consuming static content (e.g. google bot) need to evolve to embrace the modern internet, OR we need to produce simple tools for dynamic sites that transparently serve the static content for services that require it.
That said, there's a lot of simple elegance in a straight html page.
Slightly interesting in this context: http://www.youtube.com/watch?v=D9_6G8J6VJg (applications of simple sms based services covering Kenya)
It doesn’t make any sense to present a chat client or a multiplayer game or a data driven map or a vector drawing program as a set of hyperlinked pages. Googlebot, archive.org, instapaper, etc. wouldn’t really get much useful from such applications anyway.
(referring to your thoughts around 38:00-42:00)
Backbone has always been intended to give you the smallest possible set of functionality that you reach for every time you work on a JS-powered web app. Model and Views and events to bind them together, collections with powerful functions for filtering and aggregating data, and shareable URLs.
There are lots of other directions and other needs that JS apps may have, but unless it's something that you're going to use pretty much every time, it doesn't belong in Backbone itself -- it belongs in an extension, or better yet, another standalone library. I'm talking about things like write-through localstorage caching, pushing data over websockets, TreeViews, query syntax for complex JSON, special cross-domain communication, specific HTML-generating strategies, or "mobile" widgets that mimic iOS controls.
Fact is, JS apps are still the wild west when it comes to patterns that work well -- there are plenty of fertile experiments to go around. You want a library that gives you a foundation, so that your app can rise up to meet it and extend it in new directions. I think that pretty much all of the apps in this list fit that description -- going far beyond what Backbone provides out of the box:
Having a plugable architecture is great, but if rails never considered making a good thing standard (think bundler, or sprockets) really makes moving between rails apps so much easier.
For example I would say nested views, and view layouts is something that should be standard - isn't backbone built for the single page web app idea?
I have seen so many different layout managers, region managers etc.
* Source of truth.
* MVC / MVVM / MVP / The model-ui spectrum.
* JavaScript pipe dreams.
* Arbitrary code vs. structured templating systems.
* Everything-is-public APIs. +Hooks
* Client Side Models are not mirrors of Server Side Models
... and so on.
"Handlebars is a compromise between logic and logicless views... ladda ladda ladda"