Is geolocation interesting information? Have you ever wanted to geolocate a blog? BlewSpace is a new Google Maps mashup which aims geolocating every blog out there. It might not be considered geolocation but georegistration, but in the end there's a map full of blogs so you can place yours. You can register your blogs for people to locate it. You can also categorize it, and even ping it (so I can't register other people blogs and say it's about crap).
It's still in early beta (2.0 fashion ;) ), and there's an interesting wishlist you can increase.
From a commercial point of view I think BlewSpace has some interesting potential, specially for bloggers meeting arrangement. When BlewSpace activates spatial querying you could list the blogs at your city, for example.
Geolocation makes Web 2.0 communities more tangible. They're not only groups of virtual avatars, but actual people, some of them living next to you.

Richfaces 3.1 RC6

Today, Richfaces 3.1 RC6 has been released. It's not the final, stable version (which was promised for 9/6), but at least you can finally visit Richfaces 3.1 Demos. This is a long awaited version for all of us who use this library because it finally includes a must-have: calendar component.

For those who doesn't know Richfaces, I'll just say it's an Ajax-powered JSF component library, just like ICEFaces. I tried both some months, and I chose Richfaces.

Main new features:

  • rich:calendar - until now, a reason to use ICEFaces instead of Ajax4JSF + RichFaces
  • rich:message and rich:messages, replacements for h:message and h:messages.
  • rich:tooltip
  • rich:scrollableDataTable
Last but not least, Ajax4JSF and Richfaces have merged. This is good for users (having a library is easier and more comfortable than having two), but it's important from a marketing point of view: they can now say Richfaces has 50+ components, so they can compete against ICEFaces in a numerical fashion. You know, I realize this is just marketing, but this kind of comparisons are important for newcomers.

First RichFaces application on Netbeans 6

As part of almost sadomasochistic effort vocational software developer have, I'm doing a brief introduction to developing with RichFaces, from new IDE installation until minimal working application. The aim is not doing a tutorial, neither howto nor step by step (if you're reading this I suppose you don't want anybody to tell you to press 'next').

I've recently installed Red Hat Developer Studio beta 1, but I think it's still interesting using Richfaces on other IDEs so you don't have to switch between environments.

1.- Download last version of NetBeans 6 M10.
2.- Download last builds of RichFaces and Ajax4JSF, including sources (it contains javadoc and allows you to debug). They're merging soon in one only project.

**I'm using unstable versions because I'm at home, don't tell your boss to do this if you don't want to be fired ;).

3.- During the 180MB download you'd take a look at Richfaces and Ajax4JSF developer guides.

4.- Launch installer. Just some notes during the installation:

  • Tell installer to configure Tomcat 6.
  • Change default passwords and ports and write them down.
5.- Open Netbeans and create a new Web project running on recently installed SJSAS 9. Activate JSF.
6.- Press F6 for running the server, deploying and opening a browser. It should show 'JavaServer Faces' inside an html H1 element.

7.- Untar RichFaces, which contains both Ajax4JSF and RichFaces.
8.- Create a new library with those jars and add it to the project: project properties --> libraries --> add --> manage --> new library. Add both binary jars and sources.
9.- Apply the needed changes for a Richfaces application: add web.xml configuration and richfaces taglib.
10.- Restart application server. During the boot you could say hello at Richfaces users forum. You're going to use it very much, and Richfaces developers have been infinitely patient with me :). I had never seen such a good support in an OpenSource project.

11.- Ooops, first error! NoClassDefFound because of absence of Commons Logging, del que depende. You must add the following libraries:
  • commons-logging (bundled with Netbeansincluída con NetBeans)
  • commons-digester (download)
  • commons-collections (download)
  • commons-beanutils (download)
12.- Restart the server and ¡voila!

Nothing spectacular, but it'a a beginning.

Red Hat Developer Studio first contact

