BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Ember.js 1.5 Released: New Testing Features, Improved UX

Ember.js 1.5 Released: New Testing Features, Improved UX

This item in japanese

Lire ce contenu en français

Update 04-18-2014: Added comment from Erik Bryn frm Ember.js team, about performance considerations.

The Ember.js team has released version 1.5, with new testing features, and an eager URL update that will “provide for a better UX 99% of the time,” according to Ember core team member Robert Jackson.

Jackson, posting on the Ember.js blog, described the new version as having “a ton of bug fixes and small improvements” as well as new features in the release.

Version 1.5 includes Handlebars logging of primitive value, described by Jackson as a feature that ”allows you to log primitive values (strings, numbers, etc) from within your templates." In previous versions of Ember.js, the {{log}} helper would only allow the usage of bound property lookup.

The release’s new testing helpers include currentRouteName, currentPath, and currentURL, and are described by Jackson as making it easier “to make assertions on the state of routing in your application."

Aside from Handlebars logging and the testing helpers, the Ember.js 1.5 brings changes to Ember.computed.oneWay, and the new Ember.isBlank shortcut, for checking if a particular object is empty or an empty string.

In previous versions, to avoid data propagates back up users would have to do “Ember.computed.oneWay('foo').readOnly()” but the new release allows developers to use “Ember.computed.readOnly('foo')”  for the same result.

Other new features include the Eager updating URL: “Previously, the URL in the address bar would only update at the very end of the transition. This change causes the URL update to happen immediately unless the transition was aborted/redirected within the same run loop, which provides for a better UX 99% of the time,” Jackson said.

A notable bug fix in 1.5 is noted for breaking the edge-case of using_super out of line. In previous versions of Ember.js, an infinite loop would occur when more than one _super was called for a given function name and there was no terminating function. Jackson calls on anyone affected by the breaking bug fix to comment on #4632.

Other bug fixes in Ember.js 1.5 include:

  • run.bind keeps the arguments from the callback.
  • Ember.copy now supports Date
  • Allow components with layoutName specified by parent class to specify templateName
  • PromiseProxyMixin reset isFulfilled and isRejected

Response to the update from the community was mostly positive. On the blog post user Adrian Meredith asked “when is query params going to be done...Really surprised at how low priority this is, does no-one have search in their apps?"

User Ilya Radchenko responded “It's not low priority. The core team wants to do it right, because it's an important feature and a very difficult problem with many edge cases." Core team member Alex Matchneer confirmed this, adding “it's extremely high priority...we don't really encourage this sort of thing but many folk are using query-params-new happily in production.”

On the Ember.js Discussion Forum user gordon​_​kristan referred to a “significant performance decrease going from 1.4.0 to 1.5.0”, mentioning “My app has gone from loading the home page in about 5 seconds to taking about 30 seconds."

While the cause of the user's performance decrease hadn’t been identified at time of press, Stefan Penner -- member of the core Ember.js team -- responded “[H]opefully not, but this could be related to my performance tuning. We did thoroughly test across several big apps, with only positive throughput improvements."

Erik Bryn -- another member of the core Ember.js team -- commented “Here at Netflix, we're seeing better performance with 1.5. Our friends at Discourse are seeing the same. I hope @gordon_kristan can help us get to the bottom of his issue, but it appears to be an isolated incident at this time.”

With the 1.5 release announcement came the beta release of version 1.6, including new features and a performance improvement to the cache lookup throughput.

Rate this Article

Adoption
Style

BT