Jump to content

Page size


Go to solution Solved by gizmola,

Recommended Posts

  • Solution

Personally, I would have used an MVC framework so that I'd have separation of routing from Models/DAOs and Views/Templates/Markup.   I'd most likely have some "services" and would be making use of quality component libraries whenever possible.  Everything I create would be implemented in a way consistent with Dependency Injection, which would allow for use of a Dependency Injection Container.  I prefer Symfony, so if it's my choice that is what I'd start with, which is going to dictate basic structure, and have a front controller pattern implementation.

What you've done could be broken up into pieces and ported into an MVC framework, which would also help you see where you have reinvented the wheel, and you might also find that that framework has capabilities that could be handle some things you are doing in a more robust or elegant fashion.   

I also tend to make use of PHP Oop and if you do have classes stuffed inside your one giant script, then that's a dubious practice.  

While there is no fast rule on this, given PHP's page scope you are clearly having to load lots of unused code for every page request, but I don't want to overstate what currently even at 1500 lines of code, is not by any means overly large.  

Link to comment
https://forums.phpfreaks.com/topic/329952-page-size/#findComment-1657466
Share on other sites

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.