Your message has been sent.
This article has been saved to your account.
Go to my account
This article has been emailed to your Kindle.
Send this article
Rhomobile has revolutionized the process of developing mobile applications. It has enabled developers to become much faster and more efficient, allowing quicker application development. It enables software programmers to build applications for mobile devices using HTML and Ruby instead of proprietary languages such as Objective-C. Currently, the Rhodes framework supports development for the iPhone, Windows Mobile, Google Android, Symbian, and BlackBerry operating systems.
In this article by Abhishek Nalwaya, author of Rhomobile Beginners Guide, we will briefly discuss the various products of Rhomobile and their architecture.
|Read more about this book|
(For more resources on this topic, see here.)
The Rhomobile family
Rhomobile Inc. is a computer software company that provides leading products for building the new generation of mobile applications. It offers an open-source Ruby-based mobile development framework for business mobility solutions through its four major products Rhodes, RhoSync, Rhohub, and RhoGallery.
Rhodes is an open source framework by Rhomobile. It develops native applications for almost all smart phones. The applications built through Rhodes are pure native applications and use device capabilities such as GPS, PIM contacts and calendar, camera, native mapping, push, barcode, signature capture, and Bluetooth.
Rhodes accelerates the development of mobile applications without compromising on its portability. This framework is similar to the popular Rails framework. It is based on Model view Controller and has inbuilt Object Relational Manager (ORM) called Rhom that is similar to active Record in Rails. Most user interface customization can be done in HTML templates (ERB, eruby files). A single set of source written with Rhodes can be compiled to run across all of the supported smart phones. This means that we will have the same code base for all your devices.
RhoSync is a standalone mobile sync server that keeps enterprise application data up to date and available on users' smart phones. Enterprise apps require local synchronized data to be used most of the time. The information is stored locally on a users' device and is available to them even in offline mode. It is very easy to write a source adapter as RhoSync generates most of the code while creating the source adapter. The source adapter can also be used to Create, Read, Update, and Delete (CRUD) operations on a model.
Rhosync uses Redis, which is a NoSql Key Value store for data caching. This makes Rhosync more scalable. RhoSync performs its push-based sync using the native smartphone push SDKs. It uses new advanced BlackBerry Enterprise Server and iPhone 3.0 SDKs for Push. It uses BES Push and iPhone Push for synchronization, allowing real-time updates of backend application information.
RhoHub is a hosted development environment for Rhodes and Rhosync. The RhoSync application will be deployed on the famous Ruby cloud Heroku with the interface of RhoHub. RhoHub enables git-powered source control and collaboration with your team. It allows us to directly build an application for different smart phones without installing SDKs.
It makes the process of the build very smooth since we don't have to install any development toolkits. It is only a one click process that automatically creates a build for most of the smart phones.
Rhohub provides us with the following functionalities:
- Creating a build for a Rhodes application
- Deploying the Rhosync application to the cloud
- Providing version control with git
- Managing collaborators
RhoGallery provides a hosted mobile app management solution. It allows administrators to manage the set of apps exposed to their users. It also makes it easy for them to get mobile apps onto their devices. It enables users to launch all of their important enterprise apps from a single place. RhoGallery consists of a management console for "app galleries" on RhoHub, as well as a RhoGallery App that users load onto their devices. Even for an individual developer with one or a few apps, RhoGallery makes it easy to expose those apps to their users. RhoGallery handles inviting the users and determining the appropriate downloads to provide to them.
RhoGallery provides the following functionalities:
- Administrator management of exposed apps to end users
- Central user launching of exposed apps
- Automatic provisioning of appropriate apps for end users
Why Rhomobile is cutting edge
The following features give a cutting edge to Rhomobile in mobile application development:
- Cross Platform Support for All Devices: Rhodes supports the following devices: Android, Windows Mobile, BlackBerry, and iphone. The best thing is you have a single code base from which you can build applications for different smart phones. It does not work in a traditional way in that we have to write separate code for different types of phones.
- Offline Capabilities using Rhosync: Rhomobile supports local synchronization of data. As we can synchronize the data using Rhosync it provides offline Capabilities. It can work even if you are offline.
- Object Relational Manager: Rhodes provides an inbuilt Object Relational Manager called Rhom. It is similar to Active Record in Rails but with basic functionality only. It helps us to write queries without thinking about which database is being used by phone.
- Rapid Development: One of the most interesting features of Rhodes is that it imposes some fairly serious constraints on how you structure the applications that help us for rapid development. Rhomobile products are properly structured and well organized, which enforce us to do rapid development. Rhodes is very comfortable, familiar, and massively productive.
- Scalable Sync Server: The Sync Server uses a NoSql Database which makes it scalable. Specifically, it is the only sync server that has a built-in "no SQL" Redis key value store, making it more scalable than other sync servers which offer internal relational database servers for caching. RhoSync also performs its push-based sync using the native smart phone push SDKs, which no other sync server does.
- Liberal use of code generation: Rhodes/RhoSync can write a lot of code for you. For example, when you need a class to represent a table in your database, you don't have to write most of the methods. Rhodes even offers an application generator that creates an initial app based on the structure of your models or business objects in your app. It's very similar to the scaffolding offered by most modern web frameworks with basic list/create/read/update/delete objects functionality. For each basic CRUD action, views in HTML are also offered. You'll find that you're writing only a fraction of code compared to other frameworks.
- Metadata: Every enterprise application that is used to run a company's core business has a different schema for its business objects. For example, every application has a varying and customized structure that changes with time. It is not possible to install the client application again and again for a small change. The Metadata framework provides a way to handle the view from the Rhosync server. It also provides validation and a custom template.
- Hosted Development and Build: Rhomobile also provides a hosted management and Build through Rhohub. We can deploy a Rhosync app and build our Rhodes code for different phones with it.
eBook Price: $26.99
Book Price: $44.99
|Read more about this book|
(For more resources on this topic, see here.)
Which products does Rhomobile support?
Rhomobile supports a variety of smart phone devices and tablets. Currently, Rhodes version 3 supports the following major platforms:
- iPhone and iPad
- Windows Mobile including Windows mobile 7
Note: Support for Symbian is no longer available from Rhodes version 2.2.
One of the interesting features of Rhomobile is that it imposes some fairly serious constraints on how we structure our mobile applications. Surprisingly, these constraints make it easier to create applications—a lot easier than one may think. To understand how these constraints help us, it is essential to understand the architecture first.
The normal Rhomobile application has a 3-layer architecture:
- Rhodes Application
- Rhosync Server
- Backend Application
This is the application that will be installed on your smart phone. It can also work independently without using Rhosync. If you don't have any external data, you can only develop your application with Rhodes.
Rhodes applications are developed with MVC. These are true native device applications (NOT mobile web apps) that work with synchronized local data and take advantage of device capabilities such as GPS, PIM contacts and calendar, camera, native mapping, push, barcode, signature capture, and Bluetooth.
The major components of a Rhodes Application are:
- Model View Controller: This is the heart of a Rhodes application that has the major code of your application. The model manages the behavior and data of the application domain, and responds to requests for information about its state (usually from the view), as well as to instructions to change the state. The view manages the display of information. The controller receives input and initiates a response by making calls on model objects. A controller accepts input from the user and instructs the model and viewport to perform actions based on that input.
- Rhom: This is the mini ORM Layer provided by Rhodes that helps us to run a query on Phone Devices. It provides a high level way to make the local database easier to program. That database is SQLite on all platforms except BlackBerry, where it is HSQL. Speeding your time to market continues to be the theme at Rhomobile and including an ORM in the framework saves you time during the development phase by standardizing and simplifying the effort when writing mobile business apps once for all the popular Smartphones.
- Ruby Virtual Machine: This is the inbuilt Executable available for Rhodes that executes the Ruby code.
- Device API: These are APIs that help us to access device capability like GPS, PIM contacts and calendar, camera, native mapping, push, barcode, signature capture, and Bluetooth.
- RhoSync Client: These are the codes to synchronize the data from the Rhosync server. These include code for authentication, Synchronization, Reset Database, etc.
Rhosync is a Mobile sync Server that keeps enterprise application data up to date and available on users' smart phones. The information is stored locally on a user's device and available when disconnected. The RhoSync server handles the job of connecting the Rhodes application to backend applications, keeping track of multiple devices and what information they need, and sending them just those updates. RhoSync can also be used to register its interest in changing information from the backend. It then efficiently "pushes" the changes to the phones via the native Smartphone push SDKs.
RhoSync consists of the following components:
- Synchronization Framework: The core of RhoSync; this facilitates data synchronization between the Rhodes/RhoSync-Client and a third-party source (SOAP, REST, etc.). Each source is synchronized by implementing a simple "source adapter" class. The client connects with the embedded Sinatra server to interact with the collection of source adapters.
- REST API: The RhoSync API allows you to control, monitor, and debug a running RhoSync application using a simple HTTP API.
- Administration Console: A Sinatra server is used for manipulating and peeking into a running RhoSync app. The console uses the RhoSync API for its functionality.
- Asynchronous Job System: RhoSync uses the Resque library to provide asynchronous execution of various tasks that it needs to perform. These tasks include source adapter execution, sending push messages, preparing bulk data, etc. Resque is dead-simple to use and highly extensible, so it can easily be used for other functionality not described here.
This application feeds data using REST, SOAP, or any other API to the RhoSync Server. It can also interact directly with the Rhodes application using Async HTTP calls. This is your basic legacy application that can provide data to the RhoSync Server in JSON, XML, or any other format. These are similar to web services that can be developed in any language. There are plugins that allow the Client application to fetch data directly from a Backend application. It is also possible that RhoSync can interact with multiple Backend Applications.
Now we have understood Rhomobile and its architecture. Following are the topics we have covered:
- What is a mobile app
- What is Rhomobile Inc. and its products
- What is the difference between Rhomobile and other products in the market
- What is the architecture of Rhomobile
- Rhomobile FAQs [Article]
- Getting Started with Internet Explorer Mobile [Article]
- jQuery Mobile: Organizing Information with List Views [Article]
- jQuery Mobile: Collapsible Blocks and Theming Content [Article]
- Fundamentals of XHTML MP in Mobile Web Development [Article]
eBook Price: $26.99
Book Price: $44.99
About the Author :
Abhishek Nalwaya is the author of the book, Rhomobile Beginner's Guide (PACKT Publishing, July 2011 ). He is a Ruby enthusiast and loves participating regularly at ruby/rails meetups. He works for Mckinsey and Company IT. He has talked at many conferences and meetups and was the speaker at RubyConfIndia2012 and RubyMotion Conference 2013