Do you OOP?

Discussion in 'PHP' started by IgoKov, Feb 3, 2007.

?

Do you OOP?

  1. Sure!

    14 vote(s)
    87.5%
  2. No, OOP sucks!

    2 vote(s)
    12.5%
  3. What is OOP anyway?

    0 vote(s)
    0.0%
  1. #1
    How many of you really coding in the OOP style? :)

    About OOP: http://en.wikipedia.org/wiki/Object-oriented_programming
     
    IgoKov, Feb 3, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    I do.


    ............
     
    nico_swd, Feb 3, 2007 IP
  3. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I do, though it all depends.

    If I'm adding functionality to an already existing codebase, I *generally* do what the previous coders have done: if they don't do OO, neither do I.

    So I guess my answer is 'sometimes, sometimes not...'.
     
    TwistMyArm, Feb 3, 2007 IP
  4. pixel_perfect

    pixel_perfect Banned

    Messages:
    238
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i do structure programing... oop nah.. . i know oop did durring hons...
     
    pixel_perfect, Feb 3, 2007 IP
  5. gemini181

    gemini181 Well-Known Member

    Messages:
    2,883
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    155
    #5
    I'm just learning to write code, so I will learn it from the start.
    The evolution of PHP is awsome :)
     
    gemini181, Feb 3, 2007 IP
  6. chopsticks

    chopsticks Active Member

    Messages:
    565
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #6
    I do aswell, although I have only really been using it for the past 2-3 months so i'm still learning.
     
    chopsticks, Feb 3, 2007 IP
  7. Psychotomus1

    Psychotomus1 Banned

    Messages:
    411
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    depends upon the project.
     
    Psychotomus1, Feb 3, 2007 IP
  8. gemini181

    gemini181 Well-Known Member

    Messages:
    2,883
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    155
    #8
    I have a slight clue about the concept.
    Could someone give a "OOP 101", and tell us something about the basic 'objects'?

    Thanks
     
    gemini181, Feb 3, 2007 IP
  9. MattD

    MattD Peon

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Objects are an instance of a class - think of a cookie cutter as your class, and the cookies you cut out as the objects.

    Personally I dont generally use OO techniques in PHP as I dont see the point!

    I obviously use OO for real programming where there are benefits for using OO, but I haven't found a convincing use case for OO in PHP projects. OO in ASP.NET and JSP - sure that makes sense; but PHP is just such a quick-and-dirty (and damn slow!) tool with minimal back end integration.
     
    MattD, Feb 3, 2007 IP
  10. Nikolas

    Nikolas Well-Known Member

    Messages:
    1,022
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    150
    #10
    MattD I think you are totally wrong.

    Php (5.x +) is really OOP and OOP is really important and useful when you are coding serious web applications.

    I use OOP for most of my projects, and I think it is better than procedural programming as it keeps the code more organized and easier to develop - extend an application with less bugs :)
     
    Nikolas, Feb 3, 2007 IP
  11. MattD

    MattD Peon

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #11
    The trouble is, I dont think PHP is ready for "serious" web applications yet - if nothing else there is very little interopability with back-end stuff like you get with .net or jsp/j2ee.

    The only way I see OO of being of use in php is for some simple classes for dealing with changing database engines that you can swap in and out, but its not like you cant do similar things with copy-paste at the moment :) Maybe some sort of system for dealing with the domain classes too I suppose.

    Basically I cant see OO being of much significant use when all you are doing is taking values out of a database and showing them on a page.
     
    MattD, Feb 3, 2007 IP
  12. Nikolas

    Nikolas Well-Known Member

    Messages:
    1,022
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    150
    #12
    Looks like we have a debate here :)

    Php has no native oop implementations yet, but there are plenty of php classes to integrate DB and many OOP frameworks.

    I understand the way you see things as a .NET developer (I was one too) but the fact with php is that you get what the manual sais. Not the "hidden" bug that only a guru can tell you on a forum like this (or a bug you find after hours of playing around)

    In any case I agree that php has a lot of things to do regarding OOP, but still OOP can be helpful in most cases.
     
    Nikolas, Feb 3, 2007 IP