Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3431820
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:22:25+00:00 2026-05-18T07:22:25+00:00

I have a php application that has about 50-55 code files. The file that

  • 0

I have a php application that has about 50-55 code files. The file that has the maximum amount of code has about 1200 lines of code(this includes the spaces, tabs and multiple line breaks…) and rest of the code files are relatively smaller than this.

The application code in almost every file is a mix of html, sql and php(what you call spaghetti), except in a few files that are pure php include files….for example a file containing functions that are needed in many other places.

I have been considering whether it’s a good idea to refactor this application to a mvc type architecture.

Now i know that a mvc application offers plenty of advantages like ease of maintenance, reuse and ease of further development etc but what about scalability and performance – specifically in this case ?

My assumption is that since this is a small application(i believe so, do you think it’s small enough?), i don’t envision having a hard time with maintenance or adding a few more features(at the max) which just may mean a few additions in existing files or maybe say addition of a maximum 5-10 new files.

So i am thinking i shouldn’t be converting to mvc just for maintenance sake.

As far as i understand you may put each component of mvc on a separate server to spread the load so as to have a different server serving html, database and logic and do other optimization/caching further as well to make a hich is mvc application scale and perform.

I think even though in a small spaghetti application we cannot have different servers for html, database etc we can easily scale without degrading the performance by having a load balancer in front of web servers, databae server etc.(Supposing it comes to a situation where one server is not enough)

Even more so on it’s own the spaghetti code should perform better than mvc, since it doesn’t have any overheads like requiring includes or files or function calls from files placed under folders belonging to a different component of the mvc.

So, considering all these things do you really think it’s useful to refactor a relatively small spaghetti application to mvc for scalability and performance?

Please don’t tell me that refactoring will be useful in future (i know that will help and will consider if we really need to add much more code to the existing code base) but please provide me with a clear answer to

1)Do i really need to convert this application to a mvc architecture for scalability and performance ?

2)Can a spaghetti application like this scale and perform for atleast a minimum of 1 million request a day and half of which occur during some peak time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:22:25+00:00Added an answer on May 18, 2026 at 7:22 am

    As far as i understand you may put each component of mvc on a separate server to spread the load

    I’ve never heard that myself – but I come from a .Net world where you’d run all your managed code on the same server anyway (it’s not like in the Java world where you often have a separate “App” server and “Web” server).

    The main reason you’d probably move to MVC (just as you mentioned) is for benefits in managing the code: separation of concerns, re-use, etc; not performance.

    In theory you could do this with object / component based technologies like Java or .Net where the components communicate with each other – but in procedural code? i don’t think so!

    So, considering all these things do you really think it’s useful to refactor a relatively small spaghetti application to mvc for scalability and performance?

    No – assuming by scalability and performance you’re refering to runtime qualities of the system, which I believe is what you meant.

    If you put scalability and performance purely into the context of development (people coding – how fast and easily they can work on the system, how easily you can add developers to the project) then the answer would be yes.

    2)Can a spaghetti application like this scale and perform for atleast a minimum of 1 million request a day and half of which occur during some peak time?

    Nothings impossible – I love Gordons comments along those lines – but as I’m sure you’d agree, it’s probably not the best footing you could be on.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP application that displays a list of options to a user.
I have a PHP application that will on occasion have to handle URLs where
I have a PHP application that makes extensive use of Javascript on the client
I have a PHP web application on an intranet that can extract the IP
I have a small AJAX application, written in PHP that I did not secure
I have a Php application using stream_socket_client(), to get data through tcp from a
I have a PHP application and a need to generate a PDF with the
I have a PHP web application which uses a MySQL database for object tagging,
I have inherited an old crusty PHP application , and I'd like to refactor
In a PHP application I am writing, I would like to have users enter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.