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

Lesson learnt building Single Page Application

sporto
April 11, 2014

Lesson learnt building Single Page Application

sporto

April 11, 2014
Tweet

More Decks by sporto

Other Decks in Technology

Transcript

  1. profile dashboard clients search new edit reports orders list search

    ... products list edit ... a large SPA ! deals with multiple concerns
  2. CONSISTENT STATE IS HARD Trade off Stale information or Big

    overhead in complexity and performance
  3. Use a lib, there are many REACTIVE VIEWS Angular, Ember,

    CanJS, React, Rivets, Knockout, Stick-it, etc, etc ...
  4. Code that depends on other code ! ! ! APP.Car

    = App.Vehicle.extend(...) CODE ORGANISATION
  5. Use some kind of modular system e.g. • Require JS

    • Angular • Module JS CODE ORGANISATION
  6. We are way too optimistic ! something: function (args) {

    var res = somethingElse(args); ... }
  7. ! foo.save(). then(function () { // do something when saved

    }); What happens when saving? What happens if it fails?
  8. Tech changes That awesome thing today is the legacy of

    tomorrow ! We learn better ways DON'T LOCK YOURSELF
  9. Do you really need that abstraction? ! e.g. Coffeescript, HAML-Coffee,

    Traceur, Clojurescript, GWT, Typescript, etc KEEP YOUR STACK SIMPLE
  10. K.I.S. != don't use stuff ! If it adds a

    lot of value, then great KEEP YOUR STACK SIMPLE
  11. profile dashboard clients search new edit reports orders list search

    ... products list edit ... instead of ! having a big SPA
  12. better to ! have many small ones orders list search

    ... reports clients search new edit reports dashboard server
  13. ... you can write large programs in JavaScript. You just

    can’t maintain them. Anders Hejlsberg - Lead architect C# and Typescript The secret to building large apps is never build large apps. Justin Meyer, author JavaScriptMVC Any darn fool can make something complex; it takes a genius to make something simple. Albert Einstein