CHAPTER 2
“Toto, I’ve got a feeling we’re not in Kansas anymore.”
Dorothy in The Wizard of Oz
A few years ago, mobile websites were just an afterthought unless you had a company that was developing an application designed specifically for a phone. It’s hard to believe that the first iPhone was just released in 2007 (it seems longer than that)! Before then, our phones were used as, well, phones. Now they’ve become much more. Think of all the things that our cell phones have replaced: wristwatch, stopwatch, calendar, datebook, flashlight, email, map, gaming device, dictionary, encyclopedia, etc.
Google estimates that by 2013, more people will use mobile phones than PCs to get online.1 Wow! That’s not far away. They also estimate that by 2015, there will be one mobile device for every person on Earth!
If you haven’t started making your website mobile-friendly, you’re already behind the curve. You need to start now. I recently had a friend tell me about how his company just had its website redesigned by a marketing firm. I asked him if it was mobile-friendly and he just looked at me with a blank stare. I whipped out my iPhone and typed in the site. It was a nice-looking site if you were sitting at a PC. Unfortunately, on my iPhone the font looked like it was about 0.5-point font, and much of the graphics were done in Flash so there were big blocks of nothing on the screen. The company just wasted a lot of money on that fancy new site and it will have to rebuild it again soon, probably shortly after its CEO gets an iPhone!
So what can you do to make sure that your website doesn’t suffer the same fate? I’m going to show you how you can make your website more mobile-friendly if you are using MVC. If you are using other technologies, this may not be the book for you. You will probably learn a few things, but most of what I have to say is for MVC programmers. If that is your current paradigm, this book should help you tremendously. Most of the content is centered on MVC 4, but I’ll also show you how you can use these techniques in MVC 3 in case you’re stuck in that environment.
This isn’t a book about learning MVC—I’m assuming you already know a fair bit about MVC and have done a little bit of programming with it. You don’t have to be an expert in MVC, but this book isn’t really going to explain how MVC works. The focus will be on honing your MVC techniques so that your sites look good on mobile devices.