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!
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
I know only php! Unfortunately...
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
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".
Here, read this:
It's completely free, a good read and a good place to start
|All times are GMT +1. The time now is 05:15 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.