tags:

views:

152

answers:

2

Hello, It's there some good MVC framework to get started with?

I want to migrate my projects to a MVC framework but i'm very confused and I don't know what framework is the best for learn...

My projects always consists of backend and a frontend, programmed by me.

Do you recommend me some book to understand MVC more deeply? What framework to use? What's the easiest to learn and the most powerful?

Thanks

+3  A: 

MVC in PHP can be a very confusing topic because of the numerous number of opinions on the subject. Every explanation you'll see will be quite different.

In reality it isn't that important which school you chose to follow. All the major frameworks uses valid MVC implementations, so you can pick anyone of them and just get started using their tutorials. You'll get the MVC part for free. For frameworks such as CakePHP you'll be forced to use it. Others such as Zend Framework just forces you to use VC (views and controllers) but gives you the power you use true models if you'd like.

Just pick a framework that fits your style and does what you need, and go with it.

Other well known frameworks includes:

A good place to start if you want to learn more about application design in PHP is the Sitepoint PHP Application Design Froum.

Emil H
-1 for saying MVC isn't important
Click Upvote
That isn't what I meant. I've corrected the sentence.
Emil H
Thank you, I think I will begin with Zend Framework
xaguilars
+1  A: 

Head First Design Patterns has a great chapter devoted to MVC and the Observer pattern. The code samples are in Java, but the explanation of the concepts behind MVC are detailed and clear.

UPDATE:

From wikipedia:

  • When an abstraction has two aspects, one is dependent on the other. Encapsulating these aspects in separate objects allows the
    programmer to vary and reuse them
    independently.
  • When a change to one object requires changing others, and it's not known in advance how many objects need to be changed
  • When a change to one object requires changing others, and it's not known in advance how many objects need to be changed.
  • When an object should be able to notify other objects without making assumptions about who these objects are.

The observer pattern is also very often associated with the model-view-controller (MVC) paradigm. In MVC, the observer pattern is used to create a loose coupling between the model and the view. Typically, a modification in the model triggers the notification of model observers which are actually the views.

David Robbins
Perhaps I'm misunderstanding but what does Observer pattern have to do with MVC?
Joe Philllips