After reading all the posts about the new Springsource license I was thinking if choosing Spring IoC is the best idea. So I started looking for a replacement and started to check out Picocontainer. Actually I am aware of this project for a long time. But so far I never had any interest mainly of the developers whom attitude I really do not like. Is it really necessary to get religious about something so freaking simple? If using an IoC container really means a change of life for you then I feel sorry for you.
Anyway after looking at PicoContainer I was not impressed at all. Mainly because they have build something complex out of something so simple. If you are actually familiar with java reflection slightly then this looks like very much overengineered.
About 2 hours and six classes later I had build my own IoC container. Yet another lightweight (6 classes and no dependencies IS lightweight) IoC container. It supports getting the beans injected either by constructor or by setter method or both. Of course there is no XML involved! How do I hate the beans.xml from Spring.
It is not yet perfect but it does the job perfect. Right now I have removed the Spring stuff in jzwiki to mainly test my own implementation. jzwiki is making heavy use of IoC so it was the best proof of concept (better to say proof of code).
The move was quite painfull since it involved a lot of monkey work but when I was done it just felt good.
The main reason why I did it is because it was fun. Writing code that is simple and does the job is wonderful and makes my day (my developer day of course).
So, bye bye Spring. It was fun while it lasted but there is a point where it is over.
Probably we will meet again later.
Mittwoch, 1. Oktober 2008
Abonnieren
Kommentare (Atom)