Professional Patterns
Knowing how things work is one thing, but knowing how they're used by experts in the wild will help you learn the easy way instead of the hard way.
-
Professional PatternsWelcome & Recap
We'll recap everything we've learned so far, so it's fresh in our minds.
-
Professional PatternsCRUD Mixins
There are several types of repetitive routes that most apps end up needing for the following purposes
- Creating a new record
- Updating an existing record
- Showing a record
- Showing a list of records
We'll devise a common abstraction for each of these, and DRY up our code by establishing some conventions within our project.
-
Professional PatternsEXERCISE: CRUD Mixins
Let's DRY up our routes for showing a list of records, and the route for creating a new record, by building some general purpose mixins.
-
Professional PatternsES2016, ES2017 & ES2018 in Ember
You're no doubt aware of new language features coming to the JavaScript world, but since some of us have years of experience writing ES5 code, it's hard to develop new habits that take advantage of the new stuff.
We'll look at some ideal places to apply destructured assignment, enhanced object literals, ES6 classes, async/await and more, with a specific focus on how the new ideas mix well with Ember.
-
Professional PatternsEXERCISE: Async/Await
- Rewrite our logout logic using async/await
- Write an acceptance test for visiting a record and comment on it, using async/await
-
Professional PatternsValidation
ember-cp-validations takes an approach to validating ember-data records (or really, any
Ember.Object
subclass) that's built entirely using computed properties. We'll look at how to apply this library, customize error messages, display them on the screen, and even integrate with ember-data to surface server-side errors in the UI. -
Professional PatternsEXERCISE: Client-Side Comment Validation
Implement clients-side validation for comments, where anonymous comments must be less than 140 characters, but non-anonymous comments can be up to 255.
-
Professional PatternsLunch
Break for Lunch