days
-4
-4
hours
-1
-3
minutes
-2
0
seconds
-3
-1
search
Spring cleaning comes early

Ember 3.0: Nothing says let’s celebrate like tidying up the framework

Jane Elizabeth
Ember 3.0
© Shutterstock / Maglara

Less is more in Ember as they continue their idiosyncratic “get rid of stuff for major releases” trend. Nothing says let’s celebrate like tidying up the framework. So, what’s on the chopping block for this popular JavaScript framework in Ember 3.0?

There’s nothing like celebrating a major release than cleaning house. At least, that’s how Ember sees it. Traditionally, this JavaScript framework saves incremental changes and new functionalities for the minor releases. Instead, the big releases are all about removing unsupported APIs and collecting garbage at Ember.

Honestly, it’s a rather refreshing approach to the release cycle. So, let’s see what needs to be thrown in the trash this year!

Ember 3.0

Let’s start off with the basics: Ember 3.0 doesn’t have any new functionality. No shiny new features, no nifty new tools. Ember is the same as it always has been since the last release.

Well, mostly. Instead, Ember 3.0 is focusing on the functionality and performance of the framework by cutting out extraneous and unnecessary APIs. But, the team at Ember isn’t stopping anything too dramatically; any APIs marked for depreciation have been frozen since July 2017.

Ember 3.0 is changing course away from script tag driven development. They’re following the general trend within JavaScript itself as development has moved towards ahead of time (AOT) compilation. So, the legacy, script tag driven use of Ember via a “gloibals” build is removed in 3.0.

Builds of Ember and Ember Data for use with a <script> tag are no longer published as of 3.0. This includes:

  • Builds published to Bower as components/ember and components/ember-data.
  • Builds published to S3, for example at http://builds.emberjs.com/release/shas/1f05c15cfc6d9df5882f9ff7cc985f50fe68f98f/ember.min.js
  • Builds published to CDNs, for example at https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.16.2/ember.debug.js

Instead applications should make Ember a dependency via NPM or Yarn:

  • ember-source is the Ember NPM package.
  • ember-data is the Ember Data NPM package.

So, what else got chopped? Ember drops support for Internet Explorer 9, IE 10, and PhantomJS. More dead weight for the garbage collectors includes a number of APIs. Here are some of the big ones:

  • Injected container access
  • Function as test in Ember.deprecate, Ember.warn, Ember.assert
  • Ember debug function options
  • Ember.K
  • And more

Have a look at the full depreciation guide to keep track of everything going off to the dump.

SEE MORE: Angular, Ember and Vue: Is choosing a framework simply a matter of taste?

Other changes to Ember 3.0

Most of the big changes in this release are bug fixes and cleaning away dead weight. That being said, there are some updates to be aware of.

There are some updates to the testing defaults, including a change to the default blueprint for generated tests and an updated Ember.js Testing Guide.

Additionally, in Ember 3.0 reading a computed property without using get will cause an assertion failure in development. This will help applications correct their currently incorrect usage.

There are also some changes to Ember Data 3.0 and Ember CLI 3.0 other than the now-traditional API depreciations. Ember Data 3.0 contains small bug fixes and updated test generators for the new testing APIs. Ember CLI 3.0 makes it easier to use async and await by including the addon ember-maybe-import-regenerator in the default app blueprint.

SEE MORE: Ember.js 2.0 is all about removing stuff

How popular is Ember, anyways?

It’s been over two years since Ember had a major release. In that time, frameworks have solidified into a major force within tech and JavaScript made its mark with other alternatives like Angular, jquery, React and even Vue.

This Stack Overflow chart from 2017 shows off the state of the field for JavaScript frameworks.

Ember 3.0

Popular JavaScript frameworks like jquery and Angular dominate, with Ember hanging on at the bottom of the chart in purple. Can Ember hold on?

As we discussed previously on JAXenter, it’s pretty well known that choosing a framework is a matter of personal opinion and taste. Whether or not Ember moves forward relies entirely on the community. And as long as people are happy with using Ember, it’ll keep trucking on.

SEE MORE: JAX Magazine: The darlings of the JavaScript world

Migrating to Ember 3.0

To make sure that as many applications as possible survive the transition from 2.x to 3.x, all public APIs removed in Ember 3.0 have been extracted into the ember-2-legacy add-on. This add-on will be supported through Ember.js 3.4, the first LTS of the 3.x series.

Find out more at Ember.js or at their GitHub page.

Author
Jane Elizabeth
Jane Elizabeth is an assistant editor for JAXenter.com.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of