質問

JavaScript MVC frameworks like Backbone.js, Angular, Ember.js, etc. are all the rage these days. I understand that they are great for preventing spaghetti code and all, but I really don't understand why they've taken off like they have.

After all of these years making sure sites are accessible using stuff like progressive enhancement, this sort of thing doesn't work whatsoever when JavaScript is disabled. Take a look at https://app.getblimp.com/. It's a great app, but the entire thing is useless if JS is disabled. Remember years ago when Target was sued over a million dollars because their site was inaccessible?

Another thing is how HTML is so integrated in the JS. Whatever happened to keeping HTML separate for markup, CSS separate for presentation and JS separate for behavior? Why is all this stuff that should be handled by a server being done by JavaScript??

Can someone please point out why a JavaScript MVC framework would be used over a traditional server-side MVC framework like PHP's Zend, Ruby on Rails, or Python?

I just don't get it!

役に立ちましたか?

解決

If someone disables JavaScript, the entire Internet will break for that user. So, no, BackboneJS and other frameworks like Angular and Ember are moving us forward by taking what used to be a browser language reserved for snippets and stupid animations and allows us to organize it in a collaboratively-friendly way for scalable user-friendly applications.

Keeping as much load on the client is where JS applications really shine. There is no need to force the user to make unnecessary http connections to your server and have your server do the work when the same result can be had without.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top