What is this all about ?
MobiCloud is all about using Domain Specific Language (DSL) for creating cloud-mobile hybrid applications. You simply write an application in our DSL and generate the code for the target platforms. You can either use the code as it is or customize it further after that. Either way you as a developer would not have to write any code to store data, retrieve data, UI or event handling!
This image illustrates what we do in MobiCloud.
![]() |
| An overview of our approach |
Why ?
The objective of this research is to alleviate the problems caused by the multitude heterogeneities present in both the Cloud and the mobile spaces. These issues are well discussed in MobiCloud Technical Report
The MVC Design Pattern
Model-View-Controller or MVC is a well known design pattern to apply to UI based applications.
Model represents a data-structure that holds neutral representation of the data items pertinent to the application. A view, representing the data in a format suitable to the user, observes the model and updates its presentation. Any interactions with the view are processed via a controller which adjusts the model that are reflected in the view. The controller typically restricts the operations on the model and may directly update the view to notify the status of an operation.
An Example
recipe :helloworld do
metadata :id => 'helloworld-app'
# models
models do
model :greeting,
{:message => :string}
end
#controllers
controllers do
controller :sayhello do
action :retrieve,:greeting
end
end
# views
views do
view :show_greeting,
{:models =>[:customer],
:controller => :sayhello,
:action => :retrieve}
end
end
A Quick Overview of the Language Elements
- Metadata: A collection of key-value pairs indicating metadata associated with this application. There are no enforced metadata values but depending on the choice of the targets certain metadata values may be deemed essential. For example when targeting the Google Appengine the :id value assumes the Googles Application Id value and deemed mandatory.
- Models: The models section defines each model with a name and a list of key-value pair attributes. The key-value pairs indicate the attribute name and the data type of the attribute. A single DSL can include any number of models. The name of the model acts as a unique identifier for a model and used to refer to models in others sections of the DSL script. Models may translate to data objects on both the client and the server to represent the same data structure.
- Controllers: Controllers define actions on models. The standard actions include Create, Retrieve, Update and Delete and their operations are implied. For example :create implies creating a relevant model object, assuming the required and optional parameters are provided.
- Views: Views are GUI components, translated to the necessary code to generate a suitable rendering in the targeted platform. The visual components of the views are implied from the action and the model the view is associated with. For example a :create operation implies that a model object
