4 ms·
People also said this when HTML5 was on the rise—pure JS, no runtime but the browser! Of course, it turns out engineering DOM-manipulating applications in a res
by duaneb 12y ago
People also said this when HTML5 was on the rise—pure JS, no runtime but the browser! Of course, it turns out engineering DOM-manipulating applications in a responsive way is really hard.
These are the core benefits of frameworks:
1. Standard code style.
2. There's only one way to do it (ideally).
3. Modularization.
4. Unit testing.
5. A realistic standard library for async/concurrent computation.
Angular, for instance, provides dependency injection and $scope/$digest. It would be pretty ridiculous to attempt to replicate those benefits until AT THE VERY LEAST Object.observe has solidified in terms of support. And even then, you're on your own in terms of mocking, in terms of communication between different modules, in terms of libraries you can drop in without dragging in a framework itself.
I'm appreciative of the attitude, but it's quite simply not a reality for people who don't want to invest in establishing their own patterns—in effect, writing a framework. With a framework, people can sit down and use the engineering techniques they've learned from other areas of CS and write an application without being bogged down in terms of figuring out how to write a high-performance single-threaded web app in a language without modules, integers, futures (or other similar async abstractions), calendar widgets.
Try going without JQuery for a day and see how much duplicate code you write.
Then, multiply yourself times a team of 10.... good luck.
- tkubacki 12y agoLooks like Dartlang + Polymer is what you are looking for
- duaneb 12y agoDartlang isn't directly supported, and I'm not interested in digging through compiled javascript to debug. Yes, there are tools to ameliorate this, but it's not worth the technical debt of a new language with support from only a single vendor. Polymer is ridiculously slow in my tests.
- tkubacki 12y agoI'm deving 10K LOC app in Dart/Polymer not a single time had to debug JS directly (dart2js is very high quality IMO). Yes Polyemer/Dart is still not very fast due to: a) polyfills b) not having DartVM in Chrome but things will get better and if you have project you plan to live more than 12 months and you start now - it's worth a try.
- jacquesm 12y agoYou missed out on the biggest core benefit of frameworks: battle tested code for a very large chunk of your application without having to re-invent it all from scratch. Frameworks give you a stable foundation to build on.
- colin_jack 12y agoAre you assuming libraries don't though?
- jacquesm 12y agoNo, with libraries you have to provide the whole structure and this is exactly where plenty of programmers go horribly wrong. Frameworks abstracting out the structure is actually one of their largest benefits.
- marrs 12y agoExcept I've never seen a framework help with this at all. I've lost count of the number of code bases I've had to pull a part that used express, symfony, rails, angular, or whatever. Controllers stuffed with business logic, views modifying models... You can't protect coders from themselves.
- Bahamut 12y agoYou can limit the scope of the damage though, and that is an understated benefit of a framework. Architecting solutions for a team is about risk management in many ways.
- marrs 12y agoI'd say most frameworks don't do this very well. One of the reasons I think React is really promising is that it does it better than most, but ironically it isn't a framework. Personally I think there's no substitute for peer review. Code reviews and pair programming are both far more powerful tools.