1

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

2 Answers 2

1

I 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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.