Comments on: Writing a Minimalistic MVC Framework in PHP http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Sebastião Relson (@relson) http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-22747 Wed, 25 Jul 2012 12:37:51 +0000 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-22747

@Luke, put your github account on social links too :)

Reply  |  Quote
]]>
By: Sebastião Relson http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-22718 Mon, 23 Jul 2012 06:57:16 +0000 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-22718

Nice,

the URL tips on commets is very helpful, great post!

Reply  |  Quote
]]>
By: Aksel http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-14482 Thu, 04 Mar 2010 23:12:18 +0000 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-14482

@ Volomike:
Reading this blog entry and especially your comments, I am now converting to MVC religion also.

Reply  |  Quote
]]>
By: Volomike http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-11126 Thu, 01 Jan 2009 03:14:48 +0000 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-11126

Just an announcement. I’ve seen the light. I’m MVC all the way now. I mean, I was doing this sort of stuff, anyway, just not realizing it. The other day I started doing some control routing from incoming URLs, and then I said, “See? That’s the front controller you’re building.” I then started building a template class instead of using Smarty, and again I said, “See? That’s the view class.” So then I started learning about the difference between a front controller and page controllers, the purpose of models vs. controllers, and I then started evaluating frameworks. From there, I realized that the only way I would be satisifed was to make my own MVC framework, so I did it.

So, another angel gets his wings in heaven.

Reply  |  Quote
]]>
By: Ernie http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10758 Thu, 20 Nov 2008 22:25:11 +0000 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10758

The missing url for routing is http://www.allseeing-i.com/Bare-bones-Rails-style-MVC-Request-Router-f or-PHP

Reply  |  Quote
]]>
By: Ernie http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10757 Thu, 20 Nov 2008 22:23:06 +0000 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10757

From my personal use any CRUD functionality is in a parent model class that all models inherit from.

As for handling clean (sexy) URLs, having some kind of routing schema helps. Horde has such functionality – http://dev.horde.org/routes/manual/index.html, and there is another here, which can be integrated in setups like this.

Reply  |  Quote
]]>
By: Jshpro2 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10582 Mon, 03 Nov 2008 13:10:15 +0000 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10582

sounds good, PM it over :-)

Reply  |  Quote
]]>
By: PCSpectra http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10581 Mon, 03 Nov 2008 13:09:03 +0000 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10581

I initially wrote a long winded counter argument but after re-considering I really don’t think it’s appropriate to hijack this guys blog.

If you wish to continue disscussion start a topic in T & D at DN and I’ll likely speak my two cents. :P

Cheers,
Alex

Reply  |  Quote
]]>
By: Jshpro2 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10580 Mon, 03 Nov 2008 12:42:52 +0000 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10580

Also saying using a base controller causes less flexible code doesn’t make sense, your controllers need convenience methods like accessors to request objects, factory methods for generating views. Using a base controller in my experience has helped me not repeat myself, not produce less flexible code. Majority of the PHP MVC frameworks have you subclass a controller_action class or something of the sorts.

Reply  |  Quote
]]>
By: Jshpro2 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10579 Mon, 03 Nov 2008 12:40:49 +0000 http://www.terminally-incoherent.com/blog/2008/10/22/writing-a-minimalistic-mvc-framework-in-php/#comment-10579

Of course a controller action ( action level ) doesn’t require 100% of the time a dependancy to a model and a view, I’m saying in the MVC pattern the view fires events, the controller catches events. You are uncoupling the view from the model, by coupling the model to the controller. You can’t get rid of coupling you can only move it around to more desirable places. My argument wasn’t about how to write a CRUD controller but basically its called a state object, instead of subclassing an abstract class you have the object’s behavior change based on some internal flag, subclassing the object only for special case applications, since your controllers have an inheritance hierarchy you’re writing code only once. Less code? yeah, less controllers? depends on your coding style.

Reply  |  Quote
]]>