I've been working on a relative small project for some months ago (more than a year). Since I began it on the Old Days it was done with Struts + Hibernate. Since then J2EE community has evolved very much, and there are some technologies that make my old fashioned design look old. More specifically, I want Ajax for my users.

I wanted to migrate it to a JSF + RichFaces + Seam + Hibernate arquitecture, but I wanted to wait until Red Hat Developer Studio was released, since it supports every technology I want to use. That day is finally here, and you can download Red Hat Developer Studio Beta 1. In this post I'll tell you about its installation and my first minutes with it (real time). This is neither a deep review of RHDS (can't be, yet) nor a study on Seam (same) or a J2EE for dummies guide. Hope somebody finds is interesting.

FYI, this is a 2GB Centrino laptop running Gentoo.

1.- Download Red Hat Developer Studio Beta 1 for Linux: ~530MB! It's huge!
2.- Launch installation: java -jar rhdevstudio-linux-gtk-1.0.0.beta1.jar.
3.- Follow instructions. 3 minutes long, no important notes. It creates a beautiful red icon in my desktop :).
4.- Clicking the beautiful icon leads to an instant beautiful crash (one of those eclipse crash dialog) on my system (java 1.5.0_12 by default). I don't know why, but specifying java path manually solves the problem: ./eclipse -vm /opt/sun-jdk-
5.- It begins with a migration (from JBoss Studio) wizard I can't take advantage of, so it gets closed after doing nothing. I suppose JBoss Studio users will appreciate it.

