Build ambitious apps with confidence
Ember.js is a kick-ass framework for building web applications. It's the only tool you need (on the client-side) to craft your idea into a working wonder. However, its strong opinions and heavy reliance on “convention over configuration” can give developers who are new to the framework a hard time figuring out how Ember wants them to do things.
This book helps to overcome that initial frustration, and help you grok Ember a lot faster, by pinpointing the core concepts and explaining them in detail. Once you understand them you are on your way to taming and mastering Ember.js. So don't fear the learning curve.
The book guides you through the steps of building a real application so that you can see how the concepts are applied in practice. You'll learn about the building blocks of Ember one by one, in a way that crushes the steep learning curve. Knowledge is dripped in slowly, chapter by chapter, to prevent you from drowning in a sea of novel information. By improving an existing and working application, you will learn more quickly and new knowledge will sink in deeper.
Already convinced? Skip to the packages.
Are you a student? Check out my student discount.
Want to read a sample chapter first?
Thanks! Now check your email.
Once upon a time...
It all started in September 2013. Having just returned from the first European Ember.js conference, my enthusiasm went through the roof. I wanted to spread the word, for people to realize how beautiful Ember is, for them to know that Ember.js is not that hard to learn. It's just a matter of having the core concepts internalized.
So without proper equipment (and after a few episodes, with a ~$80 mic) I started producing screencasts, a series in which a simple application is developed step-by-step. I sent the first few to my subscribers and kept producing them. And people seemed to have liked them.
Once the screencast series was finished, I switched to blog posts and lengthier articles, and in 2014 I committed to posting something of value each week. Then, after a long labor of (mostly) love, I published the 1st edition of the book in Feburary 2015, that used the then stable Ember version, 1.10.
I was not done, though. As Ember made progress in a neck breaking pace, I kept the book up-to-date with the actual stable version of the framework, and adding material that covered the new features.
Version 2 of the book, that is running on Ember 2, was published about 6 months later and I've been updating the book for every minor version ever since.
Buy once, get all minor updates for free
The first edition of this book followed Ember's journey to its 2.0 release. As Ember gracefully shedded old syntaxes, the book's content was updated not to use those syntaxes, either. When a new feature appeared, I added a section about it, trying to find a practical example for it in the application.
Since Ember follows a 6-week release cycle, that meant frequent book updates in the past, free for all of my customers. I'll follow the same policy on the road to the next Ember milestone and keep the content fresh. It might happen –as it did– that I skip a version, mostly if no new features were introduced in Ember and no deprecations were made.
Table of Contents
Click on chapter names to see a detailed ToC.
1 Preface
- My love affair with Ember.js
- Acknowledgements
2 Introduction to Ember.js
- Why Ember.js
- About this book
- Is this book for you?
- Ambitious goal for an ambitious framework
- The application we are going to build
- Errata
3 Ember CLI
- Setting up Ember CLI
- Creating our application
- Taking a look at a new project
- Starting and stopping the development server
4 Templates and data bindings
- The first template
- Adding assets to the build
5 Routing
- What do we want to achieve?
- Routes set up data
- Moving around with LinkTo
- Using the model property
- Interacting with the app with the Ember Inspector
- Tracked properties
- Routing at the core of Ember
6 Nested routes
- Defining the nested routes
- Full route names
- Stepping through a router transition
- Nested templates
- {{outlet}} is the default template for routes
7 Components
- The idea behind components
- Component specification
- Implementing the component
- Invoking the component
- The component's block form
- Speaking to the outside world
- Data Down Actions Up
- Component invocations as function calls
- Expressions –and clarity– in templates
8 Controllers
- Creating songs
- What not a component?
- Controllers have been with us all along
- Actions
- Rendering the list of songs reactively
- Beware of singletons
- Creating bands
9 Building a catalog
- Services: useful singletons
- Building a store, I mean, a catalog
- Tracking the right thing
- Use the catalog for querying
- Adding songs to the catalog
- Extracting model classes
10 Talking to a back-end
- The back-end
- Replacing the loading and displaying of bands
- Creating a band – for real, this time
- Where did the songs go? (loading related data)
- Creating songs
- Updating song ratings
- Making it shippable
- Creating model instances
- Updating existing model instances
- Fetching relationships
- Too much (more precisely, too many) of a good song
- Adding an identity map
- Are we there yet?
- What about Ember Data?
11 Advanced routing
- Route hooks
- Routing events
- Showing something on the index page
- Redirecting
- Marking links as active
- Skipping model resolution (don't)
- Other route hooks
- Leaving a route
12 Testing
- Clarifying the vocabulary
- Acceptance tests
- To mock or not to mock?
- Integration tests
- Unit tests
- Writing acceptance tests
- Making the first test pass
- Mirage models
- Test creating a band
- Mirage serializers
- Settledness in tests
- Improving tests
- Using data attributes for designating elements in testing
- Using more descriptive (and shorter) assertions
- Writing a custom test helper
- Tips for faster debugging
- pauseTest and resumeTest
- Logging out the response of the Mirage server
- Writing an integration test
- Writing unit tests
13 Query params
- What are query parameters?
- Query parameters in Ember
- Sorting the list of songs
- Listing the songs in ascending order of their title
- Allowing for different sorting criteria
- Creating a query parameter for sorting
- Using links instead of buttons
- Filtering songs by a search term
- Creating a query parameter for the search term
- Taking a look at what we made
14 Loading and error substates
- Loading subroutes
- Error subroutes
15 Helpers
- About helpers
- Capitalizing each word of a name
- Using it in templates, or elsewhere
- Testing a helper
16 Deployment
- Surge
- Heroku
- ember-cli-deploy
- Deploying to S3
17 Afterword
- Your journey with Ember.js
18 Appendix
- Creating your application with Yarn
- ES2015 modules
- Curly braces component invocation
- Presentational vs. Container components
- On the utility of explicit dependency definitions
- The default component template
- async functions
Bonus 1: The EmberMap deal
EmberMap is the maker of outstanding video series on a whole range of different Ember topics including contextual components, data loading, D3 charts and a whole lot more. I'm a huge fan (and subscriber) of the videos Sam and Ryan create. Buying any package gets you a 30-day free subscription to EmberMap (a $29 value)
What you get
The Octane book
15 chapters
This is what you absolutely need to get up & running with Ember.js Octane. Comes in pdf, mobi and epub formats for your reading pleasure.
You'll also get the last version of the Rock and Roll with Ember.js 3 book, just in case.
Free updates
Minor updates roughly every 6 weeks
As Ember releases a new minor version about every 6 weeks, so do I. Pay once for the book, get all the updates for free until the next major Ember milestone*.
Deals
Deals that rock your world
A 30-day free EmberMap subscription, a 30-day extended trial period for Percy and a discounted "Unlimited Plus Projects" Surge plan
A pair of stickers
The official red RaRwE book stickers.
To show your support or just to pimp up your notebook.
A curated Spotify playlist
The best rock songs. Great to code along with the book.
What else could be more fun than listening to these hits while learning a great framework?
Full refund guarantee
60-day money-back guarantee
Comes with no strings attached. Get it? No strings 🎸 attached. Sorry.
Need multiple copies for your team? Skip to the team licenses
Are you a student? I offer a student discount
You want code with that?
This gives you access to the source code repository of the app we build in the book. The end of each chapter is assigned the aptly named tag, so you can quicky jump to a chapter, check out the code or even tweak it to your liking (and to improve your learning).
Source code access
One chapter, one commit
Need multiple copies for your team? Skip to the team licenses
Are you a student? I offer a student discount
Bonus 2: The Percy deal
Percy is a top-notch visual testing service, making sure that your site doesn't break visually when you refactor code/CSS or release new features. Buying the book gives you an extended, 30-day free trial to Percy.
Bonus 3: The Surge deal
Surge is a dead-simple static hosting solution where you can deploy your Ember apps in the blink of an eye. When you buy any book package, you get the unlimited Plus projects Surge plan for $24/mo (normally priced at $30/month).
Hmm, I’m not sure...
-
Does the book really speak Octane?
It absolutely does! Glimmer components, tracked properties, ES6 classes – all the great stuff that makes Octane an amazing developer experience.
-
Is this book for me?
The book starts from the very basics (installing ember-cli, writing your first template, etc.) so if you completely get Ember, this book is probably not for you. If you are just starting out (or about to) or want to understand fundamental concepts in Ember, the book is definitely for you.
-
Do you offer discounts to students?
Yes! Please write me an email and tell me about your school. I'll then send you a discount code for the book.
-
Everything is changing so fast; won't the content be outdated by next week?
As Ember.js moves towards the next major version (edition), I will keep updating the content of the book so that it stays void of deprecation warnings and does not promote practices that are no longer considered idiomatic. In practical terms, this means I'll release a book update after each new stable Ember release, once about every six weeks.
-
I heard Ember is so hard. Will this book help me understand it?
I think there are a handful of key concepts in Ember.js that you need to understand to master it (probably the main one among these is routing). Once you understand these, Ember is not that hard. The intention of the book is to introduce concepts by way of building an actual application, so you see them applied in practice right away. That also helps the learning process. I also encourage you to work through the book as you read it, since that makes things sink in even deeper. You have access to the code repository if you have purchased the middle- or high-tier package. If I failed to explain Ember for you, please send me your purchase receipt to rarwe-book@balinterdi.com within 60 days of purchase and I’ll issue a refund.
-
Updates are free until when exactly?
Octane is the first edition of the framework. Before, it had major versions as most other libraries do, so it was easier for me to say "free updates until next major version". I expect Ember to continue with editions to mark when a set of significant features have all landed in the framework. If so, my guarantee is "free updates until next edition", otherwise I'll probably fall back to the next major version guarantee that in this case would be 5.0.
-
How can I get an invoice for my purchase (and reclaim EU VAT)?
After the purchase Gumroad will send you an email with a receipt that has a link to their invoice generator. There, you'll be able to fill out your company details and, if you're a EU company, reclaim the EU VAT. Read more about this in this FAQ article. or watch the video I recorded about it.
-
I get a "Sorry, this item is not available in your location" error when trying to buy the book. What should I do?
This has happened extremely rarely (one single reported incident so far) but if it does happen to you, your best bet is to use a VPN and access the book's landing page that way. There are lots of stand-alone VPN apps and browser extensions that you can use.
-
What if I don't buy code access but it later turns out I'd like it?
No problem! Just send me your purchase receipt to rarwe-book@balinterdi.com, and I will upgrade you for the price difference.
-
Is the book DRM protected?
No, it’s not. If you would like to share it with a couple of colleagues, go ahead. If you like the book, I'd appreciate if you bought licenses individually. If you're at least five people, please buy a Team License.
-
What if I don't like the book?
I offer a 60-day moneyback guarantee. No strings attached, just send your purchase receipt (or email address) to rarwe-book@balinterdi.com or reply to the welcome email that you received when you purchased.
-
I still have a question, how can I reach you?
That's totally my fault, could you send a quick message to rarwe-book@balinterdi.com with your question? Thank you.
Choose a Package
-
No code access
- The book with 15 chapters
- Free book updates until next milestone
- 60-days money back guarantee
- The EmberMap deal
- The Percy deal
- The Surge deal
- Stickers
- Official Spotify playlist
- Rock & Roll!
-
With code access
- The book with 15 chapters
- Free book updates until next milestone
- 60-days money back guarantee
- The EmberMap deal
- The Percy deal
- The Surge deal
- Stickers
- Official Spotify playlist
- Rock & Roll!
- Access to source code
Need multiple copies? The team license gives access to the above goodies and is good for a team of up to 20 people, for the price of 5.
The included EmberMap deal is also better suited for teams: it gives you access to their Small Team plan, for up to 5 users.
-
No code access
-
With code access
If you need a team license for more than 20 people, please get in touch with me.