Home > Sample chapters > Software Engineering > Software engineering practices

Building Mobile Websites

Summary

This chapter tried to turn into practical advice and bits and pieces of code some of the most common practices employed today to build mobile websites. The number of mobile devices is huge, but, on the other hand, you don’t have to target all of them. Mobile development is about understanding what you and your customers want and need. This is a crucial point and results in an ideal selection of use-cases. Appropriate and well-described use-cases are essential for any application, but it is a bit more important for mobile applications and sites. For mobile sites, in particular, I estimate that it represents the largest share of the work.

Selection of use-cases helps to keep the whole application up-close-and-personal, establishing a relationship between code and user that is much stricter than with any other type of application.

Beyond this point, building a mobile site is a matter of optimization: minimizing requests, minimizing content being downloaded, and minimizing the user’s activity. But it’s also a matter of optimizing the design to find a good compromise between UI widgets and touch capabilities. The user interface is critical: common widgets like drop-down lists and check boxes, while valid to express the behavior of a view, may require a different rendering and graphical structure.

Finally, a mobile site may largely reuse code in the back end of the sister desktop site. Coding the back end is probably the simplest aspect of mobile site development. The next chapter covers in more detail two technologies that have been mentioned only briefly up to now: jQuery Mobile and HTML5.