Best way to write CMS from scratch

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
winux
Forum Newbie
Posts: 2
Joined: Sat May 29, 2010 3:22 pm

Best way to write CMS from scratch

Post by winux »

Hello,

I am currently learning enhanced php development and javascript. I have made few software before in C++, C# and PHP and now i would like to create my own CMS. To learn more, i would like to write it from scratch, without using any frameworks. But before i begin any work i would like to ask which way would be best:

- writing the core first (writing framework)
- or writing cms and implementing necessary features in framework on demand?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Best way to write CMS from scratch

Post by alex.barylski »

Depends on so many factors. What is your experience in working with web based frameworks? MVC is not quite the same as it is in desktop applications.

Focusing to much on frameworks will possibly result in bloated framework code and the same applies to application functionality. You will probably have a ton of cross cutting concerns between those two layers. Build in tandem but keeping in mind the distinct purpose of each. Keep them as loosely coupled as posisble (at a very minimum make sure the framework is NOT depedendent on the application code).

Cheers,
Alex
Cirdan
Forum Contributor
Posts: 144
Joined: Sat Nov 01, 2008 3:20 pm

Re: Best way to write CMS from scratch

Post by Cirdan »

I've spent the last year or so building my own CMS, and I built the framework as I needed it. This is the best way to do it. If you build the framework first without knowing what exactly you need...you end up either writing stuff that you don't need, or you write it in a way that is incompatible with how you want/need it to work.
Post Reply