Forum Moderators: coopster

Message Too Old, No Replies

why oop php?

why oop php?

         

drooh

10:07 pm on Apr 21, 2009 (gmt 0)

10+ Year Member



I have done my share of research and homework. I understand the very basics of oop and can write a little with php.

I feel I have come very far with php & mysql, enough to make a happy living.

I need to know what are some real world examples and uses for php oop.

I have built my own cms, dynamic calendars, blogs, media managers etc and I can definitely see a use for custom functions and I definitely re-use them.

How can the oop methods really help me? From what I understand oop is slower on the server and initially is more code.

Is oop better for huge systems with mutliple people working on them?

Is oop good for the free lance web developer? One who does small to medium size biz sites?

Ive gone through multiple tuts that have helped me create colored boxes and write my name out. I've even got one that allowed me to access a database amd query it, but i still dont see the advantage, if anything, it seems to add unnecessary complexity to it. i love to be organized and i love organizing my code and reusing code. but cant i be organized and reuse code with out oop?

i've read that writing in oop makes your stuff easier to share with others and easier for others to work on. how is this true if you write neat clean easy to understand code and you have a great understanding of the php language?

are there any elaborate examples out there, some that interact with mysql databases and are thorough and real world?

should i feel like I am inadequate if i write procedurally?

Pico_Train

5:46 pm on Apr 22, 2009 (gmt 0)

10+ Year Member



Is oop better for huge systems with mutliple people working on them?

Yes

Is oop good for the free lance web developer? One who does small to medium size biz sites?

Yes

It seems complex at first. But the point is that everything is separated into parts so you can use 1 part here and another there without having 200 files using the same function, you just include or reuse 1 function.

Like you navigation. You have 300 pages. You don't copy and paste the navigation on every page so that everytime you change it you have to change it 300 times. You use an include.

Persevere. It seems more complex at first but it really isn't. It makes site management easier, it allows you to change code for an entire site/function/task in one go.

should i feel like I am inadequate if i write procedurally? No, just wasting a bit of time here and there.

eeek

12:48 am on Apr 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is oop better for huge systems with mutliple people working on them?

Yes

Or no.

Pico_Train

5:47 am on Apr 26, 2009 (gmt 0)

10+ Year Member



Why not? Everything is broken into objects. Model, logic, template. What's not good about it?