Monday, January 26, 2009

Pinsor Python DI/IoC framework

Well we'll see where this goes, but I finally decided to give back to open source a bit (besides being an advocate and willing trainer for those interested).

Pinsor Google Code Project

There doesn't seem to be much demand for IoC in Python (in fact anger see comments), but there wasn't in the DotNet community for a long time. I believe the trick there was making IoC containers that people wanted to use for their language (read not 4000 lines of xml that you found in Java containers so often back then).

Hopefully, my aim here is to bring auto-dependency resolution and cut down lines of code in an app, everything else that people typically blab on about with IoC/DI is staggeringly less important.

This is an area where I fundamentally disagree with the most users of IoC frameworks who tend to pound DI DI DI and TESTABILTY. Dependency Injection in of itself is a concept that's so bloody simple you can get it in 5 minutes of working with any language if you just accept it (which is by far the hardest part), and not the important part.

The most imporant thing pinsor will aim to bring is less lines of code in moderately complex projects or greater, if it doesn't accomplish that then I'll be the first to delete it and remove it permanently. My focus will therefore be on making sure automatic dependency resolution and convention based configuration are fluid and easy to use.

As I refine the api and get a pythonic configuration DSL up I'll post examples and add to the docs. Till then you may use the unit tests (which are done with a bit of Behavior Driven Development style).

No comments: