Random ramblings about web2py, python,
Zope and (sometimes) bit of Windows.
Home | web2py | Who am I? | Contact Me | Lenguaje: Espanol |   

Last 10
Older Posts
External Links

[Back to the Homepage]

Added Feb 24 2012 , Modified Feb 24 2012 - 11:03 PM

With more and more mobile devices become an integral part of the everyday internet, it is just as important to choose a development platform that is 'friendly' (and does not get in the way) to mobile devices.

web2py allows just that, this amazing framework allows you to create a full dynamic web application in a record amount of time, it is open source (of course), and written and programmable in Python, it is like getting a chocolate lava cake in a fancy restaurant, and all of the sudden the waiter/waitress comes telling you that she needs to add a scoop of vanilla ice cream, and giving it for free at the end.

Enter @mobilize

@mobilize is a decorator added to the web2py development environment that you can implement even if your web application was not created with 'mobile' in mind, or you want to extend your application to include support for them:

from gluon.contrib.user_agent_parser import mobilize 
@mobilize
def index():
    db_data = [some big sql call that returns the information to render on index.html]
    return dict(db_data=db_data)

That's it, well, almost, now all you have to do is create an html page called index.mobile.html (can be changed) containing the 'light' version of your website to render accordingly for mobile devices and you're done. This approach allows you to not have to mess with your original index.html file and add unnecessary noise to it.

web2py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python and under the LGPLv3 License.

c o m m e n t s    f o r
Creating Mobile Applications in web2py

Add a Comment | Back to the Homepage

 

TechFuel.net | Web Standards xhtml 1.1 and css 2.1 | Rel 16