Ruby on Rails

Rhodes Framework for Mobile Client Development

Rhodes Framework for Mobile Client Development

by Adam Blum

The video titled 'Rhodes Framework for Mobile Client Development' features Adam Blum discussing the Rhodes framework, an open-source tool designed for building native mobile applications across multiple smartphone platforms, including iPhone, Android, Blackberry, Windows Mobile, and Symbian. The core mission of Rhodes is to enable rapid mobile application development with high productivity while ensuring device optimization and offline capabilities. Key points outlined in the presentation include:

  • Native Mobile Apps: Rhodes focuses on developing native apps, contrasting with mobile web applications.
  • Framework Features: The framework allows developers to write at a high level, utilizing HTML and Ruby, while incorporating native device capabilities like GPS, camera, and offline data access.
  • Community and Contributions: Being open-source, Rhodes has seen significant user contributions and emphasizes community engagement through support channels.
  • Challenges in Development: Adam shares insights about the challenges developers face, especially with the rise of various smartphone platforms and the demand for applications running smoothly on all devices.
  • Technical Architecture: Rhodes operates on a Model View Controller (MVC) architecture akin to Rails but is more lightweight and suitable for mobile environments, with specific features like a micro-framework, a lightweight ORM, and local data synchronization through RoSync.
  • Development Process: The presentation includes a demo on generating mobile applications, emphasizing ease of setup via a generator that creates essential components automatically, similar to Rails.
  • User Experience: Emphasizing the importance of a good user experience, Rhodes allows for the customization of HTML templates, ensuring apps can resemble native applications across different platforms.
  • Future Initiatives: Adam introduces future efforts such as a hosted mobile app development service akin to Heroku, which will simplify the development process further. He also highlights a mobile app development contest designed to encourage innovation in Rhodes app development.

In conclusion, the Rhodes framework is positioned as a powerful, productive, and user-friendly platform for mobile app development, with a strong focus on community contributions and future enhancements. Adam invites developers to explore Rhodes to simplify their journey in mobile development.

