Are the two controllers clearly used? A simple example is provided. Are the two controllers clearly used? A simple example is provided.
Reply content:
Are the two controllers clearly used? A simple example is provided.
Framework developers have not provided any good explanations or explanations. They basically rely on the developer's own understanding and do not need to be limited to the framework scope.
3.2.x starts to enable more detailed layers, including Controller, Event, Model, Service, Logic... for the subject issue, the TP suggests that the Controller be used as an "external interaction" (for example, display view, accept Form submission, etc ); event is only A response to an "Internal Event" and can only be called through A (). (For example, if A controller needs to provide an interface method to other controllers, it is best to use Event ). It's a bit difficult to say.
Now I use Event because of the separation of the frontend and backend. All requests use ajax, but permission judgment is not very good (for example, the product list cannot be published, but you can select a product in the form ), therefore, two HTTP request methods, "EVENT" and "EVENT_GET", are extended to correspond to the read and list methods in the controller. The extension method is implemented by routing to SomeEvent.
So let's talk about this thing. Actually, it's just a matter of fact. Let's look at my personal understanding and don't care about these details.