SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast stephenTMS's Avatar
    Join Date
    Jun 2006
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    To learn object oriented programming in php: when and where?

    So, I have been learning PHP for the past while, I feel like I am comfortable with most of the procedural language and want to move on.

    I was wondering when you think it is a good idea to start learning OOP for PHP? and where to learn it from?

    I am also reading about frameworks like cakePHP and codeigniter and wondering if it's best just to learn a framework or if OOP is still necessary?

    Thanks.

  2. #2
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    2 Thread(s)
    Hi stephenTMS,

    First off there are many really good coders that never use OOP, so you will not necessarily be a better programmer by learning OOP, and in fact, many people that use 'OOP style' rarely leverage the power of OOP so they may be better to use procedural programming.

    PHP has always been limited as a 'full' object oriented language compared to other languages; however don't be put off by this as your applications can still benefit from using OOP methodology. The main concepts for OOP are Abstraction, Encapsulation, Modularity, Poymorphism, Inheritance and Composition. Recently with the release of PHP 5.4 has improved on these OOP handlers.

    You would benefit by learning OOP; if you learn the proper OOP tenants then you will not be restricted to only using frameworks, or procedural programming techniques. However, you can at any time choose to use a framework or procedural programming should the situation that you face call for it. In addition, many other modern languages us OOP such as C++, C#, Javascript, and Java use OOP so if you ever learn to pick up a different language these skills can help do this more quickly.

    Start learning as soon as possible as it will help you decide what framework you want to use. When looking at a framework don't forget to also look at Symphony. As far as it goes Symphony has some of the best use of OOP programming under the hood - good to study how they do it.

    Frameworks have taken a lot of the 'thinking' out of it for programmers, but truly it is nice to not get limited just because you choose to use a framework for some of your projects.

    Regards,
    Steve
    ictus==""

  3. #3
    SitePoint Addict
    Join Date
    Apr 2011
    Posts
    266
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    From my experience, i started to learn OOP after I have learned to work with variables, constants, arrays and functions.
    Look on the net for "free php course", "php classes tutorial", and you'll find resources to learn.
    Free: Web Programming Courses HTML, CSS, Flash
    Web Programming: AJAX Course and PHP-MySQL Course video Lessons
    Good JavaScript and jQuery course for beginners


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
  •