Dojox/app: Avoiding nightmares in hybrid development
Christian Karasiewicz 270005XS4E Visits (3965)
As a hybrid mobile software engineer, what most excites me about an application development technology is the extent to which it facilitates my day-to-day work of performing maintainability, scalability and code reuse application development tasks.
Three suggestions for avoiding maintainability and scalability nightmares
Dojox/app will allow your hybrid application to centralize functionality and configuration, to be more agile at development and to integrate with your data servers easily.
Dojox/app adopts the model view controller (MVC) paradigm and introduces the concepts of application controllers and modules as mechanisms of accessing and inheriting centralized functionality.
It decouples HTML from the JS functionality associated to it. This way you can define which template is being used by a view and which is the view controller associated to it.
In order to be agile in mobile development a strategy for code inheritance and complex UI design should be imposed.
In dojox/app, a views controller inherits and accesses centralized functionality through the modules, the application controllers and the this.app object in the following manners:
With dojox/app your team will be able to deliver the project’s honey just as bees do for their hive. They will have the mechanisms for delivering isolated code, which affects the application as a whole.
Complex designs are achieved in dojox/app by its layout controller mechanism. Basically we can distribute multiple HTML files that when loaded will be distributed according to a predefined layout. We will place the data-app-constraint attribute along our HTML code to let the layout controller know how to distribute HTML templates and elements.
Watch your server integration
The thing I most prefer about dojox/app is that it is fully integrated with dojox/mvc. It allows you to maintain fresh copies of your model data. You can access and manipulate such models from any controller and module. You can bind model changes to views and UI interactions to model data updates. This way, when a change happens on one end, with no additional line of code needed, such a change is reflected in the other end.
Finally, you can centralize all your server calls and application programming interfaces (API) into your modules. If you are using IBM Worklight adapter server integration, or simple Ajax requests such as WL.C
If you can't wait to integrate your app with dojox/app, stay in touch and reach me for further questions at @MolinaMobile.