|Cleaner, Leaner Ember.js 2.0 Released|
|Written by Kay Ewbank|
|Thursday, 20 August 2015|
Despite moving from 1.x to 2.x, which suggests major changes, the new version of Ember.js has been released with no new features. Internally the new version has been referred to a “garbage collection release”.
The idea of the new release is that following thirteen previous ‘point’ releases in two years, the developers have used this cycle to focus on getting rid of what they describe as “built-up cruft”, so that future versions can be more easily developed.
We all know what they mean by “built-up cruft”, and removing it is a brave move given the way that usually manages to break something completely unexpected miles away. All the features that were removed were deprecated as of Ember 1.13, so apps that run on Ember 1.13 without any deprecation warnings should run without issues on Ember 2.0.
Writing about the new version on the Ember.js blog, Yehuda Katz and Matthew Beale say:
“We are committed to giving every Ember codebase a path into 2.x. To ensure this, we've flagged everything removed in 2.0 with a deprecation in the 1.x series. If your app runs on Ember 1.13 without raising deprecations, it should run on 2.0. There are no new features to adapt to or adopt.”
Specific API removals in this version include the removal of Views. If you have apps that use Views, you should change the code to use Components, which provide better isolation and scoping semantics. However, in recognition that you may need View support in the interim, the developers have published an ember-legacy-views compatibility addon (https://github.com/emberjs/ember-legacy-views) that will allow you to spread out the transition over more releases. Support for this add-on is promised until at least Ember 2.6.
Support for Controllers has also been removed. The developers say that if you are building a new application
“you should almost never need controllers except to manage query parameters and communicate with the route.... For these cases, Ember 2.0 retains support for top-level controllers with no addon required. While we plan to completely replace these use-cases during the 2.x series, everything that works without the compatibility addon will continue to work until 3.0.”
As with views, you can provide support for existing apps with an addon - the ember-legacy-controllers (https://github.com/emberjs/ember-legacy-controllers) compatibility addon.
Details of the other removals are included in the blog post, along with the necessary workarounds.
The lack of new features in this version isn’t a sign of things to come, and a “variety of exciting features” are planned for Ember.js 2.x, including angle-bracket components and one-way data flow; and routable components.
or email your comment to: email@example.com
|Last Updated ( Thursday, 20 August 2015 )|