28 Sep 2005

27 Sep 2005

Clean and neat

Yes sometimes Java can be neat and clean ;)
I was trying to extract a node value from an xml stored in a String, I made this little piece of code (and I like it). No tiedous try/catch handling, simple and clear (thanks JXPath):

public String extractNumberFromResponse(String responseBody) {
org.apache.commons.jxpath.xml.DOMParser parser = new DOMParser();
Object xml = parser.parseXML(new java.io.StringBufferInputStream(responseBody));
org.apache.commons.jxpath.JXPathContext context = JXPathContext.newContext(xml);

return (String)context.getValue("/my:jlogin/my:session");

22 Sep 2005

Forget DbVisualizer

Ok DbVis is nice because it does every database type.
But I wasn't easy to create a simple table with a primary key and an auto increment field.
Thanks to julien, I found MySql Query Browser only for MySQL (Download links for many OS)

It is so easy! I like it ;)

19 Sep 2005

Not as easy as it seems

I've been struggling with tomcat 5.5 under eclipse webtools for almost 1 or 2 hours:
  • moving jsp around
  • resarting tomcat
  • deleting parts of my workspace
  • deleting the whole workspace
  • recreating projects
and I'm fed up!

Things are not as easy at it seems.

It's like tomcat or eclipse keeps a cache of my jsp somewhere when I move them around!
Suppose I have /welcome.jsp, I move it to /pages/welcome.jsp ... http://.../welcome.jsp is still here ?!

It seems adding a parameter to [workspace]/Servers/Tomcat 5.5 Server @ localhost config/web.xml does the trick:
  • keepgenerated = false
But I not sure and I don't understand why...

16 Sep 2005


I'm trying DbVisualizer, its a nice little client for accessing databases.
Window installation went smoothly, cool!

Useful links:

Extreme Programming Explained: Embrace Change, 2nd Edition

Yes! Just got the 2nd edition of the "holy bible" of extreme programming.
I hope I won't be disepointed... see you in a few weeks for a review ;)

ISBN: 0321278658

15 Sep 2005

Font resizing in pixel

About 1 years ago, when fixing font size in px in css, changing letter size in IE wouldn't change anything...
I discovered that, under IE 6 SP2, it's no longer the case!
They must have changed this behavior in one of the SP x ?!
I can't find a link in google about it! (the best I can get is Standards and CSS in IE and W3C spec)

Now I can use px with no more accessibility problems :)

13 Sep 2005

Eclipse plugin for JSF

The eclipse foundation started a javaserver faces plugin.
It can be found on the eclipse site.
Too bad they are still at a draft stage, there is no update site available yet.

Eclipse update-site

Each time I'm looking for an eclipse plug-in, I try to find an update site to install and keep my plugins up-to-date...
So here's my favorite update-site list (I might add other in the futur):
  • hibernatetools - http://download.jboss.org/jbosside/hibernatetools/updates/development/
  • leipido - http://download.eclipse.org/technology/lepido/update-site/
  • rubyeclipse - http://rubyeclipse.sf.net/updatesite
  • tigris - subclipse - subversion - http://subclipse.tigris.org/update

Rediscovering webapp development

I just created a simple web application using eclipse web tools and tomcat.
It was so damn simple!! Why isn't it always like this!!!
I can modify components from eclipse and see the result in tomcat just by saving.
I trully envy .NET developpers with there integrated IDE.

I've been working the last 4 years on java web applications projects and it has never been simple.
  • Weblogic portal 4, I needed to modify jsp in the server repository directly using JEdit because my machine barely could launch this portal.
  • Weblogic 6.1 wasn't integrated correclty in wsad (at that time), using WTE could have solved this but my machine couldn't bare it either (more than 1 Go was necessary) and our production server were weblogic(s)
  • Even right now I'm using eclipse under windows but tomcat is located under FreeBSD on a development machine. I use samba to acces files!! (that's not simple!)

I might switch to .NET (just kidding;) )

8 Sep 2005


XPlanner is a web application to handle user story based developments.

