Archives for July 2008
You are currently browsing 1 article(s) published in July 2008, please try the search if you can't fint what you're looking for.
aFramework version 3
Friday, July 25, 2008
The reason I've been so ridiculously quiet the last few weeks is because I've been working on version 3 of my framework, aFramework. The one that the blogging-software exscale.se runs on.
Version 3 will include loads of new features and enhancements but still be focused on making things as simple and logical as possible to both the user and the developer.
I've set up a new category for aFramework-related articles and I'm going to start documenting a lot more there.
Some of the things you can look forward to in version 3 include:
- Super-simple yet powerful routing allows for complete URL-restructuring with the change of one line of code. Also works without MOD_REWRITE and from any sub-directory.
- Even more powerful CSS constants and variables. Auto-prefixing of selectors for module and controller CSS-files. Caching!
- Cached modules.
- All sites now also have the ability to inherit from any number of parent sites. This means that if you want to set up your own web-shop/blog you can simply create a MySite that extends aBlog and aWebShop as well as aFramework and URLs, controllers, modules, styles and scripts will be merged into one. If you're happy with just a blog you can download a release of aBlog or you could check out the svn repo, create MyBlog and extend aBlog from it. That way you can make changes to the blog without having to touch aBlog's source-code.
- Version 3 includes a new feature that allows you to include additional template-code before or after a module's template simply by creating a BeforeModule.tpl.php or AfterModule.tpl.php
- Nicer debugging with loads more information.
The biggest things are really the routing (which I think turned out pretty nice) and the whole new site inheritance-thing.
The way it works is that you specify a SITE_HIERARCHY constant on site-level that tells aFramework which sites your site is built from. The value of the constant is a space-separated string of site-names starting with the one with highest priority and could look something like: 'MySite aBlog aWebShop aFramework'.
Now, every time aFramework requests a controller, or a module-class, or a stylesheet, or a template-file, or a route (etc) it starts by looking in the site highest in the hierarchy and works its way down.
This way you can create totally customized sites without writing more than a couple of lines of code.
Using the BeforeTemplate.tpl.php and AfterTemplate.tpl.php files you can easily customize default modules to your liking. If you want to override the entire module-template simply create a file by the same name.
That's what's been keeping me quiet (and off sleep). There's no deadline for v3 but I've actually set up a sprint backlog which should be finished in a couple of weeks so maybe something to show then.
Stay tuned.
- Comments are off
- Filed under aFramework, Development





