Friday, 14 December, 2018 UTC


Summary

Although the Native Classes are now part of Ember, there are still a few important building blocks to get a recommendation from the Ember team.
Version 3.6 of the web framework Ember has been released. At the same time begins – as usual in the project – the beta phase for version 3.7. The highlights of the new release are two new classes: the ES Class and the Native Class. Thus, the native classes are considered stable and a public API whose behavior will not change. There are also two new RouterService methods. The component of the framework Ember Data has not changed in comparison to the previous publication, the command-line interface (CLI) has at least received a bug fix.

Native classes in Ember 3.6: Use with caution

However, the introduction of native classes in Ember does not mean that the Ember team recommends their use. While the classes are considered stable, Ember does not yet support Class Fields or Decorators, as both are not yet validated by Technical Committee Number 39 (TC39). The committee is part of ECMA, the institution that manages the standard of the JavaScript programming language under the ECMAScript specification. Without Fields and Decorator, the class syntax is usually not worth the effort, as many of the daily programming tasks in Ember require it.
Therefore, the Ember-makers continue to recommend the use of the EmberObject.extend () syntax. However, those who are not afraid of the risk, can already use the new classes and close the missing gaps with community projects such as ember-cli-typescript and ember-decorators . In addition, Ember is working on a code modem that will transform the old class model into the new one when the time is right. The old syntax will be supported by Ember for a while.

RouterService methods and the CLI

Ember 3.6 comes with two new methods: recognize (url) and recognizeAndLoad (url) with. The former returns the RouteInfo based on the specified URL, while the second one takes a String URL and returns a Promise that resolves to RouteInfoWithAttributes for the leaf-most route represented by the URL. Through this last stage, Ember also has a new observable property currentRoute , which always changes when a route transition occurs.
So far, the Ember CLI has always received two CI builds per Pull Request for TravisCI users – one for the Branch Push and one for the Pull Request update. The Ember team has now resolved this situation.
A complete list of new features can be found in the Ember blog . If you would like to jump further, you will find the first beta for Ember 3.7 in the beta channel of the Ember website.
Source: https://www.heise.de/developer/meldung/JavaScript-Framework-Ember-3-6-stellt-Native-Klassen-zur-Verfuegung-4250397.html

Share This:

The post JavaScript framework: Ember 3.6 provides native classes appeared first on FrontNet Blog.