Preface
Mobile Web is exploding, and this is in large part due to the rise of smartphones, bringing full-featured browsers to the masses, right there in the palms of their hands. Gone are the days when visitors would come to your website through their desktop or laptop computer. Nowadays, your website can get visitors from a laptop, desktop, phone, tablet, or even their television. Do you believe that your site looks the same on all those platforms? More than likely the answer is no. Different screen sizes could make your site look a mess. If you use Flash for anything, more than likely the user will not be able to interact with it. How can you take all these different scenarios into account and make sure your website or web application is fully functional to a visitor, no matter the means they used to get there?
Responsive web design is a method that will allow you to have your website appearance and features change based on the platform the visitor is viewing your site on. This is typically done through JavaScript and CSS.
Unfortunately, there is a problem with standard responsive web design. The main one being the sites that can be large in size, depending on the number of checks and requests being performed and thus leading to longer load times for your site or application. Also, sometimes web developers will create a custom site for mobile devices and redirect them there. This could fail though, and the user could still be stuck with the full-blown website on their phone.
To make things easier, faster, and more reliable, we are going to use RESS, or responsive design and server-side components. That's quite a mouthful! We will use PHP to assist some of the standard responsive design techniques and serve the website all on one URL, rather than sending our visitor to m.example.com or the like. By leveraging PHP's server-side power, we can speed things up a bit and even do some things that aren't usually done easily with standard responsive design.
This book will give you a basic understanding of RESS. We will make a simple site that shows some capabilities of RESS and along the way show you some other tricks and tips you can use in your day-to-day developing.
Let's get started and may all your code be bug free!