00:00:12.080 Okay, today I'm here to talk to you about building mobile apps with Rhodes.
00:00:19.279 Unlike the previous session, these are native mobile apps, not mobile web apps.
00:00:25.519 Rhodes is an open-source framework that allows you to build native mobile apps for all shipping smartphones: iPhone, Windows Mobile, Blackberry, Symbian, and Android. You can write the code once at a very high level.
00:00:30.720 Briefly on the Rhodes mission: our mission is to allow you to mobilize applications very rapidly with a great user experience. We want to provide the high level productivity and portability of web programming but still deliver the device optimization and offline capability of native mobile apps.
00:00:36.960 I actually like that we followed Brandon Lim's presentation from earlier because, if you want a mobile web app, it's a great way to do it. If you want to write a native mobile app, that's what we're all about.
00:00:42.879 However, we’re still allowing you to have a web programming experience. Something I typically clarify is this: while we will let you write your app mostly in HTML, it's all now native mobile apps.
00:00:48.640 This means taking advantage of device capabilities such as the camera, SMS, GPS, and also allowing you to work with data offline.
00:00:53.680 Of course, it's all open source for rapid adoption by developers. This open source aspect drives adoption, but another pleasant surprise has been the substantial amount of user contributions we've received.
00:01:01.359 Smartphone sales are exploding across five major smartphone operating systems, yet the difficulty for developers lies in determining what to target.
00:01:07.200 The growth leaders, iPhone and Android, are also the ones with the largest installed bases. This is especially true for enterprise apps.
00:01:13.280 The iPhone is a great device, and I love my iPhone, but its footprint within enterprises tends to be much smaller.
00:01:18.880 With apologies to Brendan, I really like those guys, and we've actually discussed providing services around Rhodes. We're just completely focused on building our framework.
00:01:25.759 We see a lot of demand for services. For those interested in offering services, we have a Roads Developer Network that provides referrals to developers using our platform.
00:01:32.000 With the emergence of the iPhone App Store, native apps have pretty much won the day. Users prefer apps that run locally on their devices.
00:01:37.680 Certainly, this trend is evident in enterprise app scenarios where you're working with data.
00:01:43.680 Part of my background is in managing engineering for server-based technology, specifically Good Technology.
00:01:49.920 We had the first AJAX-based browser technology called GoodAccess, which had 8,000 companies using it.
00:01:57.439 However, we found it challenging to make those companies interactively change data through the browser.
00:02:03.439 Even though we had a really good product, I remember that when we looked at these companies, none of the 8,000 were using it to change data with the browser.
00:02:10.160 This experience led me to realize that there needed to be a better way—a platform that facilitated broader access.
00:02:17.360 Though we were requested to extend to all operating systems, we struggled even to achieve basic mobile compatibility.
00:02:22.560 That formative experience motivated the creation of Rhodes.
00:02:29.280 Rhodes enables you to write an app once, and it will run everywhere while emphasizing its focus on native apps.
00:02:35.760 We built Rhodes as a framework that allows you to quickly build apps using HTML and Ruby.
00:02:40.800 It's structured as a Model View Controller (MVC) framework, very similar to Rails.
00:02:46.879 Despite our affinity for Rails, it's important to note that Rails is one to two orders of magnitude too large for mobile devices.
00:02:53.360 Therefore, Rhodes is a lightweight version that works better on mobile platforms. It shares similarities with Rails but takes a more versatile approach.
00:02:58.800 For example, it has a lightweight ORM instead of Active Record, focusing on small size and efficiency.
00:03:04.319 The challenge set before the team was that the entire framework plus the user's app must fit within three megabytes on these devices.
00:03:09.840 I was impressed by an article that showcased a Windows Mobile app developed using Rhodes, where the executable size was only 2.39 megabytes.
00:03:16.480 Rhodes also facilitates synchronization of local data and exploits device capabilities such as GPS, camera, and SMS.
00:03:22.959 Everything is available open-source at github.com/mobile, and we engage actively in our Google group for community contributions.
00:03:28.560 With a development team spread across time zones, we typically respond to feedback within 24 hours.
00:03:34.079 The components of Rhodes include a micro-framework for building locally optimized mobile apps.
00:03:39.680 Developers can use an app generator similar to the Rails scaffolding generator and edit HTML templates as needed.
00:03:45.120 Though developers can change the controller in Ruby if necessary, they typically spend most of their time on HTML templating.
00:03:51.600 This framework also contains the first mobile Ruby implementation, which might excite some of you.
00:03:57.760 People sometimes ask if this means Rhodes is a mobile Ruby company. While we're big fans of Ruby and believe it will be prevalent across all devices, Rhodes focuses on providing a native app framework.
00:04:03.200 Additionally, we're in discussions with the Ruby community to integrate our mobile Ruby capabilities into broader development efforts.
00:04:09.760 The team has made significant strides in execution speed through several engineering tricks drawn from enterprise Rails.
00:04:17.760 Rhodes manages data efficiently, with a RoSync client that synchronizes offline data.
00:04:26.720 The RoSync client manages data transmission between the device and backend efficiently, ensuring that developers deal primarily with local data.
00:04:33.360 Local data management allows developers to avoid concerns about network connectivity.
00:04:40.800 The RoSync client communicates with the RoSync server using an optimized JSON format.
00:04:46.840 This architecture allows for seamless interaction between the application code and data storage.
00:04:53.680 A small embedded web server manages local views, allowing you to write the app's visual components in HTML.
00:05:02.720 This design choice has made a significant difference; it allows developers to access useful third-party components.
00:05:09.240 The browser control on the device helps render the HTML components and provides a familiar development experience.
00:05:15.600 While the framework's internals matter little to users, the app generator creates a boilerplate for the essential objects, making development straightforward.
00:05:21.120 For example, if you're creating a CRM app, the generator can create models like accounts, employees, opportunities, and contacts.
00:05:29.120 You simply need to provide object names, and Rhodes will generate a controller and basic HTML templates for you.
00:05:35.600 You won't often need to modify the auto-generated controller because it handles basic Create, Read, Update, Delete operations.
00:05:41.680 However, modifying HTML templates allows you to create a more personalized user interface.
00:05:48.000 Our generated HTML is quite generic, consisting of basic tags, and you can style it in whatever way you prefer.
00:05:55.200 We provide a styling library that varies by device, allowing your iPhone apps to resemble native applications.
00:06:01.680 The use of libraries such as iUI helps achieve this objective significantly.
00:06:07.200 The iUI framework enables us to incorporate different styles and interactions, making the app feel native to each platform.
00:06:14.239 Users can enhance the style and interactivity of apps, ensuring a consistent branding experience across platforms.
00:06:21.320 Overall, Rhodes allows you to access device capabilities and synchronize local data while providing a framework that looks good on all devices.
00:06:30.840 This systematic approach offers practical advantages, especially compared to traditional web-based applications.
00:06:38.160 Let's take a closer look at the app we built using Rhodes.
00:06:43.760 The development flow involves generating the app, creating models, and defining functionality.
00:06:50.720 As we progress, I'll demonstrate each step. The first action is to install Rhodes using the gem command.
00:06:57.760 You run 'gem install roads' to get started. Once installed, you gain access to the utility command line and its various options.
00:07:05.760 With options to generate apps, models, or sources, you'll typically start by generating an app.
00:07:12.320 For this demo, I'm going to generate a simple app called 'LA Ruby Contacts'.
00:07:18.160 After generating the app, you can navigate into the app directory.
00:07:25.440 Next, I will generate a model. The model requires a name, a source URL, and a set of attributes.
00:07:31.520 For our contact model, I'll input relevant fields like name, phone number, and city.
00:07:37.680 After specifying those details, Rhodes generates all necessary components for the model.
00:07:43.919 This automation resembles Rails development, making the configuration and initial setup very straightforward.
00:07:50.239 You'll find the controller and templates ready to use without significant modifications.
00:07:56.639 As you check your contact directory, you'll see the CRUD operations pre-configured for easy management.
00:08:03.519 All HTTP methods behave similarly to Rails; however, some subtle differences exist due to varying browser behaviors.
00:08:10.560 The HTML generated by Rhodes can be extensively modified to fit your design requirements.
00:08:17.120 Once you've built your app, the build script generates executable files for each target device.
00:08:22.639 This ensures your app works efficiently across different operating systems like Blackberry, iPhone, and Windows Mobile.
00:08:29.039 When happy with your changes, you can perform a build to create a runnable application.
00:08:35.680 Let’s take a look at the application running. I'll demonstrate creating a new contact.
00:08:42.239 After creating a new contact, it appears on the list, showcasing the basic functionality developed.
00:08:49.600 It's worth noting that we recently announced an updated version of Rhodes that supports all smartphone operating systems.
00:08:57.600 We've also added camera support, which has generated media coverage and interest.
00:09:04.560 Alongside this, we're launching a hosted mobile app development service analogous to Heroku.
00:09:08.960 This initiative allows users to develop apps without needing to install development kits or environments.
00:09:14.320 The Rhodes framework will be hosted, enabling developers to focus on building rather than deployment.
00:09:21.040 Lastly, I would like to announce an extension of our mobile app development contest deadline to May 24th.
00:09:30.080 Participants will have the chance to win prizes by developing an app using Rhodes and sensibly open-sourcing their work.
00:09:37.920 The app must be completed by the deadline, and we offer a total of $10,000 in prizes.
00:09:44.160 Among the submitted applications, there will be many smartphones and related accessories for at least the top 10 entries.
00:09:53.600 I'm thrilled about the amazing projects currently in development and those yet to come.
00:09:59.840 To conclude, I encourage everyone to explore the possibilities with Rhodes.
00:10:06.160 We're committed to a framework that is more productive and accessible than traditional mobile development.
00:10:13.760 If you have any questions, feel free to ask.
00:10:20.000 I'll be happy to help with anything concerning the Rhodes framework or mobile development.
00:10:27.040 Thank you for your attention. Let's continue to shape the future of mobile development together.
00:10:34.160 And remember, Rhodes is here to help you make that journey as easy and productive as possible.