Aurelia

Aurelia Oslo Video, Pluralsight, New Releases, TypeScript Support & MORE

Introduction

Aurelia

Aurelia


Aurelia Oslo Video, Pluralsight, New Releases, TypeScript Support & MORE

Posted by Aurelia on .
Featured

Aurelia Oslo Video, Pluralsight, New Releases, TypeScript Support & MORE

Posted by Aurelia on .

We're happy to deliver to you a new set of Aurelia releases today. As usual, these releases involve new capabilities, usability improvements, bug fixes and performance work. We've also got new learning materials and a few other fun items for you.

New Features

  • Official WIP TypeScript definition files for every library!
  • New APIs for creating binding expressions, particularly useful in unit tests
  • New APIs for testing HTML behaviors
  • All behaviors now support the generic propertyChanged(property, newValue, oldValue) callback
  • Multiple @sync properties can now exist on a single behavior

Breaking Changes

  • The names and arguments of the events published by the router during navigation have changed.
  • Dynamic options custom attribute's dynamicPropertyChanged callback has been renamed to propertyChanged.
  • The @syncChildren decorator has been renamed to @sync and can now be placed on properties. The signature has also changed.

Performance Enhancements

You should see a significant improvement in load time for all Aurelia apps, both in bundled and unbundled scenarios. Here's why:

  • Each library is now deployed as a single module. For unbundled dev scenarios, this reduces the number of requests, making development refreshes snappier. For bundled scenarios, this reduces the number of dynamic module lookups needed by the ES6 loader, thereby reducing app load times. Additionally, each library is smaller in size due to the reduction of module wrapper and compiler generated code needed to build a single module vs. multiple.
  • We recently discovered a flaw in the system.register module format that we were using to compile our modules with. This design flaw caused certain ES6 code scenarios to result in an exponential number of module linkage operations. The design flaw was quickly addressed by Guy Bedford in his update to the spec and implementation in SystemJS and Tracuer. However, the Babel and TypeScript teams have not yet fixed the issue in their compilers. TypeScript has scheduled the fix for a future milestone, but the Babel team has simply stated that they don't have time to make the fix. That is unfortunate, given that this bug affects all ES6 compiled into the system.register format, independent of app, framework or library. As a result, we've switched the module format we use from system.register to AMD. This results in no changes to behavior or code, but removes the load performance issues caused by the system.register flaw. The result of this change is that load times are much faster. If you have experience or interest in compilers, you may wish to assist the Babel team in addressing their issue.
  • We've also made minor performance enhancements throughout the code base. In this iteration there have been improvements to metadata lookup speed as well as dynamic composition module Id lookups.

TypeScript Support

With this set of releases, we're happy to finally provide official, TypeScript definition files for each of our libraries. These libraries are generated directly from our source code and will be included with every release from here on out and always kept up to date. You will get them automatically through jspm and bower.

Approach

We've been experimenting with a number of different approaches to delivering high-fidelity, accurate TypeScript definition files. Our current approach utilizes a Babel plugin. Part of Babel's architecture allows it to correctly parse TypeScript type syntax, including interfaces and generics. However, Babel doesn't do anything with this information. The plugin we've been contributing to hooks into the compilation process and uses the type information to generate our d.ts files. As a result, we can stay as close to the most up-to-date ES Next standards but augment our code with types for d.ts generation.

This approach appears to be working well. However, most of our definition files should be considered a "work in progress" for the moment because we have not finished adding all the type information. This should happen over the next couple of weeks and we invite you, as always, to send pull requests to assist us if this is of interest to you.

Correspondent to this, Core Aurelia Team Member Michael Graham is investigating cross-compile with TypeScript. We think it would be very interesting if we could establish a technique by which we could compile our source with both compilers.

New Plugins

We're working on a number of optional plugins for Aurelia. They aren't all ready yet but we wanted to provide a brief list here so you know what is being worked on:

  • animator-css, animator-velocity, animator-greensock, animator-tinyanimate - Aurelia supports a pluggable animation system and we're providing out-of-the-box support for the most popular animation libraries today.
  • http-client - A leight-weight service for making HTTP requests. It includes a fluent configuration and request API as well as strong testability support.
  • fetch-client - An alternative to http-client based on the upcoming Fetch standard. It has many of the same benefits as http-client but is more forward-looking and gains the benefits associated with the Fetch spec.
  • validation - Provides a fluent API for adding validation logic to models and connecting that to view feedback.
  • i18n - Adds strong support for internationalization to your apps. Integrates with the validation library and the router.
  • ui-virtualization - Services, custom elements and custom attributes that enable list virtualization, providing high performance and memory efficient rendering of infinite or extremely large lists. Includes scrolling and touch support.
  • modal - Provides support for modal dialogs.
  • computed - Automatically detects dependencies in getter-based properties and configures optimized observation for the binding system, which doesn't use dirty checks.
  • and more coming...

These are just the official plugins being created by our team. Many other are being created by the community. We hope to highlight several of those in the future.

Updating

If you want to update to the latest versions of Aurelia libraries, one of our team members has constructed the following JSPM command to assist you.

jspm install aurelia-animator-css aurelia-binding aurelia-bootstrapper aurelia-dependency-injection aurelia-framework aurelia-http-client aurelia-router aurelia-event-aggregator aurelia-history-browser aurelia-loader-default aurelia-loader aurelia-metadata aurelia-route-recognizer aurelia-templating-binding aurelia-templating-resources aurelia-templating-router aurelia-templating aurelia-logging aurelia-task-queue aurelia-history aurelia-path  

Learning and Training

The last two weeks have yielded great opportunities to learn Aurelia. If you want a one-hour introduction to Aurelia, including a discussion of philosophy, strategy, app building and roadmap, check out this presentation from NDC Oslo. If you are a Pluralsight subscriber, you also now have access to a new course by Core Aurelia Team Member, K. Scott Allen, Building Applications with Aurelia. We're also pleased to share that there are more Pluralsight courses presently in development, so you can look forward to additional materials in the coming months.

If you need additional or more in-depth training, mentoring, code-review or development support, either remote or on-site, please don't hesitate to contact Durandal Inc.. Our company, core contributors and strategic partners would be happy to assist your team in any way we can.

In the coming months there will be additional opportunities. Please sign up for our mailing list as that will help us to keep you informed as well as provide you with some special benefits down the road.

Next Steps

As you can see, our march towards beta is continuing steadily. We are shrinking the number of breaking changes with each release, improving performance and language support and helping to enhance the ecosystem with a solid collection of optional modules.

Our core remaining goals between now and Beta are as follows:

  • Bug Fixes - We'll continue to squash bugs as they arise.
  • New Features - The bulk of our v1 feature set is complete now. There are a couple of additional scenarios we want to open up in our templating library such as progressive enhancement and using aurelia for Web Components apart from the framework. You'll see these types of final use-case-oriented features coming one at a time over the next couple of releases.
  • Performance - We are working on benchmarking and have a comprehensive strategy to make Aurelia blazingly fast. Each release you see from now on out will include explicit performance enhancements, starting with today's improvements to load time.
  • Documentation - We are currently developing a rich documentation platform for Aurelia and its ecosystem. Along with this platform, we'll be greatly expanding our documentation.

You can expect Beta to hit in about 2 months or so.

View Comments...