Chapter 1. Getting Started

Developer experience is a key strength of Aurelia. Its authors paid careful attention to every aspect of the development process, so using the framework is seamless and fluid, and so the learning curve is as smooth as possible.

This book humbly attempts to follow the same philosophy. It will teach you how you can use Aurelia to build real-world applications from A to Z. In fact, while reading the book and following the code samples, that's exactly what you will do. You will start by setting up your development environment and creating the project, then I will walk you through concepts such as routing, templating, data binding, automated testing, internationalization, and bundling. We will discuss application design, communication between components, and integration of third parties. We will cover every topic most modern, real-world single-page applications require.

In this first chapter, we will start by defining some terms that will be used throughout the book. We will quickly cover some core Aurelia concepts. Then we will take a look at the core Aurelia libraries and see how they interact with each other to form a complete, full-featured framework. We will see also what tools are needed to develop an Aurelia application and how to install them. Finally, we will start creating our application and explore its global structure.

Terminology

As this book is about a JavaScript framework, JavaScript plays a central role in it. If you are not completely up-to-date with the terminology, which has changed a lot in the last few years, let me clear a few things up.

JavaScript (or JS) is a dialect, or implementation, of the ECMAScript (ES) standard. It is not the only implementation, but it is definitely the most popular. In this book, I will use the JS acronym to talk about actual JavaScript code or code files and the ES acronym when talking about an actual version of the ECMAScript standard.

Like everything in computer programing, the ECMAScript standard evolves over time. At the time of writing, the latest version is ES2016 and was published in June 2016. It was originally called ES7, but TC39, the committee drafting the specification, decided to change their approval and naming model, hence the new name.

The previous version, named ES2015 (ES6) before the naming model changed, was published in June 2015 and was a big step forward as compared to the version before it. This older version, named ES5, was published in 2009 and was the most recent version for six years, so it is now widely supported by all modern browsers. If you have been writing JavaScript in the last five years, you should be familiar with ES5.

When they decided to change the ES naming model, the TC39 committee also chose to change the specification's approval model. This decision was made in an effort to publish new versions of the language at a quicker pace. As such, new features are being drafted and discussed by the community, and must pass through an approval process. Each year, a new version of the specification will be released, comprising the features that were approved during the year.

Those upcoming features are often referred as ESNext. This term encompasses language features that are approved or at least pretty close to approval but not yet published. It can be reasonable to expect that most or at least some of those features will be published in the next language version.

As ES2015 and ES2016 are still recent versions, they are not fully supported by most browsers. Moreover, ESNext features have typically no browser support at all.

Those multiple names can be pretty confusing. To make things simpler, I will stick with the official names ES5 for the previous version, ES2016 for the current version and ESNext for the next version. But that's only my preference; in the following chapters, we may encounter some tools or libraries still using the original nomenclature.

Before going any further, you should make yourself familiar with the features introduced by ES2016 and with ESNext decorators, if you are not already. We will use these features throughout the book.

Note

If you don't know where to start with ES2015 and ES2016, you can find a great overview of the new features on Babel's website:

https://babeljs.io/docs/learn-es2015/

As for ESNext decorators, Addy Osmani, a Google engineer, explained them pretty well:

https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841

For further reading, you can take a look at the feature proposals (decorators, class property declarations, async functions, and so on) for future ES versions:

https://github.com/tc39/proposals

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.148.186