Looking under the hood? Interested in a job? Send a mail....

Mobi

Mobile Device Middleware

Mobi icon

Mobi is a set of libraries and WSGI components that interact between a webserver and applications which make mobile data available. Mobi detects the user agent header in web requests. If it’s a UA on a mobile phone Mobi categorizes it into one of three device types. The cellphone category is added to the request and the receiving application can decide how to present its content.

Mobi categorizes using the WURFL database, “an XML configuration file which contains information about capabilities and features of many mobile devices”. The specifications contained in this open source XML file are rapidly updated when new models come on the market.

The middleware is based on research by Bob Albrecht and Judith A. Pirani who published the paper “Massachusetts Institute of Technology: Transforming the Campus Experience with the MIT Mobile Web”. This paper details what MIT did to build their mobile applications.

Mobi was announced and demonstrated at EuroPython 2010 in Birmingham, UK. It’s open source software released under a BSD license. For technical documentation see the Mobi site: http://mobi.infrae.com/.

Use cases

Mobi has been built as a set of libraries so it can integrate with other applications yet also operate on its own. Here are two basic use cases:

  1. Your organization’s website must provide mobile layouts. Depending on the phone, these differ. Mobi operates in the background, advising the CMS about which templates and/or widgets to use.
  2. Your organization offers a mobile application, like a Phone Book for example. It’s accessible via a URL with Mobi behind it. Mobi talks to an LDAP server, sends search queries, and returns html pages formatted for the user’s phone. All the mobile widgets, such as clickable telephone numbers or maps, are included.

Because Mobi is a WSGI solution, it can operate with any framework. We have it integrated with Silva and Zope but it could just as easily be Grok, Repoze, or Django. Importantly, because it’s a library, it won’t be an invasive application to add to existing infrastructure.

Features

Rendering system: The ‘mobi.rendering’ package provides a set of tools to build applications designed for mobile devices. Mobi packages content in an appropriate skin and provides navigation and other reusable UI components for various device types. The rendering system is based on the Chameleon templating markup language and Zope Component Architecture.

Router: the ‘mobi.devices’ component also provides router middleware that can redirect to a different URL if the device is detected as a mobile device.

Documentation

For a look at the prototype documentation, visit http://mobi.infrae.com/.

Download

The Mobi middleware is also available on the PyPI site: