SleekPHP Progress
Published Wednesday 21st of September 2011
SleekPHP is the new name for aFramework and it is as usual a complete rewrite with loads of improvements.

It builds on the same structure as aFramework where a Site can extend many other Sites and each Site consists of many Pages which each have many Modules.
One of the things I wanted to focus on with SleekPHP was to try and write better OOP. For example all of the previously mentioned components are now classes with handy functionality. Where before the aFramework-class would handle almost everything there are now 3 main classes that make up a page:
- SleekPHP - ties everything together and holds instances of DB, Router, User etc
- Site - represents a Site (a directory in the Sites/-directory along with a mandatory SiteName.info-file)
- Page - represents a Page (an .xml file in a Site's Pages/-directory)
I've been scratching my head quite frequently lately trying to figure out where each method should reside. For example, should it be Site->renderPage(pageName) or Page->render()? I think it's ok as it is now, and these things can quite easily be changed without having to change third party code afterwards.
I've also tried to focus a lot on keeping the core stuff really clean and properly commented and also try to move as much as possible to external modules and plug-ins.
Plug-ins is another new feature as well and all they really are are functions that run at a certain points in the execution of the framework. I've for example moved the HTML packing and debug logging to plug-ins instead of keeping them somewhere in core.
There's still a lot to be done but core is getting close to being "finished" and after that I'm gonna focus on getting sleekphp.com as well as mobile.sleekphp.com (SleekMobile) up and running. After that I need to convert andreaslagerkvist.com to the new code. Which is a massive project so it may take some time.
If you're interested in the code you can as always find it on Google code.
I'd start with the index.php file, then check out the SleekPHP class which should lead you to the Site class and finally the Page class.
There's a total of 15 files in core but some of them are almost empty at the moment. Almost all of the meat is done in the files mentioned above.
- Tags
- Comments
- No comments
Bookmark this Article