What would Tomster do ?

Widen your horizons and see, from the perspective of an Ember.js developer, how some situations faced when building iOS apps or web apps , are treated in the browserland.

Who am I?

Julien Palmas

  •   @bartocc
  •   @bartocc
  •   julien@crx.io

Back in 2004

  • Graduated as an engineer in the printing industry
  • First job was as a Mac OS X Cocoa developer

From Cocoa to Ember.js

Nowadays

I build Single Page Apps with
Ember.js and Ruby on Rails

Who is Tomster?

A framework for creating ambitious
web applications.

Who knows Ember.js?

Sproutcore & MobileMe heir

Popular Ember.js apps

http://builtwithember.io/

Scenario N°1

Project structure, tooling and boilerplate

Possible Cocoa approaches

  • MVC
  • Xcode templates
  • Playground
Ember.js comes with a CLI tool
  • Convention over configuration
  • Common project structure
  • Code generators
  • Live reload

Convention over configuration

Common project structure

Initialize your project

Code generators

Live reload

http://localhost:4200


Scenario N°2

Update the UI when underlying model changes

Possible Cocoa approaches

  • Manual update from controller…
  • Key-Value Observing
  • RxSwift (and others)

HTMLBars (.hbs) templates

Controllers define the context

Computed Properties automatically update the values

Now we can refactor the template

But what if user interactions modify the model?

Scenario N°3

Testing the UI before building the API

Possible Cocoa approaches

  • OHHTTPStubs
  • Nocilla

Ember CLI MIRAGE

Build, test and demo your app using a client-side server

Define your endpoints

Create factories with fake data

Define your model structure

Seed data for the development environment

and consume it in your Ember.js app

Or write an acceptance test with custom data

Simulate even more situations

Questions?

   Julien Palmas
   @bartocc
   julien@crx.io

https://bartocc.github.io/frenchkit-2017-slides/