RESS:
An Evolution of Responsive Web Design


Dave Olsen, @dmolsen
WVU University Relations - Web
Refresh Pittsburgh, May 15 2012
slideshare.net/dmolsenwvu
programmer
9 years at wvu
wvu has 30,000 students
What I’ll Talk About
 •The Responsive Age
 •What is RESS
 •Two Server-side Solutions
We’ve entered...
The Responsive Age
http://www.alistapart.com/articles/responsive-web-design/
http://flic.kr/p/9UmsCJ
TABLET WEB   DESKTOP WEB
                           It’s All One Web




MOBILE WEB
http://modernizr.com
http://flic.kr/p/9Qp3A
The client is now in charge
Why Be Responsive




One...


            http://flic.kr/p/5pGcyx
Why Be Responsive




One...
URL.
Why Be Responsive




    One...
Set of Mark-up.
Why Be Responsive




  One...
Deployment.
futurefriend.ly
Time to Party...




                   balloons




                              http://flic.kr/p/h6McT
“Not so fast, my friends...”




                               http://flic.kr/p/8x6b8X
RWD Challenges




  Media...
Images & Video
RWD Challenges




3rd Party Content...
  Ads & Social Widgets
RWD Challenges




One Set of Mark-up...
  Double-edged Sword
Learned the hard way...

                          http://happyholidays.wvu.edu
Standards Process




Standards Process is Evolving
                           http://www.w3.org/community/respimg/
Bridging the Gap




Mind the Gap




                     http://flic.kr/p/638wPy
Existing Solutions




adaptive images website




   http://adaptive-images.com/
Take a New Path




image of a path for showing RESS as a way forward




                                       http://flic.kr/p/7cGN8g
What is RESS?
Responsive Web Design +
  Server Side Components
(I have no idea what becomes of the W, D, or C)
“
In a nutshell, RESS combines adaptive
layouts with server side component
(not full page) optimization. So a
single set of page templates define an
entire Web site for all devices but key
components within that site have
device-class specific implementations
that are rendered server side.
                        - Luke Wroblewski
                          @lukew

      http://www.lukew.com/ff/entry.asp?1392
“
...browser-detection can be used
to help inform an overall responsive
design as opposed to being the be-all-
end-all for templating.
                       - Dave Olsen
                         @dmolsen



          http://bit.ly/wW91Ie
RESS is Good if...




“   •If you want layout adjustments
     across devices.
    •And optimization at the component
     level to increase performance or tune
     user experience.
    •You trust server-side device detection
     with sensible defaults.
                             - Luke Wroblewski
                               @lukew

          http://www.lukew.com/ff/entry.asp?1509
Simple Example:
Swapping a Header & Footer




 Mobile View                Desktop View

    http://www.lukew.com/ff/entry.asp?1392
Simple Example:
Swapping a Header & Footer



       <body>
            {{>header}}
                 [...document content...]
            {{>footer}}
       </body>




   http://www.lukew.com/ff/entry.asp?1392
Simple Example:
Swapping a Header & Footer



       <body>
            {{>header}}
                 [...document content...]
            {{>footer}}
       </body>




   http://www.lukew.com/ff/entry.asp?1392
Simple Example:
Swapping a Header & Footer



           index.html
           header.html
           mobile_header.html
           footer.html
           mobile_footer.html


   http://www.lukew.com/ff/entry.asp?1392
Simple Example:
Swapping a Header & Footer



           index.html
           header.html
           mobile_header.html
           footer.html
           mobile_footer.html


   http://www.lukew.com/ff/entry.asp?1392
M-ADVANCED     DESKTOP WEB
                             ress.dmolsen.com




MOBILE BASIC
RESS is in Its Infancy...




Infancy




                http://flic.kr/p/7B7uyp
Untested




                                   ...and untested.
http://flic.kr/p/nNZRV
U. of Notre Dame Example




ND data




    http://weedygarden.net/2012/05/a-case-for-ress/
Large Screen:
                             136 requests @ 2.7MB



                     ND data




Small Screen:
23 requests @ 291K
                         http://weedygarden.net/2012/05/a-case-for-ress/
