» Portfolio » Web development
Blockz web framework
Blockz Framework is a project I’ve started after writing the J4 Essays posts in this site.
It’s basically a multi-layer RAD PHP Web Framework, and an Open-Source project, developed as an hobby.
Why another framework?
Two reasons lead me to start developing this project.
The main one, is that being mainly a back-end developer, developing under NDAs (Non-Disclosure Agreement), is not easy to provide code references to 3rd parties. An Open-Sourced solution seamed to be the right way to do it.
The second one, was relevant to the J4 Essay posts directly. I was curious to find out, how easy or difficult could it be to develop a fully capable a MVC capable PHP Web Framework from scratch.
One thing is providing solutions you know that can work, another all together, is to prove that the provided solutions do actually work. You can find the original text here.
The project’s philosophy, is to have two different layers (products?), that can be maintained separately (distinct release cycles), but work together to form a MVC enabled PHP RAD Framework.
First layer will deal with the following:
- Request & Response
- HTTP layer
- Session handling
- Cookie handling
- Command Line Interface
- Extension loading and management
- MVC handling (single component)
- Routing (basic/default)
- Library import
- Multiple entry points (several application in same solution)
The main objective, is to have an initial (core) layer that relies only on the file system for all it’s functionality, therefore, making it fully database independent. Most of its core system objects should also be expandable and/or replaceable, in order to avoid any system’s code customisation for a specific solution.
The second layer will deal with UI related functionality, and will sit on top of the first layer, expanding it, and therefore broadening the hole framework in the process.
This layer would be dependant on a database, and amongst its main responsibilities would be:
- User management & ACL
- Form validation
- Internationalization (multi-language)
This second layer would expand the first one, but could easily also be completely replaced.
If you’d need to develop a complete Web Application, you could use both of the layers together, but if you would only need to develop an API, you would only need to use the first one.
Any product developed on top of this framework, should only be seen as a Distro, just like in the Linux universe. A product would only be the sum of one or two of these layers, and all the extensions that are part it.
The core principal, is the separation of concerns for the two initial layers, keeping the previously explained schema intact.
The Framework should also provide helper classes to communicate to every part of the system, but leave UI functionality to extensions, only if needed.
PSR’s and, SOLID and DRY principals should be followed as much as possible, to keep the code as cleaned as possible. Minimize the use of Standard Classes and Arrays as method parameters and/or returned types.
Code should be fully documented. Developers shouldn’t hardly need any external documentation to fully understand the system.
But the main principle that wraps all others, is that the framework should be easy to develop on, and easily understood by any developer working on top of it.
As said previously, and at this point, the project is perceived as an hobby, and therefore, doesn’t have a release date, nor it has any market pretensions.
The main initial goal is to develop it to a point where it can support a solution development on top of it. One example could be a CMS.
Another goal, is to try to maintain the maximum amount of initial principles immutable while the project grows.
The project can be found here in Github, and is obviously opened to contributions.