It looks exactly like you'd expect Eclipse look like after installing a bunch of plugins. RHDS perspective gives me a first joy: a RichFaces palette (no calendar yet, I'll have to wait). A quick look at "Manage Configuration" reveals it includes, among others, these plugins:

  • Dali (JPA).
  • EMF (Modeling).
  • JST (checked as it had problems, hope this doesn't turns severe).
  • WST.
  • Hibernate Tools.
  • JBoss stuff.
  • Shale tools.
  • Spring.
There are also some new (at least for me) perspectives probably interesting: jBPM PDL and JBoss AS. I'll go deeper on them other day.

My aim is starting a RichFaces + Seam + Hibernate (JPA) project from scratch. Theoretically this is the best IDE for this. Let's see if it succedes. From RHDS perspective:
1.- File --> New --> Seam Web Project.
2.- Add Java Persistence facet to the project.
3.- Create a database connection profile (mine's MySQL 5.0).

After a little browsing through views it gets slower and crashes ("double free or corruption"). I'll increase memory (eclipse.ini) and restart. Later it gets obvious that it's "Red Hat HTML Editor" (JSPs default one) which causes the problem. It's maybe related to a known issue at the FAQ. Nothing urgent, anyway.
Update: this problem has automagically vanished. I can use RHHE ok now, dunno why...

Project has a nice 'All JBoss Libraries' library which contains 50+ jars which will hopefully let me develop without worrying on jars (for a while at least). Something similar happens with 'Web App Libraries', which includes not only seam but also other must-have like facelets.

It has an error (red square). You can find the error at 'Problems' view: "no persistence.xml" file in project. That's wrong, since it's at src/META-INF. Well, let's deploy! Shift+Alt+X, R will run it on a server. Since it's not configured yet it asks me which. I choose bundled JBoss 4.2 and cross my fingers. Starting... crash! :-\ Sigh... Well... Something wrong with the database: "Apparently wrong driver class specified for URL: class: com.mysql.jdbc.Driver". It seems something doesn't like my mysql connector.

It finally got solved copying mysql connector at jboss-as/server/default/lib. First JBoss lesson learned. After that, the welcome page was accessible.

RH HTML Editor issue aside, RHDS seems promising. Is finally the time Java development meets Visual Whatever integration? Hope so...

Ave, Good Programmer!

Some days ago I was in a room with some developers. I was grumbling, as usual, on something (I can't remember what). As usual, my idea of throwing my salary away and building an enterprise came out again. Some of them thought I was joking, but I said my intention was hiring only the best developers available and paying them double salary of what they can find at the city. I, as I've said before (in Spanish yet), believe the difference between the best and the others is spectacular. I've just read another worthless post: 10 Developers for the Price of one.
If I just could get four of five of them, paying double salary (or even more!), there would be margin to make big money, at the same time they get a great payslip and a gratifying job...

Dreaming's free, I suppose...


Dilbert, actual as usual

JSF (A love and hate story, endless yet)

When I first met JSF I was having another relationship. I had been for 2 years with Struts. In the beginning it seemed to me (Struts) dull and thorny (I had just had a long affair with PHP), but when I met its parents Validator and Tiles, I fell in love. I was convinced by their configuration-files-for-everything approach, and its action-oriented workflow seemed to be a natural way to develop MVC.

In a travel I was presented JSF, and the first sight couldn't be more half-hearted. I felt I was doing just the same, and with worse tag libraries. Furthermore, it was not alone, but came with Spring and IBatis, so breaking the ice was even more difficult. Thinking on components and events? What for?

Suddenly, a third one came into my way and everything turned clearer: Ajax. Everything made sense. A text field would never ever be an empty box until somebody presses a button. Now, a text field deploys suggestions, connects to the server to asynchronously validate itself, activates and disables page fragments... And if you want to develop this the good way, JSF is a must.

This is the beautiful part of every love story, but every good thing has a catch: JSF is a very limited standard in term of components (and I am not the only one who says it). JSF is only a framework you can use as basement for something really interesting. It was born in 2004 as Sun fix to the gap at presentation layer at J2EE, but it was not only until Ajax when people has invested on it.

Implementations (MyFaces, Sun RI, Facelets...), frameworks (Ajax4JSF, ICEFaces, Tobago...) and component libraries (RichFaces, Tomahawk, jMaki...) promise a lot, but managing to make them work together is often annoying. Bad documentation, incompatibilities, the need for betas, sandboxes, nightshots...

Despite it, I think JSF is the best choice for MVC if you want Ajax. More specifically, (MyFaces + Tomahawk (a must)) + (Ajax4JSF + RichFaces (really powerful)). First ones give an stable enough and comprehensive base set, and latter, the full power of Ajax.

P.D.: MyFaces won't stop. They've recently delivered 1.2. In the wiki there's a good amount of JSF, MyFaces and even integration with other libraries.

P.D.2: interesting graph on Ajax for different technologies.

It comes from a J2EE Framework comparative, really up-to-date.

DRY: brief guide to keep you dry

Some years ago a Bachelor teacher told us there's enough with a few principles to explain most nature phenomena. Osmosis, conservation of energy and a few others can model most of the things we see.

I think it happens the same with computing. In spite of the huge amount of languages, libraries and platforms there are, the grounds which make them good tools are very similar. Maybe the most important among them is "DRY principle": Don't Repeat Yourself. Repeating implies more work (a good programmer should be lazy), duplicating errors, reducing code mantainability, making changes harder... Here it comes the great sentence: "Every time you copy-paste, Lord kills a kitten".

My work environment for the last years has been J2EE, and I use the following tools to keep me dry:

Hibernate: minimizes data access code.
Hibernate Validator: takes advantage of persistence specification to check form data correctness and shows user error messages. If you don't use Hibernate you should have a try on Commons Validator.

Templating and cutting up pages, whether Tiles (a must if you still use Struts) o Facelets (best reusing with JSF).

Intensive CSS for presentation. There's no good at "improving presentation with CSS". The best thing you can do is composing web pages structure with XHTML independently from presentation, delegating 99% to CSS (1% left is for IE hacking).

Ideas + Software Engineering

* Software developing blog.
* @author Juan Ignacio Sánchez Lara
* @version v0.00
* @since 070725
* @see
public class ISE extends Blog implements SoftwareDeveloping, J2EE {

//TODO: funny comment for first post.

//FIXME: missing funny jokes libraries