Reputation: 25383
So far in my Dojo web applications I have handled the main application flow by separating all of the high level views (ex: home, search page, admin page, etc) into widgets and changing views by adding them to a all-encompassing widget that contains the entire application and swapping out the display css property ('none', 'block') of the high-level view widgets.
This works, but seems clunky.
I have started looking into dojox/app, but it seems more suited for mobile development. From the dojo reference guide:
dojox/app is an application framework designed to simply configure through a configuration file an application formed of potentially nested views and to facilitate the transitioning between those views based. Its main current targets are mobile (phone & tablet) devices but it is not restricted to this and can be used for desktop applications as well. Thanks to dojox/app the applications are easily configurable and buildable for easy and fast deployment
Perhaps someone with experience could lay out some pros and cons for using Dojox/app in desktop applications running in the browser? Or other more formal alternatives to handling this (view switching in particular) manually?
Upvotes: 2
Views: 454
Reputation: 44685
The main reason (I think) that the dojox/app
library mainly focuses on the mobile aspect is because the mobile community actually needs it more than a desktop environment. Usually when developing mobile apps you will use a multi-page structure due to the screen size (for example a list page, a detail page, ...). While desktop applications can rely on using a single page (and then the dojox/mvc framework alone will work as well).
The dojox/app library includes many application level APIs, such as navigating between pages (controllers/views) while dojox/mvc mainly focuses on the Model, View, Controller part.
However, dojox/app will work fine on a desktop environment, the most important change will probably just be the view, but the technology behind it doesn't change.
If you're looking for a list of pros/cons I cannot give those, the only thing I can come up with is that there are not a lot of examples on the web about using dojox/app on a desktop environment. Even the reference guide is not up to date (as it is still using data stores which are deprecated).
I don't think there are other alternatives inside the Dojo toolkit (certainly not if you're looking for view switching), you could use dojox/mvc but it means you will have to do more things by yourself. But there are plenty of JavaScript MVC frameworks on the web (AngularJS, Ember.js).
Upvotes: 1