Pillblast
Pillblast

Reputation: 1221

What is the right way to make a PHP website object oriented and MVC?

I was wondering what is the right way to use PHP in an Object oriented way and with a goo MVC architectural pattern?

I tried for a project at school to use MVC and make it Object oriented, but I am sure I wend the wrong way, because when it came to deploying the website I had so many issues it was not usable. Obviously now I am trying to figure out how, if I started all over would I go around doing it?

Would it make such a big difference using a framework like Zend? If anyone could point me to a good structured open source example I would be very happy, because I just can't figure out the "proper" way to do it.

Edit My main problem is not understanding MVC or OO separately, but using them together with PHP.

Upvotes: 3

Views: 4907

Answers (2)

mixman
mixman

Reputation: 450

I'll suggest the following:

  1. Understand the underpinnings of an MVC by skimming thru The no-framework PHP MVC framework (don't mind the code).
  2. Test MVC with a big name framework like Symfony to see "best practices" at play. Their documentation and code is worth spending time on.
  3. Experiment.

Upvotes: 4

Radoslav Georgiev
Radoslav Georgiev

Reputation: 1376

You should use some already created and tested framework. (They really spare time and code-writing) This is a good website for different PHP frameworks comparison.

In my opinion, if you want something small and light, you can check CodeIgniter or Yii framework

Upvotes: 0

Related Questions