Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-09-2013, 05:45 PM   PM User | #1
milanello72
New Coder

 
Join Date: Feb 2012
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
milanello72 is an unknown quantity at this point
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!
milanello72 is offline   Reply With Quote
Old 01-09-2013, 06:31 PM   PM User | #2
TFlan
New Coder

 
Join Date: Dec 2012
Location: USA
Posts: 82
Thanks: 3
Thanked 17 Times in 17 Posts
TFlan is an unknown quantity at this point
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
TFlan is offline   Reply With Quote
Old 01-09-2013, 06:36 PM   PM User | #3
milanello72
New Coder

 
Join Date: Feb 2012
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
milanello72 is an unknown quantity at this point
I know only php! Unfortunately...
milanello72 is offline   Reply With Quote
Old 01-09-2013, 08:31 PM   PM User | #4
TFlan
New Coder

 
Join Date: Dec 2012
Location: USA
Posts: 82
Thanks: 3
Thanked 17 Times in 17 Posts
TFlan is an unknown quantity at this point
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..
TFlan is offline   Reply With Quote
Old 01-09-2013, 09:24 PM   PM User | #5
elitis
Regular Coder

 
Join Date: Sep 2010
Posts: 319
Thanks: 9
Thanked 6 Times in 6 Posts
elitis is an unknown quantity at this point
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
elitis is offline   Reply With Quote
Old 01-09-2013, 09:37 PM   PM User | #6
TFlan
New Coder

 
Join Date: Dec 2012
Location: USA
Posts: 82
Thanks: 3
Thanked 17 Times in 17 Posts
TFlan is an unknown quantity at this point
Here, read this:

http://natureofcode.com/

It's completely free, a good read and a good place to start
TFlan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:12 AM.


Advertisement
Log in to turn off these ads.