Archive

Archive for February, 2012

Automated web app testing

I am writing about Selenium, a portable automated testing framework which allows you to write tests in a number of languages C#, Perl, PHP, Ruby and most interestingly Java. The API it provides is just a flat bundle of methods which are quite easy to use.

Selenium IDE (provides environment for selenium tests) allows you to record, edit, debug and play tests within Firefox browser. This could also be used in a normal administrative work (not just the tests).  Once you record the test you could export it as Java Test case which could be used in the automated tests.  If you would like to see it in action then follow these steps.

If you want to see how  to start with Selenium Web Driver then you can checkout a project from svn (../TeamJava/svn/muqeet/handsonselenium) . Once you download it you can run ‘mvn test’ (prerequisites are Maven, Firefox). The test tries to connect to kentor.se and changes the language to English with verification.

Having FireBug in Firefox or Developer debugger in IE(F12) helps a lot in writing Web driver tests.

Go GWT

Most of you might already know about GWT (Google Web Toolkit) and some might have already tried it. Those of you who tried it long back and said they did not like it, I can agree with them since it was not so mature and had no help in using it. After working in a GWT project I would like to share my experience. I will point out some straight forward pros-cons and how to do a demo project in no time. Read more…

What about JFokus 2012?

Just been to my first JFokus ever at Waterfront in Stockholm! A very rewarding, fun and great event! I met some old colleagues, had some enlightening conversations and drank a lot of coffee! With this post I aim to give an overall picture of how I felt about JFokus 2012. Later on, I intend to write a couple of more detailed posts about specific subjects that were covered on the event.

Read more…

Culture specific sorting in Java

How does one define a sorting order when working with multiple user languages? The sorted Set/Map does not follow the ASCII table and that’s why they can’t handle characters like å, ä, ö (it places ä before å).

If your application really cares about the sort order for different languages then one should use java Collator class. This does a locale specific sort, but before you sort you must set the Locale (fr_FR, sv_SE,…). You will find a lot of articles on this but the key words to search are Locale specifc sort/Culture specific sorting in java.

Choosing a Framework

I recently read this article and this article about how to choose an integration framework and/or when to write a custom solution in Java. The articles compare the alternatives and discuss the pros and cons on Spring Integration, Mule ESB and Apache Camel. Some of the criteria for comparison are:

  • Open source
  • Basic concepts / architecture
  • Testability
  • Deployment
  • Popularity
  • Commercial support
  • IDE-Support
  • Errorhandling
  • Monitoring
  • Enterprise readiness
  • Domain specific language (DSL)
  • Number of components for interfaces, technologies and protocols
  • Expandability

So a pretty extensive list. As I was reading the articles, I realized that I since I started with project and team management, I am not nearly as well versed as I used to be in all the details of the various Java frameworks available when building Enterprise applications in Java. There are also plenty of good Java developers out there who are very good at Java but who don’t have the experience of working with a plethora of frameworks.

This got me thinking in more general terms about how one chooses not only integration frameworks (as discussed in the above articles) but frameworks in general. When does one choose Struts and when does one choose Spring MVC? When should we use Spring Batch and when should we implement our own batch solution or use a DBMS based batched solution like SQL Server Integration Services? Is open source always best? Are the criteria above a good set of guidelines to follow when choosing any framework?

Follow

Get every new post delivered to your Inbox.

Join 228 other followers