A Developers Perspective on Spring vs JavaEE

In Java community Spring vs JavaEE is a never ending debate. In such debates people form two groups consisting of evangelists, architects and hard core fans of one platform and debate endlessly. Those who participate in the debates may be architects who are responsible for platform selection. But what would developers think about this Spring vs JavaEE debate? I am a Java developer who uses both Spring and JavaEE and I am not part of Spring or JavaEE fan club.

Continue reading »

Keep The Code Clean: WatchDog & SpotTheBug Approach

Before going to discuss WatchDog & SpotTheBug Approach, let me give a brief context on what is the needs for this. Three months back I was asked to write core infrastructure code for our new application which uses all the latest and greatest technologies. I have written the infrastructure code and implemented 2 usecases to demonstrate which logic should go into which layer and the code looks good(atleast to me :-)).

Continue reading »

When to use RequestDispatcher.forward() and response.sendRedirect()?

Many people know about how RequestDispatcher.forward() and response.sendRedirect() works. RequestDispatcher.forward() is generally called Server side redirection and is used to forward to a resource within the same application. That resource could be a JSP or another Servlet. response.sendRedirect() is generally called as Client side redirection as it issues a new request from the browser. This method is used to redirect to another resource within the same application or to the resource in some other application running in the same web container or can redirect to any other resource running in someother web container.

Continue reading »