2009年8月3日星期一

Re: [fw-mvc] ZF & Dojo Custom Build

Kostyantyn Shakhov wrote:
> I created a Dojo Custom Build (Layer). It consists of the following directories:
>
> dijit
> dojo
> util
>
> The main JS file of the build is in dojo/my-dojo.js
>
> Although the following point of its usage with ZF are unclear still:
>
> 1. Is the build platform independent, meaning is the same build can be
> used for both development and production platforms?
> 2. Are all of the above subdirectories required to be able to use the Layer?
> 3. How to use the Layer in ZF if its files were copied into
> scripts/dojo-custom public directory? Will the following work and
> enough:
> $view->dojo()->addStylesheetModule('dijit.themes.tundra')
> ->setLocalPath('/scripts/dojo/dojo.js')
> ->addLayer('/scripts/dojo-custom/dojo/my-dojo.js')
> ->registerModulePath('../scripts/dojo-custom', 'dojo-custom');
> 4. Should the Dojo full release code be kept in the scripts/dojo?
>
>
>
1. yes, but it is recommended to work from an unbuilt-src in
development, and adjust to use built in production.
2. not necessarily, it is just infinitely easier to copy over the whole
/release/ tree into production than to guess at which files you may or
may not need in the future (variable dojo.require,
dojo/resources/blank.html for iframes, etc)
3. simply point at the "new" dojo.js in
/scripts/dojo-custom/dojo/dojo.js as the root, all modules/layers work
relative from that position.
4. it is not necessary. As with #3, the tree used is the one relative to
the included dojo.js. none of the unbuilt tree will be used if you
asjust to the new location.

Hope this helps

Regards,
Peter

--
Peter E Higgins
Dojo Project Lead : http://dojotoolkit.org

没有评论: