In general terms what is it that the MVC framework
differs from Event Driven Pattern
? Is it even comparable?
eg.: Codeigniter vs Wordpress
I mean while Codeigniter uses MVC
it "watches" the Model/Controllel/View,
Wordpress watches events
that happens on the website like Initializing(action - init hook), Admin bar initialization(action - admin init), loading the header (wp_head) etc..
I would like to have more insight on my view on this from a professional, thanks
In general terms what is it that the MVC framework
differs from Event Driven Pattern
? Is it even comparable?
eg.: Codeigniter vs Wordpress
I mean while Codeigniter uses MVC
it "watches" the Model/Controllel/View,
Wordpress watches events
that happens on the website like Initializing(action - init hook), Admin bar initialization(action - admin init), loading the header (wp_head) etc..
I would like to have more insight on my view on this from a professional, thanks
Share Improve this question asked Feb 1, 2017 at 0:43 JohnthomasJohnthomas 773 silver badges9 bronze badges2 Answers
Reset to default 1I will try to explain it simplest as i can:
MVC Framework - Is a framework, that uses MVC software architectural pattern. This pattern sepatares logic in Controller, data in Models, and HTML code in Views. This 3 are separated in different files, so code is cleaner.
Event Driven Pattern - Is a software architecture pattern, that promoting the production, detection, consumption of, and reaction to events.
It's 2 separated things. Wordpress don't use MVC pattern, but uses Event Driven Pattern paradigm. But for example Symfony 3 uses both MVC and Events.
If you want, you can code some event's like libraries in Codeigniter and use events. You can even use MVC patter in WP plugins But this solutions are not that great, if they are not in PHP application by default.
They are 2 different pattern. Modern Frmw give you the chance to use both 2. Wordpress since it's a cms software, use event driven pattern (with the famous hooks) to implements function during the execution, anyway it's up to all developers using a mvc oop as well, or a procedural pattern to display the contents. They're 2 pattern which make something different. One is fish, the others is meat.