Page Not Found Error, Yet The Page Does Exist

koeks525

Executive Member
Joined
Jul 14, 2012
Messages
6,013
Reaction score
1,199
Location
Canada
Model View Controller...Your Opinion

This thread was originally about a redirecting issue on my application, but I have solved it :)

I have been doing a bit of reading into Model Viewer Controller Pattern, and it seems all legit. I would love to ask Developers on this forum do you guys make use of MVC for all your applications?? Do you guys implement the entire MVC concept or only to a certain extent?? Is MVC worth it...or do you develop using other patterns??

Links I been reading about MVC:

http://www.sitepoint.com/the-mvc-pattern-and-php-1/
http://php-html.net/tutorials/model-view-controller-in-php/

Just a trivial question I wanted to ask other members on MyBB.
 
Last edited:
Yes it's worth it. It falls inline with separation of concerns. To only use portions of it, or short circuit it would only count against the power of it. I use mvc pattern in my Web Apps.
 
I would love to see how MVC is setup with PHP....I watched one video tutorial and the guy had been modifying the .htaccess file. I know that Model is where the logic and functions of the application go to, the view is the various views(pages) that get shown after data is sent to it...and the controller receives requests from the user....(or at least it is something like that :D )
 
http://simplemvcframework.com

https://github.com/panique/php-mvc

2 simple php MVC implementations

I assume the tut you saw using an htaccess was using mod_rewrite as a router. That works, except you are bound to Apache httpd, and would require work to run nginx


I use MVC for everything because it comes for free in Spring and Play.

You can also double layer MVC. Have Json views in your backend and MVC again in the front end in javascript.

The advantage here is that if you define your REST API contract up front, using stubs, you can dev your entire frontend without any backend implementation and visa versa. Mocking and testing Json endpoints is also a lot more pleasant than html
 
Last edited:
MVC is most certainly an excellent design pattern and is in use in many applications. Use it!

Though, mvc is just the tip of the iceberg. Once you start seeing how to seperate your business logic/rules from the "M" (model), implementing strategy patterns and how to actually leverage some DI, you then begin to see the possibility of architecting a well designed system.

The more you learn about design patterns in general, the better your coding and architecture skills will become.
 
I've used the MVC pattern for quite a while (unknowingly as normally the way I structure my stuff is usually a pattern somewhere already :D)

With .NET's implementation of MVC, sprinkled with a little MEF / DI, it's quite amazing. It's easy for a n00b to pick-up, especially with a big intranet site and it's straightforward enough for them to do bug fixes or changes (even additions) without having to know where or dig for code to change unnecessarily.

PHP's implementation depends on the framework you use. I think Laravel is quite nice
 
Top
Sign up to the MyBroadband newsletter
X