Hi,

I coded some web applications (blog, message board) all in procedural way, and now I want to start doing all that with planing and clean and extensible code.
I now that OOP is the way, I checked MVC system of programming, and everything seems nice.

I already know syntacs of OOP in PHP, but I find it kind of hard to start working with it, I can't find some nice and SIMPLE examples of object oriented PHP.

I also see that PHPCake seems like great framework, and they use MVC so it's gonna be great working with PHPCake. My question is, should I start with that framework now, with limited knowledge of OOP or I should master OOP first?

I'm not sure I will understand it completely if I'm not comfortable with Object Oriented Programming first.

Member Avatar for iamthwee

Get comfortable with OOP... It's not that difficult.

I already know syntacs of OOP in PHP, but I find it kind of hard to start working with it, I can't find some nice and SIMPLE examples of object oriented PHP.

In my experience you won't find good *and* simple examples. OOP is best suited to larger projects, and larger projects have a tendency to be anything but simple. ;)

My question is, should I start with that framework now, with limited knowledge of OOP or I should master OOP first?

I'd say start working with the framework and learn OOP as you go. You're not going to master OOP without using it in real applications anyway, and missteps are to be expected, so go at it and don't be afraid to mess up a design or two. Throwing away failed attempts comes with the territory.

I'm not sure I will understand it completely if I'm not comfortable with Object Oriented Programming first.

Perhaps not, but in figuring it out, you'll become more comfortable. Here's a shocking revelation: professional programmers learn things on the way and rarely are comfortable with all aspects of any new project unless they've holed themselves up in a comfortable niche.

commented: Thanks a lot mate ;) +1
Member Avatar for diafol

Get comfortable with OOP... It's not that difficult.

Oh, yes it is.

Hi all, I've used many MVC's before for various projects. I recommend Codeigniter as its simple and a very open MVC. But yeah, start using a good MVC or any other OOP application and get used to it, then you'll realize in using this you'll automatically learn OOP. It's like magic.

Thanks,
Marais

I think OOP first, singleton second (this is important in some environment), templating system third. Getting very comfortable with those three might change your perception about MVC. If it doesn't, make MVC fourth (try cake or codeigniter):).

I prefer Zend framework, because I already spent all of my monthly allowance, including my lunch money on it. If I only have known better, I probably stick around with codeIgniter or Cake. There are occasions where any of those will not fit the environment , but OOP and some simple templating system like smarty will do the job with less thinking and less grease on my hair.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.