Introducing an API-focused WWW PHP micro-framework
I've never felt comfortable working with various huge frameworks out there. I gave Zend a shot for about six months and since then have been mostly using Kohana. But personally I still find myself preferring the approach of 'micro-frameworks' (article here) that do a specific task and for everything else leave the things in developer hands. This means no bloated libraries and no heavy footprint.
As such I've been developing, writing and rewriting and refactoring a small framework that I've mystically named 'WWW Framework' for the better part of last six months.
It is open source (LGPL) and available at SourceForge: WWW Framework.
WWW is a PHP micro-framework that is built loosely on model-view-control architecture and factory method design pattern. It is made for web services, websites and info-systems and is built around a native API architecture, caching and smart resource management. WWW is a compact framework that does not include libraries and bloated features and is developed keeping lightweight speed and optimizations in mind.
Mercurial repository is available for developers who are interested in following the development.
It's still quite new and I intend to frequently post more tutorials and updates for the framework. I am sharing it here since some of you just might be interested if you are a likeminded developer and find this exactly to be what you've been looking for
There's not a lot to show 'visually', but I did add some interesting features such as dynamically loading images.
Basically any file in environment controlled by WWW Framework is loaded through an image handler which accepts various 'parameters'. So instead of PHP script type of solutions, the result is far more elegant.
And of course you can change these parameters around as you see fit.
There is only one real file stored in filesystem (/resources/chesspawns.jpg), but every request is cached separately. This can be used to dynamically load avatar pictures and other type of pictures without having to worry about design changes later on and if these design changes 'break' things. Nothing has to be 'regenerated' for that purpose. Server only stores what is needed and is as optimized about it as possible.
List of all newly added features is here:
New returned data types with additional processing, like ‘ini’ and ‘rss’ files
New configuration option for resource cache durations, dynamic resource loadings and limiters
Can now use deflate as an output compression type, together with Gzip
New Cleaner developer script for cleaning WWW created caches and temporary system files
Better support for clients that send no request headers
System now maintains image files as well and this includes support to dynamically resize and crop images per request
JS and CSS file compressions are now cached, increasing performance
It is also now possible to use image overrides from resources subfolder
Limiter now affects all requests, including static file requests
Logger now is categorized and is also used for tracking static file requests
New compatibility script for testing server and PHP setup
Restructured Index gateway and added request-type handlers for each resource type
Minifier class added and functionality implemented in both Resouce handler as well as for API requests
File paths and resource loading much improved
Limiter and Logger have now a more streamlined internal process
Index gateway now also supports IP based blacklists
Much better URL Map functionality which allows to set whether unsolved URL’s are allowed or not
Default View controller now uses unified resources