Archive for category java

What is Silverlight Web 2.0?

I got talking to Fergal Breen of Irish Dev at demobar about an event that is talking place in Cineworld in Dublin on September the 27th. I have to admit, I did not know anything about Silverlight when Fergal mentioned it to me. Apparently Silverlight is Microsofts answer to Adobe’s Flash. We have been looking at Openlaszlo lately which is purely flash based flash and DHTML. It would be interesting to see Mircosofts take on this and what they have to offer.

Here is what Irish Dev has to say about the event:

In September, Martha Rotter, from the original Silverlight crew, invites you to witness how Silverlight can light up the web with Rich Interactive Applications.
Join her, free to learn how to use Silverlight at Ireland’s largest cinema complex. It’s Silverlight, on the silver screen. If you see one movie this year, skip it and join us instead. Next year, they’ll be attending your Silverlight RIA.

I hope to make it along so hopefully see you there if you are interested. Details are as follows:

Time 19.30
Date Thursday, September 27, 2007
Venue Cineworld Complex, Parnell Street, Dublin 1

For more details check out Irish Dev


Java Code Style and some Handy Plugins for Eclipse

Here are some handy plugins for Eclipse that I came across via an IBM Developerworks article by Paul Duvall.

CheckStyle: For coding standards
PMD's CPD: Enables discovering code duplication
Coverlipse: Measures code coverage
JDepend: Provides dependency analysis
Eclipse Metrics plugin: Effectively spots complexity

I have used the Checkstyle plugin for a few years now and found it extremely useful.  In a nutshell, checkstyle will check your code against coding standards and issue a warning if you code something that is not in the correct format.   This has always been a real bone of contention with fellow developers.  One developer I worked with in the past felt that everyone should be free to code in whatever style they prefer.  I would not agree with this at all.  It can lead to code that is very hard to maintain and read.  

With a plugin like Checkstyle you don't need "Code Police" checking the code and informing people that they are using the wrong style.  If you want to push it one step further you can set up your automatic build (We used Cruisecontrol in the past) to mark a build as broken when it comes across a Checkstyle error. This ensures that a code base is readable and maintainable.   Here is an example of bad coding style:

if (testBoolean) myNum++;

Many developers leave out the parenthesis as the compiler will not complain, this can often lead to confusion when you expect a line below to run when the statement is true but of course it won't because the myNum++ is going to run. The correct way to write this would be as follows:

if (testBoolean)

A new developer that comes across this code will know exactly what statement is run when the if statement is true. It is also possible to change the change the Checkstyle configuration for situations where a company has their own coding convention.

 I have not used the other plugins yet but have a look at the article for how to install them.  I am interested to see how good the code duplication plugin is.   I hate when I come across "Cut and paste" coding because someone is too lazy to abstract the functionality into a base class.


AJAX process definition on Client Side

I came across an interesting article by Masayuki Otoshi via Java World that discusses how to execute process definitions on the client side rather than the server side.  This can come into play when making AJAX calls.  As AJAX is Asynchronous, it is not possible to predict the order that your callback methods will be called in.  Masayuki uses J-SOFA (Java/JavaScript Services Orchestration for Actions) to overcome this.

I haven't come across J-SOFA before but it looks like it might be worth looking at for situations where the order of callback methods is important.

No Comments

See you for a Virtual Pint…..

I went along to the Dublin Java Meetup group last night.  It was a very interesting night which attracted some new members as well as the usual suspects, about 15 members in all.  The Dublin Java Meetup is always a good night where you can discuss any aspect of Java technologies (Or any technical topic at that.  For some reason Ruby on Rails has been discussed at every meetup for the last few months:) )

Whether your are an expert in a certain area and have lots to contribute or have heard of a topic and would like to know more, this is definitely the place to go.   Among the topics discussed last night was Java Kicks.  this is a Digg like service aimed at the Java community.  It is has only been launch recently but already has a very big following in the Java community. There was also some very interesting demos of Naked Objects. SOA's, Struts, Spring, Hibernate, AJAX, EJB3.0 and the Dublin Contract market were just a few of the other topics that were on offer.  

One other thing that was discussed was the Java developer community in Ireland, that are not able to make it to Dublin for the meetups. To overcome this we are organising a 'Virtual Pub' meetup.  More details to follow but at the moment it looks like it will be happen on 7.30 on the last Tuesday of the month.  The proposed topic for Tuesday the 25th of July is

'What technologies should I be learning in the next 12 months?'.

Hopefully it will be a good interactive session for all developers of the Java community.



BPEL, Java Developers take note….

I came across this interesting article by Matjaz B. Juric on how to integrate BPEL(Business Process Execution Language) into an SOA environment.
Juric discusses the core concepts involved with BPEL and why BPEL is so important.  He uses a business travel system as an example.

 Juric concludes by stating:

We have seen that BPEL is one of the most important cornerstones of SOA. It differs from common programming languages, such as Java, and is relatively easy to learn and use. Because BPEL has been designed specifically for definition of business processes, it provides good support for various specifics of business processes, such as support for long running transactions, compensation, event management, correlation, etc. BPEL is well suited for use with the Java EE platform, and many BPEL servers build on top of it. Java developers, particularly those who are involved in the development of enterprise applications and SOA, should therefore take a closer look at BPEL and start using the benefits it provides.

I have not used BPEL in any of the projects that I have been involved with but it certainly looks like something that should be seriously considered.

Does anybody have any Caveats from their experiences of using BPEL?  If so please leave a comment as I would be interested to hear any real world experiences.