I tested XPlanner because I'm currently trying to program in a user story centric way.
Installation didn't go as smoothly as daisy.
I had 2 problems:
  • source code didn't compile with 1.5 jdk because of enum keyword [see bug 1124530] - putting javac source="1.4" in ant solved this.
  • I had to change xplanner.properties with my root/password MySQL account (I don't like to leave my database password in clear in properties files)
At first, I found it a bit confusing, I didn't really catch the way to navigate in the web application. On top of every frame you can see:
Project | MyIteration | MyTask
It's the place were you are in the web site, I think it would have been clearer with something like:
Project > MyIteration > MyTask

You also need to configure a project in order to start using it... I find it a bit hard because of my lack of knowledge of a user story centric project and terminology.

An other problem was: I had hard time figuring how to add a person to a project, but I finally made it.

But XPlanner doesn't only have problems ;)
It seems quite simple (I like simplicity), you can get many metrics without additional efforts (your CEO will be happy!).
Every description can be entered in a twiki style, cool.
Simple http://.. links can be added to you're descriptions. Or you can create your own simplified protocols, example: bug:000[my link text] will point to the bugzilla page of this bug.
That a simple way to link xplanner to other systems.

In conclusion, I found XPlanner to be a good software but it seems a bit young, I think the few problems will be solve in the next releases. But it can already be used.

Daisy vs JSPWiki - The winner is...

In my previous post jspwiki against daisy, I decided I would take a look at daisy because of jspwiki's creator opinion of the product.

First despite the shiny title of this post: there is no winner, these are different products with totally different approaches.
Actually I don't really understand why Janne is so depressed about daisy?

JSPWiki is a really simple / easy to use wiki. Amongst other wiki(s) I tried, it's best one.
I tried Friki2.1 (lack basic features, left menu for example, bad search engine...), Ward's original wiki (not easy to read, lack features), mediawiki (too complex, allow to much customization of the presentation - table color etc... - mixed with data)
I know there are many others one but since I've always been happy with jspwiki and I know java/tomcat ... I didn't bother looking for an other one.
The cool thing about jspwiki is that it's simple and you get a basic wiki with almost no installation (tomcat + copy/past jspwiki.jar and you're done!)
Every time I needed an other feature, I always found the right plugin for jspwiki (blog in a jspwiki, index of pages etc...)

Now daisy is more complex and it has many other features.
Daisy is a full CMS system (yet an other one I would say), the installation is more complex but if you follow the step by step installation guide everything works fine.
After installing you will have at least 4 services running (MySQL, openjms, daisy wiki a webapp and daisy core).
Daisy can deal with subprojects, branches, documents revisions, languages, users, roles.
It has a WISIWYG editor, tons of options, a back office...
Just take a look at the full features list.

Keep in mind I didn't look for any particular feature to use, I just took a look at it.

Daisy is not what I'm looking for. I just want the simplest way to edit documents/notes and share them with other people on my project.
Daisy need to be installed, learned and administered on top of adding real documents.
People (including myself) won't update (lazyness/forget) documents if it's too complicate, if someone needs to validate documents or add privileges to the users before publishing.
Maybe for a corporate site where you'd better not print false information but for a project documentation, I think it's overkill.

Amongst the few things I would complain about daisy, is the necessity to know a document internal id to create a link to it. I think people will just add the http link instead of creating the internal uri using the document Id. (the path of least resistance)

Now you can see for yourself, you can have a live example with cocoondev.

update: an interesting opinion about jspwiki vs daisy.

7 Sep 2005

Fisrt or Last Name ?

As a french, I always get mixed up when it comes to entering first and last name in web sites forms!
So, as a reminder, I post this little text:
I hope this time I will remember it :/

5 Sep 2005

A new chat'blog

If you like: free cats, .NET, bordeaux... you might be interested in julien's blog.
If you're like me: you like dogs, Java and toulouse... you won't like his blog ;)
As my fellow dutch pal would say: goed geluk julien :) (http://babelfish.altavista.com)

CSS pragmatic guidelines

I was looking for this for a long time and I finally found it: a set of pragmatic guidelines to css (also translated in french).