Linux - MobileThis forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Firefox OS, Sailfish OS, Maemo, MeeGo, Ubuntu Mobile, WebOS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site: AndroidQuestions.org
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
When any browser talks to you, one piece of metadata that it provides is whether it claims to be a "mobile" device or not. (Incidentally, browsers on mobile devices normally allow you to switch that on or off ...)
When the "main" web site observes this metadata, it normally issues a redirect to the "m." site (which does the opposite).
Then, whether or not there are actually two separate services on the back-end providing the output in each case, the two follow different paths: most especially, the use of different templates to handle the generation of appropriate HTML.
In programming-language terms, I happen to like to define "the web service" as a programming-language object in three parts: (1) a base-class; (2) a "non-mobile" child class; and (3) a "mobile" one. Any of which might be further subdivided, e.g. to handle browser-differences or mobile-device differences. Where differences exist, the child-classes override the appropriate handlers while passing most of the actual work to their inherited parent. What I am consciously trying to do here is to factor-out the complexity that otherwise can very-easily permeate the source-code of the application.
I also define an object for "a request" (and "the response"), and each of these specifically has an attribute such as is_mobile, so that there is "one, and only one, Official Way™" to recognize the two cases in code that is common.
Remember that we certainly have not seen the end of the evolution of just what "a mobile device" means, nor of what such a thing can do. Design for the future, knowing that the future will very-quickly arrive.
Last edited by sundialsvcs; 07-30-2014 at 10:16 AM.