Longevity in JavaScript Frameworks
blog.bitovi.com
blog.bitovi.com
Honestly; I have a hard time taking this article seriously when they put Backbone & Knockout into the "stagnation" category, but CANjs into the "safe bet" area. Both Backbone and Knockout are continually maintained and have done a good job with backwards compatibility.
Backbone/Knockout may be well maintained but their scope is fixed. CanJS has gone from the times of $.widget() to <app-component> while maintaining backward compatibility.
It wasn't until I was 3/4ths of the way through the article that I even caught on that Bitovi is the company that created CanJS since it is not a framework I have personally used or am all that familiar with.
From your own article you highlight these 3 points as describing "longevity"
1) Trust. (The framework shouldn’t break backwards compatibility.)
2) Consistent innovation
3) Proven Track Record
Both Knockout & Backbone have clearly demonstrated both points 1 & 3. Point 2 is dubious at best since depending on your definition of consistent innovation you may well break Point 1 - Trust.
Consistent innovation is also, IMHO, not a necessity of longevity. If I need to turn a screw I need a screwdriver. Tomorrow a screwdriver will still work; maybe it's a faster battery charged screwdriver, but it is essentially the same tool solving the same problem. KnockoutJS is a tool that still solves the same problem.
I don't know for Knockout but Backbone is a zombie. His creator basically says no to any new feature and has very little time to manage the project anyway. See the commit logs for this year ,they are merely "cosmetic". A lot of things could be fixed or added -- a better router(with states and sub states) , composite views , composite models that do not need verbose hand plumbing -- without even breaking backward compatibility , but there is no plan to add anything significant to the core.
I Never tried CanJS though , It looks like an interesting alternative to Backbone.
Yes, but it's still stagnation.
In any case, even if it is, surely an older framework is fine? I see Backbone in the "slow or stagnated innovation" part of the chart - it isn't broken. It works fine. Seems confusing to simultaneously complain about the web framework "industry" moving too fast, and individual frameworks moving too slow.
I think it's taken as a given that your app won't be sitting still for five years. The point of the longevity argument is that you won't have to rewrite regularly so your app will have a chance to make it to five years. Check out the team velocity chart under "Making a Good Bet."
Many, many web apps will do exactly that, just as many businesses are still getting work done with desktop software that is several years old. But in the world of web, browsers now break functionality all the time and vulnerabilities are found with alarming frequency, so the ability to update front-end code to at least maintain compatibility and security is often important, even if it's otherwise working fine and needing little new development.
I suppose this might be the case for incredibly basic CRUD apps or your personal blog, but the server side is generally where the bulk of the complexity resides, especially in data heavy applications. Good "backend APIs" that you interface with and don't find very novel, are in fact taking care of the complexities for you.
FB has done it and I didn't feel a thing, besides some disappearing bugs.
Addendum: The intended audience for this article will not share these same properties.
Front end or back end still need to communicate over HTTP and display in browsers. Your end users don't care what framework is used or if it is popular. They just want a usable and probably cheap site/application.
It doesn't really. Both native apps and webapps use HTTP, but you'd struggle to find too many similarity in those implementations that you could reduce down.
Pretty much yes. Almost every single large web app I've ever written is still in use. And many of them are sort of frozen in time with whatever technology and techniques were popular at the time. There is no financial reason to rewrite them. Some have gone through major technological shifts (but not rewrites) if I bet on the wrong technology for that project.
When I was 20 years old, 5 years seemed a long time and would have never expected any of my software to be in constant use 15 to 20 years later.
(for the record, I'm not 20 years old either. However, an decade old C# desktop app I wrote back when I was is still in use at an old corporate workplace)
I do corporate web applications now and there is a lot of pressure to support modern browsers and mobile.
Sure, because things like intranets and embedded UIs exist.
I have no hard data on whether these categories, which frequently involve developments that will be deployed once and run indefinitely or with only occasional upgrades, are a larger part of the industry than hosted web apps. However, I would be extremely surprised if the kind of project we discuss all the time on HN and some people here work on in SV is anywhere near representative of the web development industry as a whole.
>If your project chose JavaScriptMVC in 2007, you would have made a wise decision, giving your team an upgrade path to a modern application for the past 8.5 years.
This is kinda funny to me because I know it's untrue. The product I work on in my day job is based on JMVC 3.2 and we can't upgrade to 3.3 because of the size of our app and the amount of refactoring work that would need to be done to make it work with the new concepts.
While it may be a large undertaking for your organization, I wouldn't consider any of these to be irrational changes in API from 3.2 to 3.3: http://www.javascriptmvc.com/docs/done.html
3.2 to 3.3 is actually mostly syntax changes that are documented in the guide linked in the other comment.
What specifically is preventing you from upgrading? If you want any help or tips, please reach out and we'll gladly help you or give some pointers.
That's the reason I have a REALLY hard time committing to any Javascript framework with more than a passing learning curve or a set of rules that wants your whole application to follow (and marry).
For that reason, I'd generally stuck with just using jQuery until I was introduced to React. React seems to go at the problem from a "realistic use" perspective that flows well with small reusable components without requiring full marriage to use it. It's the most well thought out one that I've seen.
That said, I'm going to continue being a skeptical curmudgeon.
But there is a LOT more consultoware in the world. And a lot of it runs in the browser on corporate intranets, where IF it ever gets updates past the first year after release, it will probably be by a completely different team. And by different team, that could either mean a completely different consulting company, or a completely different set of developers in the original company [0].
I know for a fact that there is JS code that I have written that has been in use, unchanged, for 10 years. That's not to say that I wrote amazing code. I didn't write anything good 10 years ago (and probably don't 10 years later, but that's a different issue). That code got written, the system got installed, and nobody ever went back to change anything in it. I'm sure the database server crashes once every two days and they just have a policy to reset the server every morning.
So yes, you absolutely can expect code you write to last for 5+ years.
[0] And that could be be either because the consulting company moves their A-Team around on new projects and puts their B- and C-Teams on long-term-support, or it could be because the company perpetually assigns teams to projects, and bored developers quit to new companies.
I was forced to switch from ExtJS to Ember to React, so I don't mind learning another framework in the next years. But it would be nice if I could work with my React skills for 5 or more, haha.
As long as you're using the best tool for the job you have now, you'll probably be fine.
JS frameworks are the Drosophila of software, which is surely partly due to the accessibility and popularity of JS, its flexibility and flaws, and also of course that the problem frameworks solve gets better understood and then changes, and the solutions improve. But perhaps also, JS developers themselves are the Drosophila of software developers, quickly entering and exiting the JS field. In many fields, new blood drives adoption.
One rule of thumb I've heard is that you should incorporate at most one "new" piece of tech into any given project.
There's of course still some work to be done on reusability of UI components — seeing as Angular, React, and Aurelia are each building their own Material Design implementation.
no they wont, see server side languages. There will be dozens of frameworks for ES6/7 ... why do you think AngularJS and co get rewritten from scratch using some ES6/7 dialect ? You can argue AngularJS will be a set of decoupled libs, that wont be the case for what matters, the view.
> There's of course still some work to be done on reusability of UI components — seeing as Angular, React, and Aurelia are each building their own Material Design implementation.
Not sure why you're talking about material design, and why it matters when it's some vague UX spec produced by Google. Did you mean webcomponents ?
Sure, but you don't have to have all your application logic written using a framework-specific class factory, linked through a framework-specific module system. That means code will be more portable.
> Not sure why you're talking about material design, and why it matters when it's some vague UX spec produced by Google.
It's a very precise UI specification, so theoretically a single implementation would be enough. I am just saying that there is no universally compatible Web Component package format in wide use yet.
Yes, this is a blatant advertisement. We worked hard on these open source project, believe they are great, and were trying to argue for their use from a commonly overlooked perspective. It should surprise no one that an article on our site advocates for one of our open source projects. I don't think arguing for something you benefit from should disqualify the argument. Instead, it should make any claims we make fall under more intense scrutiny.
Now about longevity, there really isn't a fair comparison. JavaScriptMVC is far older then Backbone, Knockout, Angular and React. They, for the most part, haven't even had to evolve. Their technology is, for the most part, still pretty modern. We'll see how they do.
Here's how JavaScriptMVC evolved:
JavaScriptMVC started on PrototypeJS. It did almost everything a Backbone + RequireJS + Karma + DocJS setup does today. Except much worse! It used:
- PrototypeJS (jQuery had only first released)
- RhinoJS (the only viable server-side JS runtime)
- EJS for templates like `<%= foo %>`
- Steal syntax for loading scripts `steal(dependencies)`
- Selenium for test driving
It had the only working "event delegation" system. This was one of its big features. It also had:
- basic modeling
- basic routing
Since that time, we've probably done more then anyone else to adapt and evolve the tools and technology so a reasonable person could upgrade. Some of my favorite highlights:
1. We updated StealJS to support AMD/CJS/ES6 syntaxes while still supporting the old steal syntax. We also migrated its build system from RhinoJS to NodeJS.
2. We swapped out Prototype for a compatibility layer that runs on jQuery / Zepto / Dojo / Mootools / YUI 3. I helped jQuery add event delegation so we could drop it from JMVC in jQuery 1.4.
4. We added live-binding EJS templates.
5. We added live-binding Handlebars-like templates. And then re-wrote that again to be 2x faster.
6. We added custom elements, two-way bindings.
7. I'm currently rewriting how we do data-connection: http://connect.canjs.com/, while still providing a backwards compatible version: http://connect.canjs.com/doc/can-connect%7Ccan%7Cmodel.html
8. Live-reload technology
9. A progressive bundling algorithm.
10. Migrated documentjs from Rhino to NodeJS, make it support multi-versioned docs.
If this article had come out 3-4 weeks from now you'll see we added:
1. Server-side rendering (Isomorphic / Universal JavaScript)
2. Worker-thread rendering with virtual dom merges.
We started when JavaScript was in its infancy and managed to evolve our tools and technology to keep pace with innovation constantly happening in our space. I really don't think there's another project that's undergone such a transformation.
When Angular was released, people thought putting click handlers back in a template was silly. Same with React's Virtual DOM approach. Those things have turned out to be great. We've added them (or are just about to).
We've tried to keep changes as small as possible between major versions. I think we've walked the line well between change and backwards compatibility.
So in the end, we're very proud of these accomplishments. We believe they are unique and mean something. That's what this article was about.
Btw, I give a free weekly JS training tomorrow. Its got open Q+A at the end if anyone wants to discuss more, you can join it here: https://plus.google.com/u/1/b/117481170193954630503/events/c... Open QA will be at approx. 12:45 CST.
- former employee
Frameworks are useful abstractions for getting a product shipped in a reasonable timeframe. At some point, in your growth as a developer, you should understand how to implement things in your language of choice from first principles. However, "ship it" is not necessarily a conducive mantra to learning the intricacies of a language, design patterns, et cetera.
On top of that, it's really damn hard to find good engineers who can work from first principles that aren't already in highly-paid, competitive positions. This is why frameworks flourish. They substantially lower the barrier to entry for creating product.
It goes further than this: a good framework can lower the barrier to writing maintainable, modular code. Sometimes people just need a nudge to follow good practices.
Many JS frameworks enforce their own brand of modularity (complete with boilerplate) that isn't transferrable to other projects, frameworks or languages.
They don't necessarily teach you how to write modular code in general, just how to write modules within their architecture. There's a difference.
Edit: Not to say there isn't value in introducing a newbie developer to modules. Just not all frameworks are created equal. :)