Finding Dojo MVC-Controller-Class as a base

My background is jQuery / require.js / backbone.js!
To broaden the horizon, I'll take a closer look at Dojo.
In backbone.js you have a view component. Some people would rather say this with a controller.
Therefore, if I want to configure a new page controller, I create a new view of backbone.js, and I have a very nice and useful collection of methods available.
I found the Dojo 1.7 tutorial for the page level controller ( http://dojotoolkit.org/documentation/tutorials/1.7/recipes/app_controller/) . But I was very disappointed to learn that the author of the pages made the entire controller from scratch. He wrote in a summary:

The controller could be obtained from the class.

It is possible that the tutorial was simple, it did not mention the base class that you usually use for such a real-world controller.
Or is there really no base class that you can use? Maybe there is some third-party class with a license?
Thank you very much in advance
Wolfgang

Update:
Thank you, Chris Mitchell, for your reply. I am glad to hear that there are many developments in the Dojo mvc client.
So the jQuery / jQuery UI / backbone.js stack can go a bit further in this question. But Dojo is really great infrastructure.
I think, as I understand it, with respect to MVC WIDGETS, Dojo can offer more than the jQuery user interface:
Dojo The widget already has template templates, while the jQuery user interface does not currently do this.
If you look at the source code of the jQuery Ui widget, there is no such separation, HTML fragments are β€œbuilt” / merged using Javascript, it is much more difficult to maintain. According to a blog post from Boris Moore (http://www.borismoore.com/2011/10/jquery-templates-and-jsviews-roadmap.html) the jQuery UI team may be going in the same direction.
Typically, in the jQuery area, I have not seen many mvc widgets:
One example is the jQuery autocomplete plugin with backbone.js models (Http://www.planbox.com/blog/news/updates/jquery-autocomplete-plugin-for-backbone-js.html).

+4
source share
2 answers

This is a very interesting question.

I have been using Dojo for a long time (5+ years) and I don’t know anything like this in the kit.

It seems like a relatively new idea (at least I've heard about this over the last couple of years) to implement a full-blown MVC client-side JS template. It really seems like a good idea.

This is especially true for Dojo, given that it has support for large-scale single-page applications. My opinion is that Dojo glows. A consistent, MVC-based way to manage a common client application will seem useful.

This is one of those things that will ultimately be created by the application, why not make it official?


Update

Someone on the mailing list mentions the dojox.mvc project.

+2
source

The MVC pattern described in the related tutorial is just one example of how MVC can be implemented using Dojo.

The Dojo community is working on two new subprojects to formalize Dojo's official MVC approach. Keep in mind the following: in 1.7, these subprojects are currently experimental, and the API will change to 1.8 timeframes based on early feedback and use in a number of projects.

The first processed package is dojox / mvc. This package addresses data binding issues between the view and its model.

The second development package is dojox / app. This package addresses application-level controller issues, such as viewing to view navigation, viewing the life cycle, sharing model data between views.

Both packages are designed to work together, but use is either optional.

To see a good example of using dojo / mvc, see the last James Thomas blog post: http://jamesthom.as/blog/2012/02/26/dojomvc-models/

The Todo MVC application, which James introduced in the Dojo example, is a good way to understand the differences between client-side mvc approaches between modern libraries.

There are many events related to both of these projects, with application examples in 1.8 timeframes.

+3
source

Source: https://habr.com/ru/post/1395418/


All Articles