$Three3 Posted February 1, 2010 Share Posted February 1, 2010 Is learning and knowing about Object-Oriented Programming PHP worth my time in the sense that I will be able to do a lot more things that I cannot already do with PHP and SQL? I am just wondering because I am thinking about reading a book on just Object-Oriented Programming PHP and I want to know if it will be really beneficial to learn Object-Oriented Programming PHP or would it be more beneficial to learn another language like javascript. Thanks in advance for the advice and help. Quote Link to comment https://forums.phpfreaks.com/topic/190558-i-have-a-question-about-object-oriented-programming-php/ Share on other sites More sharing options...
JonnoTheDev Posted February 1, 2010 Share Posted February 1, 2010 Is learning and knowing about Object-Oriented Programming PHP worth my time in the sense that I will be able to do a lot more things that I cannot already do with PHP and SQL? No, you will not be able to do anything different. What you will be able to do is write code that is more efficient, easier to extend, easier to fit into other projects, easier to modify, used to create more complex and scalable systems. OOP is a concept. It is not specific to PHP. It is a style of programming so it does not matter what language you wish to use it with. The question you should ask is, would my projects be better off using OOP techniques, are they on the scale that would suit OOP. OOP practices take more time to implement, and you're not going to get it perfect all the time, trust me. If you're creating simple websites that may have a blog, some pictures, some comments, etc then a script written in a procedural fashion is more suited. It's quick to impement. On the other hand if you are creating the next facebook... (meaning a larger system that you will be modifying and adding functionality to) Learn Javascript if you think it will benefit your projects. I cant say if it is more beneficial than anything else, unless it is required for a job you are going for, or you need it for a project you are working on. When you say more beneficial, more benificial for what? Quote Link to comment https://forums.phpfreaks.com/topic/190558-i-have-a-question-about-object-oriented-programming-php/#findComment-1005079 Share on other sites More sharing options...
$Three3 Posted February 1, 2010 Author Share Posted February 1, 2010 Is learning and knowing about Object-Oriented Programming PHP worth my time in the sense that I will be able to do a lot more things that I cannot already do with PHP and SQL? No, you will not be able to do anything different. What you will be able to do is write code that is more efficient, easier to extend, easier to fit into other projects, easier to modify, used to create more complex and scalable systems. OOP is a concept. It is not specific to PHP. It is a style of programming so it does not matter what language you wish to use it with. The question you should ask is, would my projects be better off using OOP techniques, are they on the scale that would suit OOP. OOP practices take more time to implement, and you're not going to get it perfect all the time, trust me. If you're creating simple websites that may have a blog, some pictures, some comments, etc then a script written in a procedural fashion is more suited. It's quick to impement. On the other hand if you are creating the next facebook... (meaning a larger system that you will be modifying and adding functionality to) Learn Javascript if you think it will benefit your projects. I cant say if it is more beneficial than anything else, unless it is required for a job you are going for, or you need it for a project you are working on. When you say more beneficial, more benificial for what? Hey thanks for that reply that really cleared some things up for me. What I mean by beneficial is for mostly web programming. So should I learn OOP or somethng like JavaScript or Ajax? Thanks again for that helpful reply. Quote Link to comment https://forums.phpfreaks.com/topic/190558-i-have-a-question-about-object-oriented-programming-php/#findComment-1005096 Share on other sites More sharing options...
Mchl Posted February 1, 2010 Share Posted February 1, 2010 Why do you need learn one OR the other? Learn BOTH! OOP is hardly something you will grasp in its entirety after reading a single book. On the other hand JavaScript is object oriented language (not as much as Java, but a lot more than PHP), so you will be learning some OOP while learning JS/AJAX. Quote Link to comment https://forums.phpfreaks.com/topic/190558-i-have-a-question-about-object-oriented-programming-php/#findComment-1005103 Share on other sites More sharing options...
KevinM1 Posted February 1, 2010 Share Posted February 1, 2010 Why do you need learn one OR the other? Learn BOTH! OOP is hardly something you will grasp in its entirety after reading a single book. On the other hand JavaScript is object oriented language (not as much as Java, but a lot more than PHP), so you will be learning some OOP while learning JS/AJAX. Misnomer. Virtually everything in JavaScript is an object. The difference is that JavaScript uses prototypal inheritance rather than the traditional parent-child form of inheritance most popular languages use. For the OP - OOP is a programming methodology, a way of programming that many (including myself) feel make it easier to write flexible, maintainable code. You shouldn't look at it as a decision between OOP and JavaScript/Ajax. One is a way of programming, the others are technologies used in programming (Ajax is a bit of both, if you want to get pedantic). And, if you want to be taken seriously as a developer, you'll need to learn both. Quote Link to comment https://forums.phpfreaks.com/topic/190558-i-have-a-question-about-object-oriented-programming-php/#findComment-1005105 Share on other sites More sharing options...
$Three3 Posted February 1, 2010 Author Share Posted February 1, 2010 Why do you need learn one OR the other? Learn BOTH! OOP is hardly something you will grasp in its entirety after reading a single book. On the other hand JavaScript is object oriented language (not as much as Java, but a lot more than PHP), so you will be learning some OOP while learning JS/AJAX. Misnomer. Virtually everything in JavaScript is an object. The difference is that JavaScript uses prototypal inheritance rather than the traditional parent-child form of inheritance most popular languages use. For the OP - OOP is a programming methodology, a way of programming that many (including myself) feel make it easier to write flexible, maintainable code. You shouldn't look at it as a decision between OOP and JavaScript/Ajax. One is a way of programming, the others are technologies used in programming (Ajax is a bit of both, if you want to get pedantic). And, if you want to be taken seriously as a developer, you'll need to learn both. Hey thanks a lot for the reply. Ok I understand now that I should go ahead and learn both which in the end will be the most beneficial. One more question though. Which one should I try learning first? Thanks again Quote Link to comment https://forums.phpfreaks.com/topic/190558-i-have-a-question-about-object-oriented-programming-php/#findComment-1005133 Share on other sites More sharing options...
gizmola Posted February 1, 2010 Share Posted February 1, 2010 Is learning and knowing about Object-Oriented Programming PHP worth my time in the sense that I will be able to do a lot more things that I cannot already do with PHP and SQL? I am just wondering because I am thinking about reading a book on just Object-Oriented Programming PHP and I want to know if it will be really beneficial to learn Object-Oriented Programming PHP or would it be more beneficial to learn another language like javascript. Thanks in advance for the advice and help. As a web developer, javascript will be more beneficial in the near term. Quote Link to comment https://forums.phpfreaks.com/topic/190558-i-have-a-question-about-object-oriented-programming-php/#findComment-1005137 Share on other sites More sharing options...
Mchl Posted February 1, 2010 Share Posted February 1, 2010 As a web developer, javascript will be more beneficial in the near term. That is very likely to be true. Just learn some basics of OOP to understand terms like inheritance/method/property so that JavaScript syntax doesn't baffle you. Quote Link to comment https://forums.phpfreaks.com/topic/190558-i-have-a-question-about-object-oriented-programming-php/#findComment-1005147 Share on other sites More sharing options...
$Three3 Posted February 1, 2010 Author Share Posted February 1, 2010 As a web developer, javascript will be more beneficial in the near term. That is very likely to be true. Just learn some basics of OOP to understand terms like inheritance/method/property so that JavaScript syntax doesn't baffle you. Thanks again guys. I will definitely look into both of them and do what you all have said. Quote Link to comment https://forums.phpfreaks.com/topic/190558-i-have-a-question-about-object-oriented-programming-php/#findComment-1005155 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.