Jump to content

Coming back to PHP, should I use OOP or sequential?


Catfish

Recommended Posts

Hi everyone reading this,

 

I have used PHP before as a hobby programmer but recently my boss asked me to make a webpage to accept worker's hours and store them in a database. So I realize that in the last few years object oriented style has been added into PHP. I have learnt OOP (C++) about a decade ago and understand the fundamentals of it.

 

If I am writing this website code, am I going to be better off spending the time to get familiar with the new OOP stuff in PHP and use that or would it be better to just use an old sequential style of programming? I know this may seem like apples and oranges and that it varies based on opinion, but maybe there can be reasons for me to use OOP over sequential.

 

For instance, if I write this code to be flexible enough that I can do a basic "worker times" table first, then I might be able to add additional functionality later, like worker details and qualifications, all of which could be brought up with the click of a button. Will it generally be easier to add onto code using OOP?

Link to comment
Share on other sites

Firstly, it's procedural, not sequential.

 

If you already know OOP you should understand the benefits.

 

my boss asked me to make a webpage to accept worker's hours and store them in a database

 

Something that simple will not likely benefit a great deal from using OOP.

Link to comment
Share on other sites

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.