Ember Engines

What is engine?

Isolated, discrete app within container 

App is an engine with booting, event handling, etc.

Why engines?

Monolith

 Engines

Simplicity

Single test coverage

Single codebase

Strict boundaries

Focused testing

Distributied delivery

First, types of engines

Routable

Has its own routes map

Are mounted in app's router

Can be nested

Routeless

Has no routes

Are mounted in templates

Can you imagine examples?

Where are they?

$ ember install ember-engines

It handles in-repo engines (in-repo addons) and external engines served as external addons

But....

Engines are in Ember

Most of the base code is already in Ember 2.4 Core

ember-engines is proof of concept addon that will be merged upstream to Ember Core

So what is in Ember Core and what is in ember-engines?

So, what is in Ember Core?

Engine Class

Ember.Application extends Engine

EngineInstance Class

Ember.ApplicationInstance extends EngineInstance

Engine has registry and initializers

EngineInstance has registry, initializers and container

So, what is in ember-engines?

Basically, not so scary, is it?

Thanks

Source: https://vimeo.com/157688181

Ember Engines

By Kuba Niechcial

Ember Engines

Short introduction to ember-engines based on Ember Global Meetup. Describes some general concepts, without diving into details. Previously presented on Netguru internal meetup.

  • 1,311