Page 1 of 2

Object Oriented Programing (OOP) and Design (OOD)

Posted: Thu Mar 30, 2006 1:00 pm
by Christopher
After all the discussions about programming methologies in PHP, and Object Oriented Programming (OOP) in particular, I thought I would ask what people's attitudes are. I am not interested here in the merits of one methodology over another (though I doubt I can stop the comments), just what people's feelings are positive or negatve, broken down by their experience with it.

Posted: Thu Mar 30, 2006 1:26 pm
by Ree
OOP all the way and still learning. Couldn't/Wouldn't program in any other way.

Posted: Thu Mar 30, 2006 1:28 pm
by R4000
i love my OOP :)

i use it all the time now xD

Posted: Thu Mar 30, 2006 2:14 pm
by timvw
Apart from examples i haven't seen Martin Fowler write much code so i can't compare.

When i'm confronted with a problem i always try to divide this problem in smaller problems. I iterate that proces until the problems are small enough so i can solve them. Usually i end up with OO code but that code isn't the goal itself. It just seems to be the best solution i can come up with at that given time for the specific problem.


(A couple of weeks i quickly hacked a wordpress plugin together. Afterwards i tried to discover the general behaviour of such a plugin and translated that into a class. As soon as my requirements change, or modifications are required, i'll let you know which version was the easies to change ;))

Posted: Thu Mar 30, 2006 4:08 pm
by onion2k
Anyone else read the poll and start wondering what Eastenders has to do with OOP?

Just me I guess..

Posted: Thu Mar 30, 2006 4:18 pm
by malcolmboston
ive movedover to classes almost exclusively now, i believe when your in the industry we're in, then when a client is paying you for work, you want to give him/her the most professional work, not just output but source code as well.

Classes = organised, tight, efficent code

my $0.02 anyway, search my posts from this time last year and i didnt have a clue what OOP was, its really not that hard to learn and is a vital asset to any programmer

Posted: Thu Mar 30, 2006 4:27 pm
by John Cartwright
My spider sense is tingling, so I'm reminding you all this is not a debate between OOP and Procedural. Carry on :D

Posted: Thu Mar 30, 2006 4:42 pm
by Christopher
onion2k wrote:Anyone else read the poll and start wondering what Eastenders has to do with OOP?

Just me I guess..
I really don't see much difference between here and here (if you turn either photo over they are same guy! ;)).

FYI - to Eastenders OOP means "Oi Ou! P***off!"

Posted: Thu Mar 30, 2006 5:29 pm
by Buddha443556
OOP was still an academic discussion when I start programming. Most of my OOP experience has been in C, C++ (C with Classes if your old enough to remember), Java and Perl. I have developed a healthy positive respect for OOP, OOD and OOA from my thirty years of experience. However, it takes a rather complex problem for me to resort to OOP or a substantial hourly wage. If it's big enough to require OOP then it's too big for this solo developer.

Nothing I do in PHP is complex or big enough to require OOP but OO principles do sneak into my problem solving in PHP, which is unavoidable. :wink:
Classes = organised, tight, efficent code
Discipline = organised, tight, efficent code

OOP is a very strict discipline.

Posted: Thu Mar 30, 2006 6:28 pm
by alex.barylski
I am not saying anything in regards to the subject, but I will say: That's a very thorough list you have to select from, good job!!! :)

Posted: Fri Mar 31, 2006 1:39 am
by shiznatix
I have recently (past few months) been doing OOP and I like it. It's easier to seperate your code and it makes sence. I just am not that good at it so ya...

Posted: Fri Mar 31, 2006 1:59 am
by patrikG
Martin Fowler writes code? ;)

Posted: Fri Mar 31, 2006 5:24 am
by Chris Corbyn
Way too many useful design patterns in OOP for me to not use it. It just "feels" right too.

For all that PHP did not natively support OOP I actually like the way it all works in PHP5... granted, namespaces would give it more of an edge.

I also use OOP in JavaScript and C++ (n00b level for me in C++) :)

Posted: Fri Mar 31, 2006 6:23 am
by dreamline
Well, i've started OOP about 5 months ago, before that I never saw the use of OOP, but now I can't do without. Makes things so much more structured... :)

So thumbs up for OOP, I wish I started using it 18 months ago.. :D

Posted: Fri Mar 31, 2006 11:20 am
by alex.barylski
Buddha443556 wrote:OOP was still an academic discussion when I start programming. Most of my OOP experience has been in C, C++ (C with Classes if your old enough to remember), Java and Perl. I have developed a healthy positive respect for OOP, OOD and OOA from my thirty years of experience. However, it takes a rather complex problem for me to resort to OOP or a substantial hourly wage. If it's big enough to require OOP then it's too big for this solo developer.

Nothing I do in PHP is complex or big enough to require OOP but OO principles do sneak into my problem solving in PHP, which is unavoidable. :wink:
Classes = organised, tight, efficent code
Discipline = organised, tight, efficent code

OOP is a very strict discipline.
OOP was still an academic discussion when I start programming
Old timer *coughs* :P

C with Classes if your old enough to remember
Well I'm 27 as of March 19th this year...and although I don't remember C++ being just C with classes, I've read in a few books (Thinking in C++ By: Bruce Eckel) that many hardcore C programmers, when making the transition to OOP with C++ have treated it that way.
my thirty years of experience
And here I thought, at least in the PHP community (being such a young language, easy to learn and appealing to a much wider audience) I would be a veteran - part of the reason I switched. :)

I started developing a long time ago...about 3/4 of my life has been spent learning langauges and technologies, but alas, I still don't hold a candle to your 30 years...

Booo...go back to your old school languages which were used to develop software on machines with vacume tubes and computer bugs looked like this:

Image

:P

I'm just kidding of course :)
Nothing I do in PHP is complex or big enough to require OOP
I thought that way to when I started in PHP...for me it was a C++ ego thing more than anything...I figured if it needs OOP I might as well do it in C++.

I've since changed my mind...and although PHP's object model is far from perfect - like really far...I still enjoy writing classes for scripts.

p.s-You wouldn't happen to be a member of the http://www.codeproject.com community would you? If you still develop in C++, especially in VC++ thats the ultimate resource and community, something 2 million members. Some amazing talent...I've been truely humbled by a few guys on there - either directly through argument (being proven wrong - which never happens :P ) or indirectly by reading an amazing article...

Cheers :)