bridge




                         We Still Need to Bridge the Gap
http://flic.kr/p/7FyCB2
Designers + Developers?




            developers and designers




                                       http://flic.kr/p/7Ma9n
How Do We Implement RESS?




So how would we implement?




                             http://flic.kr/p/5ATc7g
Skipping RWD




Responsive Web Design is “easy”




                                  http://flic.kr/p/4YM8
Two Possible Solutions



          Server-side
          Solutions
                         http://flic.kr/p/9jatna
#1 Browser Detection
Been Around a While




                         Old dog




http://flic.kr/p/bWQicm
Used Quite a Bit




“        82% of the Alexa 100 top sites use some
         form of server-side mobile device
         detection to serve content on their main
         website entry point.
                                                 - Ronan Cremin
                                                   @xbs



http://www.circleid.com/posts/20120111_analysis_of_server_side_mobile_web_detection/
Lots of Solutions




WURFL
  51Degrees.mobi
     OpenDDR
         DeviceAtlas
Personal Fav*: ua-parser

              node.js, Python, PHP, & Ruby libraries
                 built upon a standard YAML file




* - I help maintain the project ;)          https://github.com/tobie/ua-parser/
Arms Race?




             http://flic.kr/p/6RVLY2
Server-side Feature
#2 Detection
Also in Its Infancy...




Infancy




                     http://flic.kr/p/7B7uyp
Untested




                                   ...and untested.
http://flic.kr/p/nNZRV
Can be Simple or Complex




 Taking a Cue from Front-End Dev
Server-side Future Friendly?
Server-side Breakpoints




320px



        640px




                    960px
Server-side Breakpoints


Simple Example:
Setting a file path based
on window.innerWidth
<script type="text/javascript">

     function writeCookie(name, value) { //cookie code }

     // store the innerWidth of the window in a cookie
     writeCookie("RESS", window.innerWidth);

</script>




            http://www.netmagazine.com/tutorials/getting-started-ress
Simple Example:
Setting a file path based
on window.innerWidth
<?php

     // grab the cookie value
     $screenWidth = $_COOKIE[‘RESS’];

     // set the img path var
     if ($screenWidth <= 320) {
        $imgPath = “320”;
     } else if ($screenWidth < 960) {
        $imgPath = “640”;
     } else {
        $imgPath = “960”;
     }

     // print out our image link
     print “<img src=‘/rwd/images/”.$imgPath.”/car.jpg’ alt=‘Car’ />”;

?>


            http://www.netmagazine.com/tutorials/getting-started-ress
Robust Feature Detection




         http://detector.dmolsen.com
Robust Feature Detection

Simple Example:
Inserting a video link
<?php

     // require Detector to identify browser & populate $ua
     require("lib/Detector/Detector.php");

     $html5Embed = "<iframe {...} ></iframe>";
     $simpleLink = "Your browser doesn't appear to support HTML5. {...}";

     // use the $ua properties to switch
     if ($ua->video->h264 || $ua->video->webm) {
!       print $html5Embed;
     } else {
!       print $simpleLink;
!    }

?>


                   http://detector.dmolsen.com/demo/ytembed/
Robust Feature Detection

Complicated Example:
Templates Using Detector & Mustache




        http://ress.dmolsen.com & click “Learn more...”
RESS Challenges




RESS isn’t a silver bullet.
    (anymore than RWD is)
RESS Challenges




Server-side feature detection
      can be spoofed.
RESS Challenges




Requires server-side languages.
RESS Challenges




   Data needs to be
separated from layout.
RESS Challenges




“   It is not only the design of the web site
    and the layout of content that needs to
    be adapted or enhanced; the idea of
    being responsive, adaptive and
    enhancing, must be implemented in
    the whole value chain.
                             - Jon Arnes Sæterås
                               @jonarnes


    http://mpulp.mobi/2011/05/next-steps-of-responsive-web-design/
The


The evolution of web development continues...

                         of Web
                         Development
                         Continues
                                     http://flic.kr/p/3Q4To4
Questions or comments?
On Twitter @dmolsen...
Or at dmolsen.com...
Thank You

RESS: An Evolution of Responsive Web Design