Saturday, February 19, 2011

Debugging JUNIT maven test case


It will be very useful if you can test your JUNIT test cases when you are using Maven. Maven supports debugging with eclipse. Steps are as follows

1. Create a new debug configuration in eclipse as Remote Java Debugging on port 5005
2. Set break point on the required class files
3. Go to your project directory and execute the below command 'mvn test -Dmaven.surefire.debug=true' .The Test case will wait for a listener at 5005
4. Now go back to eclipse and start the debugger with the new debug configuration
There you go... Enjoy finding bugs and destroying them:)

Saturday, February 12, 2011

GWT-Google's way of web development

GWT stands for Google WebToolkit, it is a very good technology which allows you to develop your web site using POJO. If you are familiar with Java Swing and want to develop a website then GWT is the right tool for you. 

How does it work? GWT converts the Java code to JavaScript and HTML, that too optimized JavaScript. When you compile GWT application the toolkit generates multiple set of JavaScript and chooses the best JavaScript code. 

GWT can save a lot of maintenance time for web developers because the generated code is compatible with all major browsers. You wont have problems from customers like "The page does not work on Mozilla but works on IE8". Also you don't have to show the below message to your end users. "This website works best with IE8, some features may not work in other browsers"[This is an irritating message for me because I use ubuntu + Mozilla. Even ICICI website shows this message!!!]. Once my team had spent 45 days to make a JSP based website compatible with Mozilla and IE. Still we were having issues, and complaints from customer every day and the maintenance was a never ending process. End of the day customer was not happy too :(


As a developer, I like GWT because it allows you to organize GUI code very well. Code is more readable, maintainable and organized. Imagine each webpage is represented by a class file which can inherit another page and include another page and use all other Object oriented concepts. Obviously its far better than the cumbersome JSPs and few other technologies.

Its not over, you have the built-in AJAX support which allows you to develop your web site using AJAX. Its a very simple interface too.

Lols! What else you need? go for it...

Click here to go to the GWT home page

Tantrajnana

Tantrajnana means Technology in Sanskrit. Welcome you all to my technical sharings. I hope you will benefit from this blog.

            Santhosh Kumar Krishna