Not very clear about the use of these two controllers? Can you give me a simple example of the explanation?
Reply content:
Not very clear about the use of these two controllers? Can you give me a simple example of the explanation?
Framework developers do not give any good explanations and explanations, basically by the developer's own understanding, do not need to limit the scope of the framework.
3.2.x began to enable more granular layering, Controller, Event, Model, Service, Logic ... For the main problem, in fact, TP recommendation is controller as "interaction with the outside" (personal understanding such as display view, accept form submission, etc.); event is only a response as an "internal event", usually only through a () To invoke (a personal understanding such as a controller needs to be provided to other controller interface methods, it is best to use the event). That's a bit of a detour.
I now use the EVENT because the front and back end of the separation, all requests are through Ajax, but the right to judge is not very good (such as the product list is not public, but can be selected in the form of goods), so it expands the two HTTP request method "event""event_ get", corresponding to the Read and list methods in the controller. The extended method is implemented by routing to someevent.
So say this thing, in fact, the matter, look at personal understanding, do not care about these details.