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 6 of 6
  1. #1
    New Coder
    Join Date
    Feb 2012
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How could I begin OOP?

    Hello! I want to learn OOP (object oriented programming) and could you give me some advices? How could I begin?
    maybe some web links with interesting examples! Thank you very much!

  • #2
    New Coder
    Join Date
    Dec 2012
    Location
    USA
    Posts
    82
    Thanks
    3
    Thanked 17 Times in 17 Posts
    The secret is just knowing the syntax.

    That's all it is, just like every other language; once you know the proper syntax you can reverse engineer any script you come across and learn its' inner workings, manipulate them, and experiment, which is, in my personal opinion, the best and some what faster way to learn - as opposed to reading the manuals and trying to emulate what they have written.

    Do you have any experience and/or knowledge of any languages? That is the real question before anyone can accurately answer you

  • #3
    New Coder
    Join Date
    Feb 2012
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know only php! Unfortunately...

  • #4
    New Coder
    Join Date
    Dec 2012
    Location
    USA
    Posts
    82
    Thanks
    3
    Thanked 17 Times in 17 Posts
    When you say you only know PHP, you're really limiting yourself.

    PHP has it's own variation of a generally common syntax, as you've most likely experienced.

    Learning a language isn't knowing every little native function that exists, that is called memorizing - granted after prolonged use you will eventually know most of the native functions :P

    Learning a language is learning its' "grammar", its' syntax. If you know how PHP is written and operates, then you, potentially, know how to do anything!

    If you want to learn how to write a user login script, for example, I recommend surfing the internet and finding a barebones script without too many extra doodads, and take a detailed look at how it functions.

    You start at line 1 of index.php (or whatever the main file is) and dissect every line.

    PHP.net has great online documentation. First thing you will most likely notice is a 'session_start()' (still using the user login example) - if you didn't know what that does, you can easily search for the function within PHP.net and learn how it operates.

    Once you understand and are confident in that process, you can apply it to every PHP function you come across. As you explore these scripts you will start to learn how the language works.

    I highly recommending experimenting with these scripts you run into to further understand how they work.

    The great thing is is that no matter what script your dissecting, every other script is just a slight variation of that, manipulating the same data in just a different manner.

    You can apply this general method to pretty much any programming language
    Last edited by TFlan; 01-09-2013 at 08:33 PM.

  • #5
    Regular Coder
    Join Date
    Sep 2010
    Posts
    331
    Thanks
    9
    Thanked 6 Times in 6 Posts
    I'd check out youtube; I couldn't find more than 1 or two PHP OOP tutorials online when I was learning. And to the other poster, I wouldn't say he is "limiting yourself" by only knowing 1 language. Its like they say, "Jack of all trades, master of none".
    Coding is a challenge, get used to it
    Always remember to debug
    Try the guess & check method
    Break it down into simple steps

  • #6
    New Coder
    Join Date
    Dec 2012
    Location
    USA
    Posts
    82
    Thanks
    3
    Thanked 17 Times in 17 Posts
    Here, read this:

    http://natureofcode.com/

    It's completely free, a good read and a good place to start


  •  

    Posting Permissions

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