Jump to content

Application, CMS and public resources


johnny86

Recommended Posts

Hi,

 

I've been thinking of different kind of solutions for allowing users to edit and provide CSS, JS and images through a CMS. The application is built on a framework which isn't a public open source project. But it follows the traditions of a basic framework and implements HMVC. In the application folder I have modules which are loaded upon request. The framework and application is outside the public_html directory. Now I need some kind of a decent solution to organize public resources. Because when an admin opens up a CMS and goes to administrate a specific module I need to provide the opportunity to edit CSS / JS / Images specific to that module. One solution I've been playing with is to create resources directory for every module and load everything from there to be edited in the CMS. Now that would be a straight forward easy solution. Except for the fact that I need to copy those files to the public_html and I somehow have to tell the application where from it will find those resources when the website is requested.

 

I don't want to load all the CSS and JS from different files so I would like to create some kind of PHP script that will compile and cache the output and provide that for the client to reduce HTTP requests. For CSS / JS it would be one request each. That would also be very easy solution but for compiling the file I would need to load the whole framework and bootstrap the specific application to get hold of the paths that need to be compiled (not all modules are in use so I don't want to provide useless CSS / JS either)

 

Does someone have toughts on this matter? Should I create some kind of a repository in the middle of CMS / Application which both will use to load but only CMS will update? What would be the best approach?

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.