Converting Legacy CMS to MVC System

125 views Asked by At

At work, we use a legacy CMS that uses physical files per webpage. The CMS uses ColdFusion as the server-side language. Pages are derived from templates, and you can create a template from a template. This actually allows for granularity in a nice way. However, I have seen that we could eliminate the need for page creation if we could have the pages themselves be database records, similar to what WordPress does.

Here are the constraints I have in trying to implement this... A page can have elements added to them on a local basis. So if we create page 1 using Template A, it inherits all of the elements of template A with all of the configurations of the template. But, on page 1, after it had been created, I could manually add an element to that page directly (with the CMS GUI) that would only reside on that page. The way I see it, if I try to implement an MVC framework for our CMS, then ANY time we want to add a local element to a page that will constitute the need for a new "page type". An element is either configured as "local data" and is tied to a page by a page ID, or is configured to be "global data" which renders the results of a query and is not necessarily only tied to the page that the element is currently on (it can be used by multiple pages).

This is a big question, and I tried to give the problem and scenario in the most concise way possible. I'm not looking for how to implement an MVC perse, but how to implement an MVC given the restraints of how our CMS's database works natively.

The other way I see of getting around this is in the new way to "create pages" in the MVC framework I create I could get around this by including the ability to add elements in a page record - if that makes sense.

Thoughts? Any advice or help is very much appreciated.

1

There are 1 answers

3
Adrian J. Moreno On

Why create a new application from scratch when there are so many modern CMS programs out there that either do what you want done have the ability for you to add the features you want through custom programming (usually a plugin system)?

Modern, MVC based CMS that run on ColdFusion:

Of course, Wordpress can probably also do what you want if you don't want to use ColdFusion anymore, but I'd suggest doing some investigation on these applications before you spend one minute trying to reinvent the wheel.