Drupal mobile.

Popular open source CMS
Post Reply
Site Admin
Posts: 178
Joined: Tue Sep 29, 2009 6:25 pm
Location: Moss Norway

Drupal mobile.

Post by KBleivik »

1. Mobilise an existing Drupal site using gracefull degradation.

There are different ways to make a mobile version of a drupal powered site. If you already have a web site, the simplest may be to use the multisite option and make a mobile version sharing the same core installation and degrade gracefully where needed. When you build a site for mobile platforms, minimalism is absolutely necessary. Every Kb counts when you build a mobile version of your site. For example, if you use modernizr on you standard site, you may custom build a minimalistic version to be used on the mobile version. If you use jQuery on your main site, jQuerymobile http://jquerymobile.com/ may be preferred on the mobile version. In sum, you have to think not about every unnecesssary Kb, but every unnecessary byte. You should as already mentioned know that you can custom build the JavaScript library modernizr http://www.modernizr.com/download/ (check the options you want and generate the code). So if you use that library on your mobile site, you should start with a minimalistic configuration and see if that is all you need. Then add functionality when it is needed.

2. Starting with a mobile version of your new site and enhance progressively.

If you have not made your site already, the simplest method may be to start with the mobile version and use progressive enhancement when you build the full web site.

I can recommend the following

Drupal 7 Mobile Web Development Beginner’s Guide : http://www.packtpub.com/drupal-7-with-m ... guide/book

book, that is when this post is written in a raw edition. The finished version is expected february 2012. That book starts in chapter 2 with a detailed description of how you can configure your development platform on a Mac (iOs), Linux and a windows Pc using cygiwin. It explains in detatail how you set up your test server using software like drush http://drupal.org/project/drush git, http://drupal.org/documentation/git and http://groups.drupal.org/drupal-and-git .

The simplest way to build a mobile site may be to sniff the users user agent or even better, test what features the useres mobile paltform support and deliver the best stylesheet (theme in the Drupal world) and files based on that test.

It is difficult (impossible?) for a general web application to compete with an application build for a specific platform, that is a native application. So if your are developing for Apples's iPhone or iPad, you use Apple's SDK and their test platform. The language is Objective-C that is a superset of ANSI C, that may be very easy for you if you are a seasoned C# or C++ developer. If you build for the Android platform, you have to use the Android OS and SDK and their test plaform. Then the language is Java that is now "owned" by Oracle since Oracle bought Sun. Micorsoft is of course a third proprietary option based on Windows. Microsoft has joind forces with Nokia, the homeland of Torvald Linus http://en.wikipedia.org/wiki/Linus_Torvalds the inventor of Linux (an Unix dialect). So don't underestimate Micorsoft on the mobile arena, even if the company was not the front runner on mobile platforms. Windows 8 that is expected to come in this year, should be made seamless for mobile platforms. So don't be surprised if you soon see a new version of the Nokia communicator running seamless on Windows 8 and using Visual Studio as the developement platform. Note that there i a Visual Studio plugin for php http://www.jcxsoftware.com/vs.php That means that if Visual Studio is your preferred IDE, you can still develop php files on that platform.

3. We live in a free world with a hybrid solution.

But there is a completely free world out there making hybrid websites or more precisely hybrid web applications. Security is a great concern when you use a smartphone or a mobile platform: http://www.web3logistics.com/#smart-phone-security. A smart phone is a computer with the security of a PC 20 years ago. Wireless networks are not as secure as wired. The Opera desktop browser is by many security expert s regarded as the most secure web browser in the world. Personally, my first question if your private ID or credit card number is stolen is: What browser did you use?

For years Opera have had browsers for mobile platforms http://www.opera.com/mobile/ Opera also offers an emulator http://www.opera.com/developer/tools/mobile/ where you can test your mobile sites.

So there are native platforms and free general tools when you intend to develope mobile sites. But there is a third alternative, hybrid sites or applications. That is explained in the excellent SitePoint book: Build Mobile Websites and Apps for Smart Devices : http://www.sitepoint.com/books/mobile1/. Look for WebKit http://www.webkit.org/ enabled browsers "if you prefer a free world" :roll: In addition:
PhoneGap is an HTML5 app platform that allows you to author native applications with web technologies and get access to APIs and app stores. PhoneGap leverages web technologies developers already know best... HTML and JavaScript.
Source: http://phonegap.com/

Packt Publishing is very fast to spot the latest trends and offer books and eBooks for instant download that explains the details of that trend. PhoneGap beginners guide is one example http://www.packtpub.com/phonegap-beginners-guide/book written by Andrew Lunny http://blogs.nitobi.com/andrew/ .

Code: Select all

$context = new stdClass;
Yes, it is indeed objectoriented and it creates a standard configuration object where conditions and reactions can be saved. (See Drupal 7 Mobile Web Development Beginner’s Guide: RAW) page 111).

4. DRY - Don't repeat yourself.

Einstein said
Make it simple, as simple as possible, but no simpler.
Minimalism where every byte counts is a good principle if your build for the mobile world. Personally I love the free tool http://www.irfanview.com/ if I have to put images on the web. It is a fast and good tool if you have to optimize images for the web. It is a very good alternative to the more advanced software: Gimp http://www.gimp.org/ . You can make good systems without using any object oriented code with intelligent includes and code. Code reuse is at the very hart of object oriented programming. And a class is more than a container for methods and variables. Objects can communicate with each other. When you develop games, it is difficult to avoid using objects for the API etc. Design patterns are in a sense generalised classes. There are many Last but not least do't force the surfer too much. It is a good principle to:
Give them what you think they need until they tell you what they want.
Source: Drupal 7 Mobile Web Development Beginner’s Guide: RAW) page 93.

The top of laciness is to do everything correct from the beginning. That may be to start with a mobile version of your (drupal or not) site and enhance progressively.

5. Litterature.




6. Links







http://www.leveltendesign.com/blog/rach ... le-devices








http://www.microsoft.com/download/en/de ... x?id=23854

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest