質問

I am working on enterprise-level business applications, and now is the time to start thinking about the non-desktop experience. We have a common component code-base that is using dojo, and are trying to get as much code re-use as possible.

I am really struggling to determine if I should re-use the same code base, or have separate code bases for desktop and mobile.

A big factor in my decision making is the viabliity of dojox/mobile. It seems pretty cool, and uses the dojo infrastructure which is a huge win, but the fact that it is in dojox scares me a little.

Some questions:

  • Is dojox/mobile something that can be relied on long term?

  • Is it a smart idea to try to swap out dijit components for dojox/mobile components depending on what has.js can tell me?

  • Will dojox/mobile be a part of dojo2.0?

役に立ちましたか?

解決 2

You can rely on dojox/mobile. DojoX will indeed disappear from the Dojo Toolkit in 2.0, but most matured (and probably maintained) modules will be pushed to the dijit/dojo library. I quote the reference guide:

In the future (Dojo 2.0), the DojoX package and namespace will removed. Sub-Packages and modules will be either integrated into the Dojo Core, Dijit or separated as their own stand-alone package. For the 1.X code stream though, in order to ensure backwards compatibility, all these packages are contained within the dojox namespace and package.

If we look at the explanation of Mature, we can read the following:

This package or module is considered mature and is being actively developed and maintained by committers within the Dojo Toolkit. It is expected that it will persist into the foreseeable future.

Source

And if you look at the link above, you will notice that dojox/mobile is categorized as mature.


Another reason you can rely on it is that IBM (which can be considered a pretty big company and committer to the Dojo toolkit) also relies on dojox/mobile for their mobile product called IBM Worklight. If they rely on it, then there's no reason you couldn't.


I don't think it will be easy to start from the same code base and swap out dijits for dojox/mobile components. Usually mobile app development requires an entire different strategy than web applications. You will probably have to split certain things into multiple views and some dijits may not have a mobile alternative.

You can probably re-use most of your utilities and business logic, but I think you will have to start from scratch again if you want to write your view(s). But I'm not really an advanced mobile developer.

他のヒント

I would add that in Dojo 2.0 the plan is to converge as much as possible the desktop (dijit) and the mobile (dojox/mobile) widgets which should help in your use-case. See: http://mail.dojotoolkit.org/pipermail/dojo-contributors/2013-June/029041.html

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top