Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Downloading Modernizr and Mobile Boilerplate

From: Mobile Web Design & Development Fundamentals

Video: Downloading Modernizr and Mobile Boilerplate

All right, there is a couple of tools that we are going to need to download in order to complete certain sections of the course and the first one of those is Modernizr. Now, if you've not heard of Modernizr, it is a JavaScript library that allows you to detect support for particular technologies inside a browser before you go and try to use it. One of the things you'll find when you're doing your mobile web development, or just web development in general, is that it's a good practice to see if a browser supports a certain technology before you try to take advantage of it.

Downloading Modernizr and Mobile Boilerplate

All right, there is a couple of tools that we are going to need to download in order to complete certain sections of the course and the first one of those is Modernizr. Now, if you've not heard of Modernizr, it is a JavaScript library that allows you to detect support for particular technologies inside a browser before you go and try to use it. One of the things you'll find when you're doing your mobile web development, or just web development in general, is that it's a good practice to see if a browser supports a certain technology before you try to take advantage of it.

For example, you might want to see if a browser supports the Canvas element or HTML5 localStorage or something else before you try to write or execute code that relies on that technology. Now ordinarily you have to write that JavaScript code yourself. You'd have to do some JavaScript that checks for that technology before you execute code that runs on it. It turns out that Modernizr already does that for you and it is a free tool. It's open source. You can download it from modernizr.com. Now the way that you use Modernizr is you download the development version first, and the development version is this link right here.

So you download this and you include it in your web pages, and you can see it's about 42K. And once you've included it in your web pages, you can use it to check to see if certain technologies are present or not. And then when you are ready to go use it, you click on this right here, the PRODUCTION link, which allows you to customize Modernizr to just the tests that you need, so that you don't have to download a giant library and waste all that space with tests that you don't actually use.

So let's go ahead and click on the DOCUMENTATION link first, and you can see that the documentation for Modernizr is pretty extensive. And over here in the Table of Contents, we have some text that explains what Modernizr is, how you install it, and so on and so forth. I am going to click on this link right here, Features detected by Modernizr, and you can see it's broken to various categories. There is CSS3, HTML5, and Miscellaneous. So if I click on that link, we scroll down on the page to the part where it talks about what features that Modernizr detects.

You can see that Modernizr detects support for a variety of features-- there is CSS3, there is HTML5 features. And the great thing about Modernizr is that in addition to the JavaScript code that it saves you from having to write, you can also use Modernizr along with CSS classes to define classes that are applied to elements in your page both when a particular technology or setting is present and when it is not present. It kind of allows you to do an if-else comparison using CSS3, which is pretty cool.

So let's click the Back link. Essentially, what you need to do is download Modernizr. Let's go back to the Download page. Okay, so this is the Download page, and you can see that there is a link right here to the development version. Now what you are going to want to do is download the development version and save it to the root level of the Exercise Files folder, and the reason for that is because that is where the exercise files are expecting to find the Modernizr library. So once you've done that, you can follow along with me in my examples using the development version and then when you're ready to go production, you simply come back to this download page and then you click off the check boxes that represent the tests that you care about.

And once you've done that, you click the Generate button right here. The Generate button will then generate this custom-built version of Modernizr-- you can see the code right here. This is the version of Modernizr that will be downloaded for you and once you've done that, you can click on the Download button right here. It will download the custom-built version of Modernizr, and you can use it in your web pages. All right, the other tool that we are going to need to download is called HTML5 Mobile Boilerplate and that is this tab right here, and you can see that the address is html5boilerplate.com/mobile.

Mobile Boilerplate is essentially a collection of best practices for building mobile web pages. It's important to understand what Mobile Boilerplate is and what it is not. It is a simple template. It's a collection of best practices. It's not a framework that will make your web site magically work across thousands of mobile browsers. It's simply a collection of settings and page starting points that you can use to build mobile web pages that work well on modern smartphones.

