Showing posts with label ioc. Show all posts
Showing posts with label ioc. Show all posts

Thursday, December 8, 2011

ARO - Doc Comment Parsing in PHP

Following the work on IoC (Inversion of Control), here I am again to present the second module of my project, ARO (At the Rate Of). ARO is a PHP Doc Comment parsing library useful for parsing the Annotations, descriptions, etc. from the Classes, Methods or Properties.

ARO uses PHP Reflection to get its job done. Well this library is again flexible and hence I thought I can release it as open source. Its hosted on GitHub (https://github.com/ashwanthkumar/aro-php). Feel free to fork or report an issue.

I tired my best to document it on the GitHub, so let me skip further details here.

Disclaimer: Reason I created this ARO is for using IoC effectively in the first place. Also there are many more advanced Doc Comment parsers in PHP. This module is just what I came up in around 5 hours.

Wednesday, December 7, 2011

IoC-PHP - My (little) Inversion of Control on PHP

After around 5 hours, I am happy to say I have completed my first module in my BlueIgnis project. It is the IoC (Inversion of Control) module. Now, I can dynamically Inject dependencies in my application as and when needed.

This is definetly not the first IoC implementation in PHP, but I just wanted to create one for my needs. After all its my project and I would like to code it from scratch (I can't believe I am saying this).

A note of caution: I am a newbie to the entire IoC thingy, I know very little or I just misunderstood the entire concept. So, I wanted to learn from the community. Hence I decided to release it as Open Source code so that people can have a look at it or may be even improve it further.

I currently don't bother much with the Licensing issues. If you like the code, or you think it can be improved further, please let me know.

For people who does not know what IoC is, have a look here.

Next step would be to achieve the Design Goals in IoC using Annotations support.

Link for the project - https://github.com/ashwanthkumar/ioc-php