Thursday, April 23, 2009

Liferay and Eclipse

Holy Java Blog: "Developing portlets for Liferay in Eclipse In this blog I'd like to tell you how to use Eclipse with Liferay to develop portlets with the ability to change a class or a JSP in Eclipse and have that immediatelly reflected on the server (hot deployment)." A good look at Liferay and Eclipse.

Thursday, April 9, 2009

14 Days to Ubuntu 9.04 and counting

I have been using Xubuntu 9.04 Beta on an older laptop with much happiness. It is lightweight and snappier on the older hardware.

Thursday, April 2, 2009

Maven documentation

Whilst reading dzone, I came across an article, Five tips for successfully deploying Maven, that highlights some good ideas for working with maven. While all 5 ideas are worth the time to read, the 4th idea intrigued me most because I have always found the maven documentation difficult to find and navigate. Quoting the 4th idea:
4 Use the documentation Well, duh. But a weak point of Maven in the eyes of many people is the lack of documentation and the sometimes poorly organized information. There are a few good points of reference though, that you can spread around you team by setting up links on the Wiki for example:
  • The Definitive Guide to Maven: a free book from Sonatype, available both as HTML and PDF. Good for the beginner, and sometimes as a reference. If you don't know where to start, start here.
  • The plugin list: a comprehensive list to the official plugins, with links to each project page and JIRA subsection. Most of the core functionality is actually performed by one of these plugins, and you can learn a lot by studying things like the resources plugin documentation.
  • The POM reference: for the slightly more advanced user. Every element in the POM is explained. Don't forget to specify the XSD information in your POM file to get the most help from your XML editor.
These are 3 great links for maven documentation. I must admit I didn't even know about the first 2 and the 3 is great to have a link to as well. By getting a better understanding of how maven wants things to work, it is easier to work with it instead of against it.

Wednesday, April 1, 2009

jQuery - Simplified interaction with JavaScript

I hate JavaScript. Let there be no confusion about that. Every line of JavaScript adds another point of failure to my project. Even if it works in all browsers today, one can never be sure about tomorrow. I use it very sparingly. Today, one of my coworkers did a presentation on jQuery. He did a great job of presenting it. What really impressed me was the simplicity and of course the cross-browser support. The supported browsers as of today are: IE 6.0+, FF 2+, Safari 3.0+, Opera 9.0+, Chrome. While we still have some IE 5.0 customers out there, this is a confidence inspiring list. The basic usage is simple enough:
  1. Select one or more elements
  2. Perform some action on said elements.
Selecting elements is done with CSS selectors wrapped in a $() like $('input[type=text]') which will find all text fields. Of course, there can be $('#id') and $('.class') as well as more complex $('div div') which gives nested divs. Actions can be things like toggle, load and hover. Toggle changes from hidden to shown and back again. Load does an AJAX call and hover is an event handler for a mouse hover. There are lots of actions that can be performed and they are documented as well. His demo mostly focused on creating a JavaScript drop down list using jQuery. He did a good job of showing the benefits without going overboard. One of the great points was that by moving the javascript out of the tags, the web page would work quite well with JavaScript disabled. Of course there are other issues but this is a great one to overcome as it is important for customers to have a positive experience even in a non-JavaScript browser. Looking at the site it looks like there are also some interesting form validation options as well. Also of note, it is supported natively by Liferay. Definitely worth a look.