SlideShare a Scribd company logo
1 of 39
Download to read offline
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 };
}
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
Identify Skeletons
Step 1: Find repeating structures



"Abstractable layout patterns"
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"
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"
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; }

More Related Content

What's hot

Aggregation Framework in MongoDB Overview Part-1
Aggregation Framework in MongoDB Overview Part-1Aggregation Framework in MongoDB Overview Part-1
Aggregation Framework in MongoDB Overview Part-1Anuj Jain
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopShoshi Roberts
 
Aggregation Framework MongoDB Days Munich
Aggregation Framework MongoDB Days MunichAggregation Framework MongoDB Days Munich
Aggregation Framework MongoDB Days MunichNorberto Leite
 
Web Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at GoogleWeb Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at GoogleEstelle Weyl
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSSRachel Andrew
 
Miscelaneous Debris
Miscelaneous DebrisMiscelaneous Debris
Miscelaneous Debrisfrewmbot
 
刘平川:【用户行为分析】Marmot实践
刘平川:【用户行为分析】Marmot实践刘平川:【用户行为分析】Marmot实践
刘平川:【用户行为分析】Marmot实践taobao.com
 
MongoUK - PHP Development
MongoUK - PHP DevelopmentMongoUK - PHP Development
MongoUK - PHP DevelopmentBoxed Ice
 
PHP Machinist Presentation
PHP Machinist PresentationPHP Machinist Presentation
PHP Machinist PresentationAdam Englander
 
HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherIvano Malavolta
 
C++ Programming - 8th Study
C++ Programming - 8th StudyC++ Programming - 8th Study
C++ Programming - 8th StudyChris Ohk
 
Aggregation in MongoDB
Aggregation in MongoDBAggregation in MongoDB
Aggregation in MongoDBKishor Parkhe
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutesSimon Willison
 

What's hot (16)

Aggregation Framework in MongoDB Overview Part-1
Aggregation Framework in MongoDB Overview Part-1Aggregation Framework in MongoDB Overview Part-1
Aggregation Framework in MongoDB Overview Part-1
 
Implementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 WorkshopImplementing Awesome: An HTML5/CSS3 Workshop
Implementing Awesome: An HTML5/CSS3 Workshop
 
Aggregation Framework MongoDB Days Munich
Aggregation Framework MongoDB Days MunichAggregation Framework MongoDB Days Munich
Aggregation Framework MongoDB Days Munich
 
Jina Bolton
Jina BoltonJina Bolton
Jina Bolton
 
CSS3 pronti all'uso
CSS3 pronti all'usoCSS3 pronti all'uso
CSS3 pronti all'uso
 
Web Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at GoogleWeb Development for Mobile: GTUG Talk at Google
Web Development for Mobile: GTUG Talk at Google
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSS
 
FCIP SASS Talk
FCIP SASS TalkFCIP SASS Talk
FCIP SASS Talk
 
Miscelaneous Debris
Miscelaneous DebrisMiscelaneous Debris
Miscelaneous Debris
 
刘平川:【用户行为分析】Marmot实践
刘平川:【用户行为分析】Marmot实践刘平川:【用户行为分析】Marmot实践
刘平川:【用户行为分析】Marmot实践
 
MongoUK - PHP Development
MongoUK - PHP DevelopmentMongoUK - PHP Development
MongoUK - PHP Development
 
PHP Machinist Presentation
PHP Machinist PresentationPHP Machinist Presentation
PHP Machinist Presentation
 
HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 Refresher
 
C++ Programming - 8th Study
C++ Programming - 8th StudyC++ Programming - 8th Study
C++ Programming - 8th Study
 
Aggregation in MongoDB
Aggregation in MongoDBAggregation in MongoDB
Aggregation in MongoDB
 
Learning jQuery in 30 minutes
Learning jQuery in 30 minutesLearning jQuery in 30 minutes
Learning jQuery in 30 minutes
 

Viewers also liked

Microformats I: What & Why
Microformats I: What & WhyMicroformats I: What & Why
Microformats I: What & WhyRachael L Moore
 
Distributing UI Libraries: in a post Web-Component world
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
 
Operations Tooling for UI - DevOps for CSS Developers
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
 
Creating GUI container components in Angular and Web Components
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
 
Creating GUI Component APIs in Angular and Web Components
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
 

Viewers also liked (6)

3a8 picture driven computing in assistive
3a8 picture driven computing in assistive3a8 picture driven computing in assistive
3a8 picture driven computing in assistive
 
Microformats I: What & Why
Microformats I: What & WhyMicroformats I: What & Why
Microformats I: What & Why
 
Distributing UI Libraries: in a post Web-Component world
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
 
Operations Tooling for UI - DevOps for CSS Developers
Operations Tooling for UI - DevOps for CSS DevelopersOperations Tooling for UI - DevOps for CSS Developers
Operations Tooling for UI - DevOps for CSS Developers
 
Creating GUI container components in Angular and Web Components
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
 
Creating GUI Component APIs in Angular and Web Components
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
 

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

The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSSRachel Andrew
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the WorldJonathan Snook
 
GOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatGOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatRachel Andrew
 
The CSS of Tomorrow (Front Row 2011)
The CSS of Tomorrow (Front Row 2011)The CSS of Tomorrow (Front Row 2011)
The CSS of Tomorrow (Front Row 2011)Peter Gasston
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
Front-End Dev Tools
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev ToolsNetguru
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockMarco Pinheiro
 
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS GridWhat I discovered about layout vis CSS Grid
What I discovered about layout vis CSS GridRachel Andrew
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not FlashThomas Fuchs
 
Sass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LAJake Johnson
 
Simple flat ui css accordion
Simple flat ui css accordionSimple flat ui css accordion
Simple flat ui css accordionSamsury Blog
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Eric Palakovich Carr
 

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

Accelerated Stylesheets
Accelerated StylesheetsAccelerated Stylesheets
Accelerated Stylesheets
 
Think Vitamin CSS
Think Vitamin CSSThink Vitamin CSS
Think Vitamin CSS
 
The Creative New World of CSS
The Creative New World of CSSThe Creative New World of CSS
The Creative New World of CSS
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
GOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for thatGOTO Berlin - You can use CSS for that
GOTO Berlin - You can use CSS for that
 
The CSS of Tomorrow (Front Row 2011)
The CSS of Tomorrow (Front Row 2011)The CSS of Tomorrow (Front Row 2011)
The CSS of Tomorrow (Front Row 2011)
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Front-End Dev Tools
Front-End Dev ToolsFront-End Dev Tools
Front-End Dev Tools
 
SASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, GreensockSASS, Compass, Gulp, Greensock
SASS, Compass, Gulp, Greensock
 
What I discovered about layout vis CSS Grid
What I discovered about layout vis CSS GridWhat I discovered about layout vis CSS Grid
What I discovered about layout vis CSS Grid
 
I Can't Believe It's Not Flash
I Can't Believe It's Not FlashI Can't Believe It's Not Flash
I Can't Believe It's Not Flash
 
Css3
Css3Css3
Css3
 
Sass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LASass Essentials at Mobile Camp LA
Sass Essentials at Mobile Camp LA
 
Simple flat ui css accordion
Simple flat ui css accordionSimple flat ui css accordion
Simple flat ui css accordion
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!
 

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 }; }
  • 3.
  • 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
  • 29.
  • 30. Identify Skeletons Step 1: Find repeating structures "Abstractable layout patterns"
  • 31.
  • 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"
  • 34.
  • 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"
  • 37.
  • 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; }