Welcome Guest, Not a member yet? Register   Sign In
URL for site with great MVC dos and donts
#1

[eluser]Unknown[/eluser]
A few days ago I came across a site with a great list of what should and shouldn't go in controllers, models and views. Now I can't find it no matter what I search for.

Does anyone know what site I might have found that on?
#2

[eluser]Yash[/eluser]
try this
[url="http://nemetral.net/2008/07/31/a-gentle-introduction-to-mvc-part-1/"]mvc tut[/url]
#3

[eluser]Colin Williams[/eluser]
Quote:A few days ago I came across a site with a great list of what should and shouldn’t go in controllers, models and views.

It actually really depends on what degree of separation you require. Like, who gets more power? Views or Controllers... WordPress and EE are examples where the Views have the power (Views interface directly with Model), Drupal is kind of like a blend but the power is meant for the Controllers (Controllers provide data for the Views to use).

Quote:CodeIgniter is based on the Model-View-Controller development pattern. MVC is a software approach that separates application logic from presentation. In practice, it permits your web pages to contain minimal scripting since the presentation is separate from the PHP scripting.

Remember that MVC is a pattern. Patterns are often things you FIND and not things you MAKE. You often run across posts where guys think they've done something remarkable by discovering such-and-such framework/CMS is actually kind of like MVC. I could take the MVC pattern and apply it to the tree outside my office window.

So, choose the specific PATTERN you wish to strictly follow, and then it becomes a GUIDELINE.

FULL DISCLOSURE ============

I've made congruent statements on this forum before, that "that breaks MVC." Turns out I was wrong in saying it that way. I should have been saying, "...that breaks my preferred guidelines based on MVC."




Theme © iAndrew 2016 - Forum software by © MyBB