Jump to content

Code Organization


eldan88
Go to solution Solved by hansford,

Recommended Posts

Hey Guys. My current web application contains functions file that has about 56 user defined functions.

 

As my application grew my developer kept adding new functions to the functions.php file with out grouping them into the theme.( I didn't want to use OOP since I wasn't to familiar with it back then, as I am familiar with it now)

 

Fortunately  my web application is not giving me technical  problems.However, I am worried that as the application grows even more it might cause a problem in the future, and with 56 functions being loaded on different pages might cause the web pages to load slower.

 

Do you guys think its necessary to group these functions into different files. Or should I leave the way it is and started grouping new functions into different files, and perhaps use OOP?

 

The web application is fairly small but is contains a lot of users. Maybe 50 PHP files all together.

Edited by eldan88
Link to comment
Share on other sites

  • Solution

I assume you're using WordPress. IMO - I would just let that file grow as needed. However, on the functions.php page you could group similar functions together and place a text header at the top of each section so you can quickly drill down to each section performing a search for the header text.

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.