Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Large, Real-world Ember Apps -- What t...

Building Large, Real-world Ember Apps -- What the guides don't tell you

0
views
In this talk, we’ll go over some tips and best practices for creating and maintaining large-scale Ember apps. Creating your own core library, custom resolver types and other D.R.Y. techniques.

This was the slideshow for my Ember.js South California Meetup talk on July 29th, 2014 @ Pivotshare

Jay Phelps

July 29, 2014
Tweet

More Decks by Jay Phelps

Other Decks in Programming

Transcript

  1. WHO I AM •Ember.js contributor •CTO at Pivotshare •Loves code,

    hates condiments. Jay Phelps twitter: @_jayphelps github: @jayphelps
  2. WHAT HAS THAT MEANT FOR US? •Higher initial investment, i.e.

    learning curve. •Rapid iteration after.
  3. EMBRACE THE CONVENTIONS •Create your own “core” library. •Base classes

    with common functionality •Use a custom Ember.Resolver or extend an existing one
  4. EMBRACE THE CONVENTIONS •Create your own “core” library. •Base classes

    with common functionality •Use a custom Ember.Resolver or extend an existing one •Ember-CLI or Ember App Kit
  5. YOUR OWN CORE LIB •Abstract common functionality •Routes, Views, Controllers,

    even Ember.Object itself (if you’re careful) •Don’t .reopen() Ember built-ins, extend!
  6. OR

  7. WHY NOT JUST .REOPEN()? •Limits scope •.reopen() affects ALL existing

    object instances as well •Allows you to use original, if ever needed
  8. WHY NOT JUST .REOPEN()? •Limits scope •.reopen() affects ALL existing

    object instances as well •Allows you to use original, if ever needed •Future-proof (sorta)
  9. WHY NOT JUST .REOPEN()? •Limits scope •.reopen() affects ALL existing

    object instances as well •Allows you to use original, if ever needed •Future-proof (sorta) •e.g. What if Ember introduces the same method of name?
  10. EMBRACE THE CONVENTIONS •Create your own “core” library. •Base classes

    with common functionality •Use a custom Ember.Resolver or extend an existing one
  11. EMBRACE THE CONVENTIONS •Create your own “core” library. •Base classes

    with common functionality •Use a custom Ember.Resolver or extend an existing one •Ember-CLI or Ember App Kit
  12. COMPUTED INJECTIONS •Resolves via type:class-name •Creates an instance of the

    given class when you .get() it •Tied to parent class. i.e. not a singleton.
  13. COMPUTED INJECTIONS Gives you unlimited custom resolver “types”, not just

    services Available via bower if that’s your thing
  14. COMPUTED INJECTIONS Gives you unlimited custom resolver “types”, not just

    services Available via bower if that’s your thing https://github.com/jayphelps/ember-computed-injection