So let's scroll down a bit. Okay, so just like in Modernizr, there is two versions that you can use. There's the development version, which contains all the documentation and all the information embedded in the file, or there's the Boilerplate "Stripped" version, which is the version that you would use in your production web site. So if we scroll down a little bit more, you can see the support that is currently provided by HTML5 Boilerplate for mobile and going from left to right, you can see over here, this is what looks like Opera, this one over here looks like it's Android, this one right here looks like it's iPhone and that's Windows Phone right there.

And you can see down here in this list there is a couple of other ones that are supported. There is webOS, there is Symbian, and so on. And if we scroll down a little bit, these are all the features that are supported by HTML5 Boilerplate for Mobile. So there are certain things like iOS start screen for full-screen mode. There is home screen icons that are provided. There is low-end device style sheets. All of this stuff is included with Boilerplate for Mobile. It really is a great library for providing a starting point for building mobile web pages, and it provides a lot of settings that you are going to find yourself using over and over again across multiple mobile browsers anyway.

Now later on in the course, we're going to have an individual movie that shows how to use html5boilerplate.com for mobile. What you're going to do is download this, save it somewhere, and then when we get to that movie, you'll see where I place the folder and what it is named, and again, that's where the examples that use this library expect to find it.

Show transcript

This video is part of

Image for Mobile Web Design & Development Fundamentals
Mobile Web Design & Development Fundamentals

46 video lessons · 24363 viewers

Joe Marini
Author

 
Expand all | Collapse all
  1. 2m 48s
    1. Welcome
      1m 2s
    2. Using the exercise files
      1m 46s
  2. 29m 25s
    1. Understanding the mobile context
      8m 5s
    2. A survey of mobile sites
      11m 44s
    3. Targeting mobile browsers
      4m 31s
    4. Previewing a complete mobile site
      5m 5s
  3. 27m 20s
    1. Designing for one web
      3m 43s
    2. Using well-defined web standards
      3m 45s
    3. Designing mobile-friendly pages
      3m 40s
    4. Being crisp, clean, and succinct
      5m 45s
    5. Minimizing input where possible
      6m 47s
    6. Focusing on the core scenarios
      3m 40s
  4. 1h 13m
    1. Installing the tools
      3m 52s
    2. Setting up a local web server
      9m 13s
    3. Installing device emulators
      17m 5s
    4. Using device emulators
      13m 9s
    5. Downloading Modernizr and Mobile Boilerplate
      6m 22s
    6. Building a first mobile web page
      5m 43s
    7. Developing mobile pages with desktop browsers
      8m 6s
    8. Exploring useful mobile web development resources
      10m 23s
  5. 53m 26s
    1. Reviewing mobile markup languages
      5m 10s
    2. Understanding content adaptation approaches
      10m 32s
    3. Controlling the viewport layout
      12m 50s
    4. Designing forms
      13m 30s
    5. Using CSS media queries
      11m 24s
  6. 1h 11m
    1. Detecting client capabilities with script
      10m 8s
    2. Caching information with local storage
      9m 16s
    3. Determining position with geolocation
      12m 52s
    4. Minimizing HTTP requests with data URLs
      7m 39s
    5. Understanding user agent detection
      9m 8s
    6. Using server-side detection with PHP
      6m 52s
    7. Using server-side detection with ASP.NET
      4m 54s
    8. Using HTML5 Boilerplate for mobile
      11m 6s
  7. 39m 22s
    1. Measuring performance
      7m 41s
    2. Creating full-screen web apps
      6m 30s
    3. Customizing the user interface
      5m 14s
    4. Detecting orientation changes
      3m 58s
    5. Detecting device movement
      5m 21s
    6. Using touch events
      10m 38s
  8. 47m 14s
    1. Taking a look at the finished site
      7m 40s
    2. Examining the header and background image style on the Home page
      10m 10s
    3. Examining the hover effect and layout styles on the Tours page
      6m 42s
    4. Examining mobile forms on the Contact page
      9m 45s
    5. Viewing and testing the mobile site on emulators
      8m 11s
    6. Viewing the site on devices
      4m 46s
  9. 2m 34s
    1. Goodbye
      2m 34s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Mobile Web Design & Development Fundamentals.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.