Jump to content

I Have a Question About Object-Oriented Programming PHP


Recommended Posts

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.

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?

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.

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.

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.

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

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.

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.