Results 1 to 9 of 9

Thread: Php oop

  1. #1
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default Php oop

    Hi, I've learnt a lot from this site and many others about PHP and although I know a bit of PHP I'm no where near a real programmer, but I'm just wondering, do I need to be fully competent at procedural programming before I delve into OOP? Or is it more like 2 paths, with OOP being easier and more efficient in the long run, while procedural programming is there for smaller projects?

    To summarise, is it better to be completely fluent in the procedural programming side of PHP before moving into OO or does it not matter?

    P.S - If anyone works developing sites with PHP for a company are you expected to know OOP or does it depend on what size the project is?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    OO is also procedural/imperative at its core. There's nothing stopping you learning both at the same time.

    I suspect that any serious company would expect a potential employee to be experienced in (i.e. have a good grasp of all aspects of) the language of development.
    Last edited by Twey; 02-07-2009 at 02:25 AM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Yup. I think you could learn both. Using classes is another way to program. You can program old and dirty - or clean and new(not really though..).
    Here's a tutorial about it that I learn from.
    Jeremy | jfein.net

  4. #4
    Join Date
    Jul 2008
    Posts
    199
    Thanks
    6
    Thanked 58 Times in 57 Posts

    Default

    Woah, I wrote that tutorial, but I do not recommend you learn from it. It is very outdated and was written when I just started to touch on object oriented programming.

    Hopefully someone will post a link to a better tutorial.

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Two things to note: 1) OO is only one way of tackling these problems, and it isn't automatically the best; and 2) any company that seriously cares about clean code probably isn't going to be using PHP anyway.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Sep 2008
    Location
    Bristol - UK
    Posts
    842
    Thanks
    32
    Thanked 132 Times in 131 Posts

    Default

    What would they use instead?

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Java and C# are big in the industry at the moment, but there are also notable instances of Ruby, Python, and some Common Lisp.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I think it's pretty common to see open source frameworks to be used now-a-days like Ruby on Rails, as well. That would be OO coding I guess, except the majority of the coding is already completed for you.
    - Mike

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Java and C# mandate OO, so any framework used will be OO-centric. Some Ruby, Python, and Lisp frameworks are OO-centric too, but others take a different approach (mostly functional or reflective).
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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