About

Dieter Pisarewski
    Software Developer


Contact Information:
    dp@megorei.com
    http://www.megorei.com
    megorei Software GmbH 
    Hohe Brücke 1 
    20459 Hamburg



Newsfilter

Single-page Web-App built on top of 

Ember.js and Rails

Overview

  • Newsfilter app
  • Ember features
  • Pros & Cons
  • Summary

Newsfilter app

Use cases:

  • Add RSS/Atom feeds
  • Edit and delete feeds
  • Tag feeds      
  • View articles from feeds
  • Filter articles by tags and feeds
  • Show best articles and articles from own feeds
  • Like articles    

Newsfilter app

 

Ember features

  • Classes
  • Computed properties & Observers
  • Non-standard MVC
  • Auto-updating templates
  • Run-Loop

Ember features

Classes
  • extend() for inheritance
  • create() for new instance
  • init for initializer
  • get() and set() methods for properties

Ember features

Classes

Ember features

Observers

Ember features

Computed properties

Automatic update when dependency changes

Ember features

MVC


Ember features

Auto-updating templates

  • Bind properties on elements
  • Class bindings

Ember features

Templates: Action handling


Pros & Cons

Pros
  • Better user experience(compared to classic Web-Apps)
  • Bindings & Observers care for automatic updates
  • Generated Controllers, Routes, Views are sufficient for simple use cases
  • Pretty much functionality for client-side/offline applications
  • Well-documented API
  • Client-side rendering(lower server workload)

Pros & Cons

Cons
  • Asynchronous programming
  • If error responses from server are not handled user doesn't know about data loss.
  • Preparing of loaded data for templates can be tricky because of asynchronous behavior and declarative template language.
  • Action handling is spread among Views, Controllers and Routes
  • Duplicated logic an client and server(e.g. validations)
  • Too few code examples / too little community
  • Side effects like in all stateful apps
  • Client-side rendering(higher client workload)

Pros & Cons

Thin vs Fat Clients


Summary

Ember.js is good for:
  • Offline apps
  • Apps where user experience has the highest priority
  • Mobile HTML5 Apps?

Not good for:
  • Apps with complex data model(many associations between entities associations) or complex workflows
  • Apps where user experience is not as important as other aspects

Questions


?

Newsfilter

By Dieter Pisarewski

Newsfilter

  • 2,770