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

Frontend Choices

Avatar for Alex Coles Alex Coles
September 18, 2014

Frontend Choices

Avatar for Alex Coles

Alex Coles

September 18, 2014
Tweet

More Decks by Alex Coles

Other Decks in Technology

Transcript

  1. Single Page Application Architecture • Chunking • Controller • Templating

    • Routing • Real-time Communicaton • Local storage min MAX
  2. Curated content vs. dynamic • how many combinations of a

    unique set of data: • a blog with comments • a hotel page with reviews • a dashboard
  3. “Rails Way” back in 2005 • Server Generated HTML (ERB,

    etc.) • Prototype • Scriptaculous • RJS
  4. RJS <div  id="items"></div>   <%=  link_to_remote  'Add  to  cart',  url:

     {  controller:  'cart',   action:  'add_to_cart'  }%> erb view class  CartController  <  ActionController::Base      def  add_to_cart          @item  =  CartItem.new          @cart.items  <<  @item      end   end controller page.insert_html    :bottom,  :items,  partial:  'item',  object:  @item   page.replace_html  :items_count,  I18n.t(:item,  count:   @cart.items.count)   rjs view
  5. “Rails Way” now • Server Generated HTML (ERB, Slim, HAML

    etc.) • jQuery • jQuery UI • Server generated JavaScript Responses (SJR)
  6. Ember.js is most like Rails • Everything should inherit from

    Ember.Object
 (think ActiveRecord::Base.inherited) • Routing DSL • Vocabulary (templates, partials, etc.)
  7. Volt is a framework for building data rich web applications

    shockingly fast. Play Video ! Get Started " Home Getting Started Docs API Blog Community # Volt Framework voltframework.com