Thursday, May 26, 2011

Mobile Theme setting up and its Use Cases

Setting Up a Mobile Theme By Weblog admin


An admin can set up a default weblog theme( Desktop theme.) in current weblog creation page.So one additional step with defining a default mobile theme from the available mobile themes collections.(There will be at least one default as i am going to add a  HTML5 mobile Theme for sure.)



So in theme.xml we will be having an additional entry to indicate that the theme is a mobile theme.(Still it is not finalized with the community and will decide soon on the entry.)

How Rendering will pick up the theme.(Changes in the core)


After the recognition of the request coming from a mobile device, in the PageServlet we need to switch from desktop them  to the defined mobile theme for the identified weblog.So in the weblog we will be having a "defaultMobileTheme" attribute which will be set by the weblog admin at the weblog creation.

So we will assign mobile theme using setEditorTheme( ) at the time it looks for the template to render in PageServlet. (So roller will continue same process afterwards , But having a mobile theme is assigned for its editor theme.)


In coming discussions i will be post on the velocity macros we are going to add to Roller to enhance capabilities in Roller mobile themes.

I would like to thank all the users and developers who gave their valuable feedback in Roller dev mailing list and expect further assistance in future.:)

Thursday, May 19, 2011

How to render mobile theme. [Discussion]

This will be interesting an decision to make .After discussion with Dave in a weekly project meeting following are the available options we were able to figure out.
  • Use different weblog,search ,tags and entry pages for each template. [complex to maintain and handle]
  • Use a one default mobile theme for all desktop theme. [ more restricted to a developer]
  • Use different mobile theme for each desktop theme. [preferred method for the moment]
So the method we chose is to have different set of mobile themes which can be added separately and specially add a metadata it as a mobile theme.So at the weblog creation user can define one of the mobile themes as the preferred mobile theme to render.I am still evaluating the options and different approaches so the most suitable and maintainable method will be implemented.

Below is a simple view of how rendering is to happen with Roller mobile.


  

Sunday, May 1, 2011

How mobile platforms identify mobile devices

This is the most fundamental question is for anyone who is developing a mobile rendering platform.Lets have a look at the available options.I am getting some examples and try to identify how WordPress plugins and Joomla Templates try to achieve the goal.


I found two popular plugins for WordPress which can identify the device and render the mobile theme accordingly.Mobile Press and Wp-Mobile-Detector are similar in identifying the device and they use a pre defined set of possible values to detect a match in request. (Eg: check possible user agent in request.)Joomla templates also using a similar method by matching the possible values using regular expressions for  HTTP_USER_AGENT.
The most interesting and extensible method i found was to use WURLF .As in the project home page it is "The WURFL is an XML configuration file which contains information about capabilities and features of many mobile devices".They are offering a good API for JAVA as well as PHP and i think using WURLF will be more appropriate as it is being updated by the user base more frequently to identify more mobile platforms in the mobile world.


Update. (2011 May 19)
In my Project i will not be using wurlf.

  • WURLF is under GPL and not compatible with Apache licence.
  • At the moment we do not want to know the device capabilities.