Refresh Tallahassee: The RE/MAX Front End Story

Rachael L Moore
Rachael L MooreSenior UI Engineer at OpenTable um OpenTable
Refresh Tallahassee
RE/MAX Front End Story
function moore (you) {
  var me = {
      name: Rachael L Moore,
      tel: (646) 504-0616,
      tweet: @morewry
  };
  return { success: you + me };
}
Refresh Tallahassee: The RE/MAX Front End Story
Performance
○   High availability
○   Efficient use of resources
○   Fast response
○   Quick transfer & load times
Maintainability
○   Easy to add new content
○   Easy to move content
○   Easy to remove content
○   Easy to identify problem code
Thick Client
○   Runs on client side
○   Natural fit for web
○   Lower server requirements
○   Lowers cost
○   Increases availability
Require.js
○ Asynchronous file loader
○ Based on CommonJS AMD proposal
○ Important for performance
○ Helps with maintainability
https://www.youtube.com/watch?v=eX1d6ugKd1g


Click to play video -- Example of loading
files (particularly JS) asynchronously with
Require.js
Require.js Config
○ baseUrl
            require.config({
○ paths
               baseUrl: "/js/libs",
               paths: {
                  "app": "/js/app",
                  "jquery": "..."
               }
            });
Require.js Modules
○ ID (optional)
                     define(
○ Dependencies          id,
                        [dependencies],
  array (optional)      function(){
                           // callback
○ Callback
                        }
  function           );
Backbone.js
○ Lightweight
○ Works with JSON
○ Keeps back end data in sync
  with front end
○ Provides structure for models &
  views
https://www.youtube.com/watch?v=zmRIBAKQToI

Click to play video -- Example of backbone
view and model in action
Backbone.js Models
○ attributes
○ initialize       var Listing =
                   Backbone.Model.extend({
○ custom methods    initialize: function() {},
                    custom: function() {}
                   });
Backbone.js Views
○ el (DOM
                   var ListingDetail =
                   Backbone.View.extend({
  context)
                    events: {
○ events             "click .btn": "qmToggle",
                    },
○ initialize        initialize: function () {},
                    render: function () {},
○ render            qmToggle: function () {}
                   });
○ custom methods
Mustache
○ Logic-less templates
○ Hogan.js on client side
○ Nustache on server side
https://www.youtube.com/watch?v=EFiilk2LQLM

Click to play video -- Example of Hogan (client
side) and Nustache (server side) rending HTML
using the same Mustache templates
Mustache Tags
○ Variables
○ Sections
                      {{#pages}}
 ■ If   (basically)      <a href="{{url}}">
                            {{num}}
 ■ Loop                  </a>
                      {{/pages}}
Sass
○ Valid CSS is valid Sass
○ Outputs plain CSS
○ Provides valuable features to
  developers
Sass Import
CSS                     Sass

@import "buttons.css"   @import "buttons"




Unlike CSS imports, Sass imports
don't necessarily generate
another HTTP request.
Sass Variables
CSS                 Sass

.error {            .error {
  color: #d40015;       color: $error-color;
}                   }
Sass Mixins
CSS                                   Sass

.error {                              .error {
  color: #d40015;                         color: $error-color;
  background-image: -webkit-linear-
gradient(#fdf2f3, #f4bfc4);               @include background(
  background-image: -moz-linear-             linear-gradient(
gradient(#fdf2f3, #f4bfc4);
  background-image: -o-linear-                 lighten($error-color, 95%),
gradient(#fdf2f3, #f4bfc4);
  background-image: linear-gradient
                                               lighten($error-color, 75%)
(#fdf2f3, #f4bfc4);                         )
  background-color: #fdf2f3;
                                          );
}                                     }
Sass Placeholders
CSS                 Sass

.error {            %error {
  color: #d40015;       color: $error-color;
}                   }



Placeholders are like classes,
except they don't get output
until they are used.
Sass Extend
CSS                                             Sass

.error,                                         .button-delete {
.button-delete {                                  @extend .error;
  color: #d40015;                               }
  background-image:   -webkit-linear-gradient
(#fdf2f3, #f4bfc4);
  background-image:   -moz-linear-gradient
(#fdf2f3, #f4bfc4);
  background-image:   -o-linear-gradient
(#fdf2f3, #f4bfc4);
  background-image:   linear-gradient
(#fdf2f3, #f4bfc4);
  background-color:   #fdf2f3;

}
Sass + OOCSS
      =
  Awesome
Semantics
○ Study of meaning
○ "What is this?"
○ Has > 1 answer
Content Semantics
○ Document = HTML
○ Internal
  Real estate agent class="agent"
○ External
  A person, i.e. microformat hCard
Visual Semantics
○ The vocabulary for CSS
○ Two categories
 ■ Skeleton
 ■ Skin
Analyze the design
Refresh Tallahassee: The RE/MAX Front End Story
Identify Skeletons
Step 1: Find repeating structures



"Abstractable layout patterns"
Refresh Tallahassee: The RE/MAX Front End Story
Skeletons
○ Inline block text next to others:
  inline block layout
○ Floating complex blocks next to
  others: grid layout


  display, float, position, width
Identify Skins
2. Find repeating skins



 "Repeating visual qualities"
Refresh Tallahassee: The RE/MAX Front End Story
Skins
○ Headings & Links: color, font
○ Containers & Buttons: bg color &
  gradient, shadow, borders
○ Icons



color, background, border,             text-shadow,
          box-shadow, border-radius, etc.
Identify Modules
Step 3: Find content modules



"Verbally identifiable content"
Refresh Tallahassee: The RE/MAX Front End Story
Modules
○ Search results
  ○   Listing
○ Refine search toolbar
○ Breadcrumbs
Combine
HTML                                Sass

<article class="listing">           .listing { @extend %skin-12; }
                                    .listing-head { @extend %grid-row; }
  <header class="listing-head">
                                    .listing-title {
    <h1 class="listing-title" />       @extend %grid-unit;
    <dl class="listing-price />        @extend %text-14;
  </header>                            @extend %width-2of3;
  <div class="listing-body">        }
                                    .listing-price {
    <img class="listing-img">
                                       @extend %grid-unit;
    <div class="listing-caption">      @extend %text-20;
     ...                               @extend %width-1of3;
    </div>                          }
                                    .listing-body { @extend %grid-row; }
  </div>
                                    .listing-img { @extend %grid-unit; }
</article>                          .listing-caption { @extend %grid-last; }
1 von 39

Recomendados

Sass, Compass and the new tools - Open Web Camp IV von
Sass, Compass and the new tools - Open Web Camp IVSass, Compass and the new tools - Open Web Camp IV
Sass, Compass and the new tools - Open Web Camp IVDirk Ginader
3.1K views97 Folien
IE9에서 HTML5 개발하기 von
IE9에서 HTML5 개발하기IE9에서 HTML5 개발하기
IE9에서 HTML5 개발하기Reagan Hwang
642 views45 Folien
Oocss & progressive css3 selectors von
Oocss & progressive css3 selectorsOocss & progressive css3 selectors
Oocss & progressive css3 selectorsdaniel_sternlicht
1.1K views40 Folien
Using Sass - Building on CSS von
Using Sass - Building on CSSUsing Sass - Building on CSS
Using Sass - Building on CSSSayanee Basu
1K views30 Folien
CSS Best Practices - tcworld 2018, Scott DeLoach, ClickStart von
CSS Best Practices - tcworld 2018, Scott DeLoach, ClickStartCSS Best Practices - tcworld 2018, Scott DeLoach, ClickStart
CSS Best Practices - tcworld 2018, Scott DeLoach, ClickStartScott DeLoach
123 views4 Folien
Haxe for Flash Platform developer von
Haxe for Flash Platform developerHaxe for Flash Platform developer
Haxe for Flash Platform developermatterhaxe
2.5K views26 Folien

Más contenido relacionado

Was ist angesagt?

Aggregation Framework in MongoDB Overview Part-1 von
Aggregation Framework in MongoDB Overview Part-1Aggregation Framework in MongoDB Overview Part-1
Aggregation Framework in MongoDB Overview Part-1Anuj Jain
1.4K views23 Folien
Implementing Awesome: An HTML5/CSS3 Workshop von
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopShoshi Roberts
3.5K views57 Folien
Aggregation Framework MongoDB Days Munich von
Aggregation Framework MongoDB Days MunichAggregation Framework MongoDB Days Munich
Aggregation Framework MongoDB Days MunichNorberto Leite
2K views45 Folien
Jina Bolton von
Jina BoltonJina Bolton
Jina BoltonCarsonified Team
7.3K views81 Folien
CSS3 pronti all'uso von
CSS3 pronti all'usoCSS3 pronti all'uso
CSS3 pronti all'usoFilippo Buratti
304 views24 Folien
Web Development for Mobile: GTUG Talk at Google von
Web Development for Mobile: GTUG Talk at GoogleWeb Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at GoogleEstelle Weyl
4.7K views49 Folien

Was ist angesagt?(16)

Aggregation Framework in MongoDB Overview Part-1 von Anuj Jain
Aggregation Framework in MongoDB Overview Part-1Aggregation Framework in MongoDB Overview Part-1
Aggregation Framework in MongoDB Overview Part-1
Anuj Jain1.4K views
Implementing Awesome: An HTML5/CSS3 Workshop von Shoshi Roberts
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
Shoshi Roberts3.5K views
Aggregation Framework MongoDB Days Munich von Norberto Leite
Aggregation Framework MongoDB Days MunichAggregation Framework MongoDB Days Munich
Aggregation Framework MongoDB Days Munich
Norberto Leite2K views
Web Development for Mobile: GTUG Talk at Google von Estelle Weyl
Web Development for Mobile: GTUG Talk at GoogleWeb Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at Google
Estelle Weyl4.7K views
The Near Future of CSS von Rachel Andrew
The Near Future of CSSThe Near Future of CSS
The Near Future of CSS
Rachel Andrew109.8K views
Miscelaneous Debris von frewmbot
Miscelaneous DebrisMiscelaneous Debris
Miscelaneous Debris
frewmbot261 views
刘平川:【用户行为分析】Marmot实践 von taobao.com
刘平川:【用户行为分析】Marmot实践刘平川:【用户行为分析】Marmot实践
刘平川:【用户行为分析】Marmot实践
taobao.com1.2K views
MongoUK - PHP Development von Boxed Ice
MongoUK - PHP DevelopmentMongoUK - PHP Development
MongoUK - PHP Development
Boxed Ice931 views
C++ Programming - 8th Study von Chris Ohk
C++ Programming - 8th StudyC++ Programming - 8th Study
C++ Programming - 8th Study
Chris Ohk1.1K views
Learning jQuery in 30 minutes von Simon Willison
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutes
Simon Willison53.4K views

Destacado

3a8 picture driven computing in assistive von
3a8 picture driven computing in assistive3a8 picture driven computing in assistive
3a8 picture driven computing in assistiveAEGIS-ACCESSIBLE Projects
491 views12 Folien
Microformats I: What & Why von
Microformats I: What & WhyMicroformats I: What & Why
Microformats I: What & WhyRachael L Moore
576 views27 Folien
Distributing UI Libraries: in a post Web-Component world von
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component worldRachael L Moore
553 views68 Folien
Operations Tooling for UI - DevOps for CSS Developers von
Operations Tooling for UI - DevOps for CSS DevelopersOperations Tooling for UI - DevOps for CSS Developers
Operations Tooling for UI - DevOps for CSS DevelopersRachael L Moore
413 views130 Folien
Creating GUI container components in Angular and Web Components von
Creating GUI container components in Angular and Web ComponentsCreating GUI container components in Angular and Web Components
Creating GUI container components in Angular and Web ComponentsRachael L Moore
493 views144 Folien
Creating GUI Component APIs in Angular and Web Components von
Creating GUI Component APIs in Angular and Web ComponentsCreating GUI Component APIs in Angular and Web Components
Creating GUI Component APIs in Angular and Web ComponentsRachael L Moore
848 views179 Folien

Destacado(6)

Distributing UI Libraries: in a post Web-Component world von Rachael L Moore
Distributing UI Libraries: in a post Web-Component worldDistributing UI Libraries: in a post Web-Component world
Distributing UI Libraries: in a post Web-Component world
Rachael L Moore553 views
Operations Tooling for UI - DevOps for CSS Developers von Rachael L Moore
Operations Tooling for UI - DevOps for CSS DevelopersOperations Tooling for UI - DevOps for CSS Developers
Operations Tooling for UI - DevOps for CSS Developers
Rachael L Moore413 views
Creating GUI container components in Angular and Web Components von Rachael L Moore
Creating GUI container components in Angular and Web ComponentsCreating GUI container components in Angular and Web Components
Creating GUI container components in Angular and Web Components
Rachael L Moore493 views
Creating GUI Component APIs in Angular and Web Components von Rachael L Moore
Creating GUI Component APIs in Angular and Web ComponentsCreating GUI Component APIs in Angular and Web Components
Creating GUI Component APIs in Angular and Web Components
Rachael L Moore848 views

Similar a Refresh Tallahassee: The RE/MAX Front End Story

Accelerated Stylesheets von
Accelerated StylesheetsAccelerated Stylesheets
Accelerated StylesheetsWynn Netherland
1.3K views147 Folien
Think Vitamin CSS von
Think Vitamin CSSThink Vitamin CSS
Think Vitamin CSSNathan Smith
10K views52 Folien
The Creative New World of CSS von
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSSRachel Andrew
2K views144 Folien
CSS3 Takes on the World von
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the WorldJonathan Snook
1.5K views54 Folien
Django at the Disco von
Django at the DiscoDjango at the Disco
Django at the DiscoRichard Leland
791 views26 Folien
Django at the Disco von
Django at the DiscoDjango at the Disco
Django at the DiscoRichard Leland
450 views26 Folien

Similar a Refresh Tallahassee: The RE/MAX Front End Story(20)

The Creative New World of CSS von Rachel Andrew
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
Rachel Andrew2K views
GOTO Berlin - You can use CSS for that von Rachel Andrew
GOTO Berlin - You can use CSS for thatGOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for that
Rachel Andrew1.3K views
The CSS of Tomorrow (Front Row 2011) von Peter Gasston
The CSS of Tomorrow (Front Row 2011)The CSS of Tomorrow (Front Row 2011)
The CSS of Tomorrow (Front Row 2011)
Peter Gasston1.7K views
[Coscup 2012] JavascriptMVC von Alive Kuo
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
Alive Kuo1.3K views
Front-End Dev Tools von Netguru
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev Tools
Netguru1.1K views
SASS, Compass, Gulp, Greensock von Marco Pinheiro
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
Marco Pinheiro1.3K views
What I discovered about layout vis CSS Grid von Rachel Andrew
What I discovered about layout vis CSS GridWhat I discovered about layout vis CSS Grid
What I discovered about layout vis CSS Grid
Rachel Andrew9.5K views
I Can't Believe It's Not Flash von Thomas Fuchs
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
Thomas Fuchs25K views
Sass Essentials at Mobile Camp LA von Jake Johnson
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LA
Jake Johnson809 views
Simple flat ui css accordion von Samsury Blog
Simple flat ui css accordionSimple flat ui css accordion
Simple flat ui css accordion
Samsury Blog415 views

Refresh Tallahassee: The RE/MAX Front End Story

  • 2. function moore (you) { var me = { name: Rachael L Moore, tel: (646) 504-0616, tweet: @morewry }; return { success: you + me }; }
  • 4. Performance ○ High availability ○ Efficient use of resources ○ Fast response ○ Quick transfer & load times
  • 5. Maintainability ○ Easy to add new content ○ Easy to move content ○ Easy to remove content ○ Easy to identify problem code
  • 6. Thick Client ○ Runs on client side ○ Natural fit for web ○ Lower server requirements ○ Lowers cost ○ Increases availability
  • 7. Require.js ○ Asynchronous file loader ○ Based on CommonJS AMD proposal ○ Important for performance ○ Helps with maintainability
  • 8. https://www.youtube.com/watch?v=eX1d6ugKd1g Click to play video -- Example of loading files (particularly JS) asynchronously with Require.js
  • 9. Require.js Config ○ baseUrl require.config({ ○ paths baseUrl: "/js/libs", paths: { "app": "/js/app", "jquery": "..." } });
  • 10. Require.js Modules ○ ID (optional) define( ○ Dependencies id, [dependencies], array (optional) function(){ // callback ○ Callback } function );
  • 11. Backbone.js ○ Lightweight ○ Works with JSON ○ Keeps back end data in sync with front end ○ Provides structure for models & views
  • 12. https://www.youtube.com/watch?v=zmRIBAKQToI Click to play video -- Example of backbone view and model in action
  • 13. Backbone.js Models ○ attributes ○ initialize var Listing = Backbone.Model.extend({ ○ custom methods initialize: function() {}, custom: function() {} });
  • 14. Backbone.js Views ○ el (DOM var ListingDetail = Backbone.View.extend({ context) events: { ○ events "click .btn": "qmToggle", }, ○ initialize initialize: function () {}, render: function () {}, ○ render qmToggle: function () {} }); ○ custom methods
  • 15. Mustache ○ Logic-less templates ○ Hogan.js on client side ○ Nustache on server side
  • 16. https://www.youtube.com/watch?v=EFiilk2LQLM Click to play video -- Example of Hogan (client side) and Nustache (server side) rending HTML using the same Mustache templates
  • 17. Mustache Tags ○ Variables ○ Sections {{#pages}} ■ If (basically) <a href="{{url}}"> {{num}} ■ Loop </a> {{/pages}}
  • 18. Sass ○ Valid CSS is valid Sass ○ Outputs plain CSS ○ Provides valuable features to developers
  • 19. Sass Import CSS Sass @import "buttons.css" @import "buttons" Unlike CSS imports, Sass imports don't necessarily generate another HTTP request.
  • 20. Sass Variables CSS Sass .error { .error { color: #d40015; color: $error-color; } }
  • 21. Sass Mixins CSS Sass .error { .error { color: #d40015; color: $error-color; background-image: -webkit-linear- gradient(#fdf2f3, #f4bfc4); @include background( background-image: -moz-linear- linear-gradient( gradient(#fdf2f3, #f4bfc4); background-image: -o-linear- lighten($error-color, 95%), gradient(#fdf2f3, #f4bfc4); background-image: linear-gradient lighten($error-color, 75%) (#fdf2f3, #f4bfc4); ) background-color: #fdf2f3; ); } }
  • 22. Sass Placeholders CSS Sass .error { %error { color: #d40015; color: $error-color; } } Placeholders are like classes, except they don't get output until they are used.
  • 23. Sass Extend CSS Sass .error, .button-delete { .button-delete { @extend .error; color: #d40015; } background-image: -webkit-linear-gradient (#fdf2f3, #f4bfc4); background-image: -moz-linear-gradient (#fdf2f3, #f4bfc4); background-image: -o-linear-gradient (#fdf2f3, #f4bfc4); background-image: linear-gradient (#fdf2f3, #f4bfc4); background-color: #fdf2f3; }
  • 24. Sass + OOCSS = Awesome
  • 25. Semantics ○ Study of meaning ○ "What is this?" ○ Has > 1 answer
  • 26. Content Semantics ○ Document = HTML ○ Internal Real estate agent class="agent" ○ External A person, i.e. microformat hCard
  • 27. Visual Semantics ○ The vocabulary for CSS ○ Two categories ■ Skeleton ■ Skin
  • 30. Identify Skeletons Step 1: Find repeating structures "Abstractable layout patterns"
  • 32. Skeletons ○ Inline block text next to others: inline block layout ○ Floating complex blocks next to others: grid layout display, float, position, width
  • 33. Identify Skins 2. Find repeating skins "Repeating visual qualities"
  • 35. Skins ○ Headings & Links: color, font ○ Containers & Buttons: bg color & gradient, shadow, borders ○ Icons color, background, border, text-shadow, box-shadow, border-radius, etc.
  • 36. Identify Modules Step 3: Find content modules "Verbally identifiable content"
  • 38. Modules ○ Search results ○ Listing ○ Refine search toolbar ○ Breadcrumbs
  • 39. Combine HTML Sass <article class="listing"> .listing { @extend %skin-12; } .listing-head { @extend %grid-row; } <header class="listing-head"> .listing-title { <h1 class="listing-title" /> @extend %grid-unit; <dl class="listing-price /> @extend %text-14; </header> @extend %width-2of3; <div class="listing-body"> } .listing-price { <img class="listing-img"> @extend %grid-unit; <div class="listing-caption"> @extend %text-20; ... @extend %width-1of3; </div> } .listing-body { @extend %grid-row; } </div> .listing-img { @extend %grid-unit; } </article> .listing-caption { @extend %grid-last; }