00:00:12.960
Hey guys, my name is Brendan Lim. I'm going to be talking about mobilizing your Rails application. This presentation will provide a general overview of various tools and methods to help you enhance your application for mobile users. Just like the previous speaker discussed service-oriented architecture, we'll also explore how to cater to mobile users.
00:00:39.960
So why should we care about mobile applications? There are an estimated 2.9 billion mobile users worldwide, and this number is expected to double by 2011. In the U.S., over 255 million individuals use mobile devices, which accounts for about 85% of the total population. Additionally, in developing nations, mobile phones often serve as the primary means for people to connect to the Internet. It's essential to ensure your application reaches these users.
00:01:07.280
Here are some mobile statistics. The global population is close to 7 billion, with mobile users numbering around 2.9 billion. Those who access the web via mobile devices are about 1.3 billion. I believe that this number has increased since these statistics were gathered in late 2008. The critical question is: how do we take advantage of this mobile landscape? How can we ensure our applications are accessible and interactive for users with mobile devices and an Internet connection?
00:01:35.840
To reach the majority of web-enabled mobile devices, consider the increasing capabilities of new phones that can connect to the web and display HTML, not just limited to basic mobile pages. You can engage users through SMS, MMS, and email. Many applications post updates and allow photo sharing, leveraging these communication methods effectively. It’s worth noting that in many countries, SMS is utilized more frequently than traditional internet browsers, making it a valuable tool.
00:02:19.360
Many mobile devices today can access the real web. To clarify, I will focus on devices capable of HTTP access and not just those limited to basic web pages. As an example, many apps like Twitter and others provide seamless web experiences on devices like iPhones. The concept of ‘one web’ aims to make information services available to all users, regardless of the devices they use. However, this is challenging due to various factors, including differences in screen resolutions, connection speeds, and device capabilities.
00:03:10.720
One main challenge is that not all phones support JavaScript or Flash, which can limit functionality. To address connection and processing speed issues, consider minimizing the content that your application has to load. One useful plugin I've created is called Mobile Fu. This tool detects if a user is on a mobile device and allows for custom styling based on the device type, simplifying the process of making your app accessible across various devices.
00:04:10.960
Adding Mobile Fu to your controller is incredibly simple. For instance, a small change in your Rails controller can detect a mobile user and switch to the appropriate mobile layout automatically. In this example, Safari displays a standard HTML login page, while an iPhone uses a mobile-specific template, enhancing the user experience.
00:04:58.080
Mobile Fu checks the request headers to determine if the user agent is a mobile web kit, indicating a mobile device. You'll need to create separate views for desktop and mobile versions of your application to accommodate different user experiences. There are additional helper functions in Mobile Fu that allow you to send the correct XHTML document type, crucial for proper rendering on mobile devices. Failing to do this may lead to issues where the mobile page appears zoomed out, negatively affecting usability.
00:05:43.680
Some additional class methods in Mobile Fu help you determine whether a viewing user is on a mobile device and enable checks for specific devices, ensuring adequate support. Moreover, it is essential to manage temporary files and ensure that the attached content matches the user's expectations across different mobile carriers.
00:06:56.480
When considering leveraging other mobile technologies, SMS is especially relevant. SMS is widely read by roughly 94% of recipients, making it an effective medium for quick notifications. Though limited to 160 characters, it is straightforward to implement. To send SMS messages from your Rails application, consider using popular SMS gateways like Twilio, which allow you to send messages easily without needing to know the recipient's carrier.
00:07:58.360
Another plugin worth mentioning is SMS Fu, which sends SMS as email via Action Mailer. While it is free, you will need the recipient's carrier information for proper delivery. SMS Fu provides customization options and allows users to easily add new carrier configurations to the system. The key takeaway is ensuring users know that, although sending SMS might be a free feature, they should be aware of potential costs depending on their current mobile plan.
00:09:19.080
MMS (Multimedia Messaging Service) facilitates sending various types of media, primarily used for images. However, the challenge lies in the supplementary data that carriers may add, which can clutter the user’s experience. To manage this, tools exist for parsing and cleaning these messages, simplifying the process of handling multimedia content.
00:12:15.600
Receiving SMS or MMS within a Rails application can be achieved using various methods, including specific third-party services that simplify the process. For example, m2r (MMS to Rails) can decode and extract media content efficiently, regardless of the sending carrier. This service allows applications to manage incoming MMS messages and utilize their content effectively, such as storing user-generated media in a blog.
00:14:29.240
In conclusion, mobilizing your Rails application is relatively straightforward with the right tools. Various plugins and gems like Mobile Fu, Clickatell, SMS Fu, and m2r can enhance your mobile application effectively. While I've only skimmed the surface of what’s available, exploring these options can significantly improve user engagement on mobile devices. Now, I'd like to open the floor for any questions you may have.
00:17:20.240
Thank you all for your attention!