Mittwoch, 1. Oktober 2008

Getting rid of Spring IoC

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.

Donnerstag, 14. August 2008

Running resin 3.2.0

Today I came across the news that Resin3.2 was released. Probably these are old news but I just heard it today. Since I am a heavy user of resin for long time now I directly grabbed me a copy.
Installation was easy and I just copied the stuff from my old_resin/webapps directory to the new one. It started directly and there was not even one minor issue.
Then after some reading in the docs I figured out how easy it is to use the jmx remote support.
Only a few minutes later I was already monitoring my new resin with VisualVM.
Unfortunately the free version does not support heap dumps from remote machines. You need to buy the pro version for this.
Right now we are testing the new resin in our test environment to see if we should upgrade our livesite. Running a website that gets 2.5 million hits every month needs some extra caution.
First step was to upgrade my personal server and my open source projects that are hosted on it to see how it works.
Again I have to say that the resin server really rocks! Especially the hot deployment during development is the best.

Mittwoch, 2. Juli 2008

Why another web framework? - Because!

From time to time you see the same questions raising up over and over again.
It seems to be difficult for people to understand why there are so many web frameworks
available. Sometimes there is also the question why all these developers of the different
framework do not share their knowledge and build ONE common framework.

The answer is not that easy.

First of all developing such a framework is fun. If you are a passionate developer then this is a perfect weekend project. You can build something on a weekend that will get you started.

Second of course is that you learn something. Basically you learn how servlets/webapps work and you get a chance to dig deeper into it. If you are just a user of such a framework you will definitely miss this oportunity.

Third of course is a matter of personal taste. This only applies if you are also passionate about what you are doing. Most of the developers are just doing their job. They want to get the tasks done and get the projects finished and be home at 7pm. These kind of persons do not really care about special aspects.
If you do then you probably can answer the question above yourself.

Fourth there are always minor things that tickels you. One framework might be great but since it is using annotations and you hate annotations then this might be a "no go". Or they integrate hibernate you are in love with iBatis. Or they use JSF and you think this is complete crap. Or your framework emphasizes the use of callback methods and you just hate this approach.
There are so many things that might disturb you.

So why not start up your computer and start working on your own framework? Take all the pieces that you and leave out the things you hate.

The basic question still is if you really want to release it as open source and then read all this boring "Oh, yet another web framework" kind of crap when you anounce it on javalobby or whereever.
Just wait for "I love Spring! We ALL should use Spring" and then "NO Struts2! The best one". "I use wicket and I am happy. We ALL should use this one". "I spent 1,5 years learning Tapestry and know I understand why it rocks! By far the best one". Blablabla.....

Donnerstag, 26. Juni 2008

Getting started

For several years I was running my own blog. But actually for the last 1,5 years I did not paid any attention to blogging at all. Somehow my interest in blogging just recovered.
So now it is time to start a new blogging period. This time I will be using the famous blogger.com to run my blog. Mainly because I am tired of maintaining my home grown blog. Most of the time I was anyway working on the layout. Since I am by no means some kind of web developer I never got to a point where I was happy with my own layout.
Instead of spending endless hours working on HTML layouts I am now using a nice ready made blog.

Usually this blog will be about software development and Java in particular. Also I am running a few open source projects and will use the opportunity to write about it here.
I will try not only to rant about the Java land but also at least try to come up with some nice ideas.