brightball
brightball

Reputation: 933

Is there a way to convert framework based PHP code into individual PHP files?

Was looking over some old framework based PHP code and there are several parts of it that could be made to run significantly faster bypassing most of the framework and optimizing an individual .php file for the request. This got me thinking that it would also be a good way to take an existing "monolith" project and separate out individual pieces that may need to scale.

I'm fully aware that this is an impractical to the point of backwards way of looking at things, so just think of it as a way of generating dynamic cache files.

Just wondering if there's anything out there that can do something like this?

Upvotes: 0

Views: 79

Answers (1)

Chaoley
Chaoley

Reputation: 1302

I've done something like this with both Magento and Wordpress frameworks, and a Magento/Wordpress integration. It's mainly a matter of finding the database queries produced by the front end of the framework and including them in your custom PHP scripts as you like.

The big advantage of this is you can still use the admin side of the framework to manage the content of the database, then display it on the front end without all the overhead and caching normally required due to the code bloat of these types of frameworks.

I've seen talk recently of a Wordpress API under development which should do something similar, I hope anyway.

Upvotes: 1

Related Questions