A crash course in responsive design

25
Ed Charbeneau 1

description

With the increasing variety of web enabled devices entering the market, the next generation of the web will need to be more flexible than ever before. In this session we will explore how Responsive Design can help build "A Foundation for the Web" and ensure maximum compatibly on any device now or in the future. We'll also take a glimpse at how using solutions like Zurb's Foundation and ASP.Net MVC can jump start development, and produce effective results fast.

Transcript of A crash course in responsive design

Page 1: A crash course in responsive design

Ed Charbeneau 1

Page 2: A crash course in responsive design

Ed Charbeneau

Page 3: A crash course in responsive design

Ed Charbeneau

Ed Charbeneau

• Corporate web developer for Sypris Solutions

• Code PaLOUsa Co-Chairman• Author: Simple-Talk• ResponsiveMVC.net• Twitter: @EdCharbeneau

Page 4: A crash course in responsive design

Ed Charbeneau

What I do

Build web applications & LOB web apps

Build websites

Page 5: A crash course in responsive design

Ed Charbeneau

The Challenge

Customers’ expectations have changed–Websites–Mobile web–Apps

We need to know when and how to fulfill these expectations

Page 6: A crash course in responsive design

Ed Charbeneau

Strategy

• A wide range, DRY approach to any website or web based UI

• Deploy content in a progressive manner focused on the needs of the user–Start broad–Add features based on the

requirements

• How do we tackle this?

Page 7: A crash course in responsive design

A foundation for the web

Ed Charbeneau

Simple-Talk.comhttp://tinyurl.com/foundweb

CONTENT

WEB PRESENTATION (RESPONSIVE)

ENHANCED BEHAVIOR

NATIVE APPS

Page 8: A crash course in responsive design

Ed Charbeneau

Page 9: A crash course in responsive design

Ed Charbeneau

The perceived world

Current websites are built for the desktop.1600 x 12001280 x 10241024 x 768

960 px

Page 10: A crash course in responsive design

Ed Charbeneau

This is a real problem

We no longer browse only from our desktops

 ”With current growth rates, web access by people on the move — via laptops and smart mobile devices – is likely to exceed web access from desktop computers within the next five years.”

-International Telecommunication Union2006

Page 11: A crash course in responsive design

Ed Charbeneau

The real world

PhonesTabletNetbookLaptopCarFridgeWhat’s next?

Page 12: A crash course in responsive design

Ed Charbeneau

What is acceptable?

Page 13: A crash course in responsive design

Ed Charbeneau

What is ideal?

• Responsive websites• Enhanced behaviors and

experiences• Device native applications• What does this strategy look

like?

Page 14: A crash course in responsive design

Ed Charbeneau

Available Anywhere

CONTENT

WEB PRESENTATION (RESPONSIVE)

ENHANCED BEHAVIOR

NATIVE APPS

Page 15: A crash course in responsive design

Ed Charbeneau

What is Responsive Design

Flexible Layout (grid)Flexible Content (images & videos)

Media Queries

Page 16: A crash course in responsive design

Ed Charbeneau

Media queries

A media query allows us to target device classes

For example:/* For small screens < 768px do not float columns */

@media only screen and (max-width: 767px) { .column { float: none; }

}

Page 17: A crash course in responsive design

Ed Charbeneau

Responsive Example

mobile tablet desktopdesktopdesktopmobile

Page 18: A crash course in responsive design

Ed Charbeneau

Zurb Foundation

• Platform independent• An easy to use, powerful, and

flexible framework for building prototypes and production code on any kind of device.

• Boilerplate (CSS, HTML, JS)• MIT license• foundation.zurb.com/

Page 19: A crash course in responsive design

Ed Charbeneau

Foundation for MVC

• ResponsiveMVC.Net/Foundation• Nuget.org (search: prototyping)• Minimal setup (less than 30 seconds to

get started)

• Replaces existing MVC template

Page 20: A crash course in responsive design

Ed Charbeneau

Demo time

<!-- begin demos --><demos>

Page 21: A crash course in responsive design

Ed Charbeneau

Foundation demo

<!– css example --><!– a row with two six column wide blocks of content -->

<div class=“row”><div class=“six

columns”></div><div class=“six

columns”></div></div>

Page 22: A crash course in responsive design

Ed Charbeneau

Mobile.CSS demo

/* what makes this tick */

@media only screen and (max-width: 767px) {

.row { width: 100%; /* max the width */

}.columns {

width: auto !important; /* fill the width */float: none; /* stack the columns */

}

}

Page 23: A crash course in responsive design

Ed Charbeneau

Prototyping demo

@* Html helpers example *@@* Lorem Ipsum on the fly *@

@Html.Ipsum() @* a random length paragraph *@

@Html.Ipsum().h1() @* an h1 tag filled with ipsum*@

@Html.Ipsum().h1().p().ul() @* Fluent Ipsum*@

Page 24: A crash course in responsive design

Ed Charbeneau

Questions?

<!-- end demos --></demos>

Page 25: A crash course in responsive design

Ed Charbeneau

Credits & Info

• Foundation.Zurb.com (download, git hub, etc.)

• Resources: ResponsiveMVC.net• Follow me: @EdCharbeneau• Follow foundation: @FoundationZurb• RWD Examples: zurb.com/responsive• Reading:

future-friendly web, resource list• Listening: Boagworld pod cast [S02E07]