Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    Sheffield, UK
    Posts
    552
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OOP - worth learning

    Can anyone quicly sum up the good and bad points of OOP, i'cve been coding PHP for ages but i've never really looked into it and i'm wondering if it's worth learning/using?

    Any links to relevant resources would be nice too

    TIA
    "To be successful in IT you don't need to know everything - just where to find it in under 30 seconds"

    (Me Me Me Me Me Me Me Me Me)

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OOP is basically a concept to structure and model your code. Some key features often mentionend are polymorphism, inheritence and encapsulation. So now I answered your question by introducing new keywords. But a short explanation what they mean can be found on "the" wiki:
    http://c2.com/cgi/wiki?ObjectOrientedProgramming

    An extensive list of links is this one:
    http://www.cetus-links.org/oo_infos.html

    I can only speak for myself, but by doing OOP, I find the code I produce much more thought out, and easier to reuse. Also easier to test and to debug. But the conceptual level on which you work with objects is significantly higher and more demanding than just hacking a procedural script together. You can learn the syntax of using objects in two weeks, but really doing good OOP with the required object-oriented analysis and design will take you much much longer.

    The hardest thing isn't actually the programming part, it's about the analysis, to find the objects your code actually should use, and to describe the communication between them. It takes a while until one has those "aha" effects and really understands an elegant solution of someone else.
    De gustibus non est disputandum.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •