Page 2 of 2
Posted: Tue Aug 14, 2007 1:09 pm
by Christopher
McGruff wrote:But why do you want an MVC architecture in the first place?
I assume by it that you mean why have a View/Controller separation as opposed to a monolithic Presentation layer. I also assume that you are not suggesting that the separation between the Presentation layer and the Domain layer be violated.
Given that the current practice of MVC in PHP does not require strict adherence to any of the several variations of the MVC pattern, the question actually becomes:
Why not do View/Controller separation?
Posted: Tue Aug 14, 2007 1:22 pm
by alex.barylski
superdezign wrote:McGruff wrote:But why do you want an MVC architecture in the first place?
PHP in HTML... HTML in PHP... It was all too messy for me. I've had a basic MVC for about a month now, but the controllers were hardcoded as pages, and the modules and views were merged into one element. The separation to that much was much neater than previous but getting closer a pure MVC structure is proving to be even more manageable. It's just a matter of "doing it properly" at this point.
You can still achieve MVC using pages - ASP.NET uses pages. The only difference is it's more a page controller design than front controller design which is more common in PHP (what Java calls a Model 2 design).
Posted: Tue Aug 14, 2007 2:52 pm
by superdezign
Hockey wrote:You can still achieve MVC using pages - ASP.NET uses pages. The only difference is it's more a page controller design than front controller design which is more common in PHP (what Java calls a Model 2 design).
I like the way the front controller makes it a bit more dynamic. Plus, It's a lot more comfortable to send mod_rewrite straight to my index and then allow me to process the requests myself. My remote server doesn't support PCRE in mod_rewrite, so I feel that PHP should be the one to take care of it.
Posted: Tue Aug 14, 2007 4:35 pm
by alex.barylski
I think most PHP developers do.
