It's been a while but I entered a new internship so I'm back :P.
Lately everybody is creating his own Framework, no-one builds websites without them. So with our combined experience we should really know how to create a good framework by now.
Just starting of with something that looks like ZF from the start will only give problems in the end. Before you start creating a framework (or any big project) you have to plan things carefully. This was one of my biggest mistakes. I created a framework which works perfectly fine and stabile, but in the end I wanted it to work differently and even nicer.
My framework runs like this:
Client requests url: /news/32-mymessage.html
- Load Core
- Initialize a MySQL connection via a Factory->Singleton
- Initialize the main template, start a buffer
- Use reflection to search for a "news" module which uses the IModule interface
- Load the main() function from the module via reflection
- Get content - bla bla not interessting
- Get template via the core and print it with the earlier created content
- Close buffer and paste that in the main template
- Dump the result
This gives a quick example of my framework. I think this works fine, but you will see my problem in the next part: file structure
As you can see the modules and templates are seperate. I wanted this because I wanted to be able to change the complete layout by assigning a different template and not just the base. But it loses the possibility to just add a new block of functionality by just uploading a folder.
Basically I made this topic to exchange ideas about good structures frameworks for your website, so we can learn from eachother.
__________________ Nunchaku! Who doesn't like martial arts? =)