标签云

微信群

扫码加入我们

WeChat QR Code

My background is jQuery/require.js/backbone.js!In order to broaden my horizon I'm taking a closer look into Dojo.In backbone.js you have the view component. Some people would rather say it's a controller.So if I want to set up a new page controller, I generate a new backbone.js view and I have a very nice and useful collection of methods available.I found a Dojo 1.7 tutorial for a page-level controller (http://dojotoolkit.org/documentation/tutorials/1.7/recipes/app_controller/). But I was quite disappointed to learn that the page author did the whole controller from scratch.He wrote in the summary:The controller could have been derived from a class.Maybe, to keep the tutorial simple, he didn't mention the base class you normally use for this kind of real world controller.Or is there really no base class you can use?Maybe there's some 3rd party class with a permissive license?Thanks a lot in advanceWolfgangUpdate:Thank you, Chris Mitchell, for your answer. I'm glad to hear that there is a lot of development in dojo client mvc.So the jQuery/jQuery UI/backbone.js stack is maybe a little step ahead in this page controller matter. But dojo is really a great framework.I guess, as far as I understand, relating to MVC WIDGETS dojo has more to offer than jQuery UI:Dojo widgets already have widget templating, whereas jQuery UI does not have this at the moment.If you look into the source code of a jQuery Ui widget, there is no such separation, HTML snippets are "built"/concatenated with Javascript, this is much harder to maintain.According to the blog post from Boris Moore (http://www.borismoore.com/2011/10/jquery-templates-and-jsviews-roadmap.html) the jQuery UI team maybe goes in the same direction.Generally, in the jQuery realm I haven't seen that many mvc widgets:One example is a jQuery Autocomplete Plugin with backbone.js models (http://www.planbox.com/blog/news/updates/jquery-autocomplete-plugin-for-backbone-js.html).


I think the question is not being answered here... He's asking for specific implementation.

2019年04月22日51分21秒

I just posted the question to dojo mailing list - hopefully someone has a better answer there.

2019年04月22日51分21秒