Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find a sample PHP MVC application? [closed]

I've been attempting to understand how MVC applications are structured and have spent time with frameworks like CodeIgniter and Zend making small test websites to play around with. However I'm still unsure if I completely understand how to separate the logic properly since it still seems like it's taking more time than it's saving.

I learn best from looking at well-written code and I have a feeling there are a few talented programmers on SO.

Are there any good "Real World" examples of a PHP MVC application that I could look over? I've made the mistake of not asking about best practices and instead pick up poor coding practices in the past and I want to avoid making such a mistake moving forward.

Thanks SO!

like image 967
Workman Avatar asked Mar 22 '11 20:03

Workman


People also ask

What is MVC in PHP with example?

PHP MVC is an application design pattern that separates the application data and business logic (model) from the presentation (view). MVC stands for Model, View & Controller. The controller mediates between the models and views. Think of the MVC design pattern as a car and the driver.

Is MVC used in PHP?

PHP frameworks typically follow the Model View Controller (MVC) design pattern. This concept separates the manipulation of data from its presentation. The Model stores the business logic and application data. It passes data to the View, the presentation layer.

What does MVC stand for in PHP?

The Model-View-Control (MVC) pattern, originally formulated in the late 1970s, is a software architecture pattern built on the basis of keeping the presentation of data separate from the methods that interact with the data.

What is MVC simple example?

Car driving mechanism is another example of the MVC model. Every car consist of three main parts. View= User interface : (Gear lever, panels, steering wheel, brake, etc.) Controller- Mechanism (Engine) Model- Storage (Petrol or Diesel tank)


3 Answers

I found this PHP tutorial to be useful when I first wanted to improve my understanding.

like image 115
kba Avatar answered Oct 27 '22 19:10

kba


I'm writing an open source bugtracker, you might want to have a look. The code may not be 100% neat and clean, but it's mostly better than worse ;). http://code.google.com/p/bugraid/

like image 39
mingos Avatar answered Oct 27 '22 17:10

mingos


A pretty good basic Zend example is http://akrabat.com/zend-framework-tutorial/

Or you could just use ZFtool to create a project a very basic program and understand how it is brought together

>zf create project <path> from within the bin directory in your zend download
like image 2
Shaun Hare Avatar answered Oct 27 '22 17:10

Shaun Hare