Friday, September 30, 2005

Photos from a beautiful Calabria

A friend of mine has published a very nice photo set on Focus, an italian magazine.

The subject is a beautiful Calabria which I want to share with you .... here are some links:


http://www.focus.it/community/contr_new.asp?ID=10005


http://www.focus.it/community/contr_new.asp?ID=10009


http://www.focus.it/community/contr_new.asp?ID=10011


And my preferred one:



Take a look and if you want give them a vote!

Congratulations, Mario!

Thursday, September 29, 2005

An AJAX office suite

Yes, I say, everyone wants AJAX.

Yes, I say, AJAX usefulness in rich web application development is true: just in these days, for compatibility reasons, I turned off AJAX support from the web project I'm working on, which previously was AJAX-enabled, and I REALLY NOTICE the difference.

And yes, AJAX is very appealing for many developers (like me).

But my mind could never imagine this:



I'm a bit skeptical ... making an office suite is not a joke, in particular if you use javascript ... moreover, I have doubts also about its usefulness over standard office suites and pen drives for storing documents and bringing them around ... but may be interesting!

My best wishes to the development team (hoping will grown) .... have a good luck!

Tuesday, September 20, 2005

Unit testing DAO classes in the Spring Framework

One of the major claims of the Spring framework is its non-intrusiveness, which, among other things, permits to unit test all classes managed by the Spring container.

So, it is natural that I felt very surprised when yesterday my unit test failed two times while testing a DAO class, based on Hibernate and implemented with the HibernateDaoSupport class provided by Spring.

The first time, my unit test failed because I instantiated my DAO object directly through the no-arg constructor: no one set the Hibernate SessionFactory (normally injected by the Spring container), so this was the problem.
I solved the problem creating a SessionFactory into my unit test, and setting it into the DAO object, as I were the Spring container.

Big surprise, the unit test failed a second time, screaming for no TransactionManager found ... but there was no method for setting such a thing in the DAO object!

So, is the unit testability of Spring managed objects only valid for THAT objects NOT using DAO templates?

The answer is no, you can unit test also them.
In the case of Hibernate, simply create and set by yourself a SessionFactory, like said before, and avoid using Session objects directly into your DAO code.
Just use the template facilities, like the getHibernateTemplate().find(...) methods, or, if you must directly use Query or Criteria APIs, encapsulate the access to the Session in the HibernateCallback class provided by Spring, which automatically manages the session and its transactions.

More and more powerful, more and more lightweight.

Monday, September 19, 2005

Takk...



Simply beautiful.
No other words than these, because no human word can describe what art and creation are.

Friday, September 09, 2005

.... and come back.

There's always a come back, wherever you go you'll always end up coming back to same place, maybe this is our destiny, maybe this is our damnation, maybe our salvation.
It's like the sea ... what if the sea didn't come back towards earth?

So, this is my "come back".

I'm in Rome since Monday, but I've been very busy until today ...
First, my Linux box with Fedora Core 3 started going crazy .... maybe it wanted to stay on holiday? .... no, I must say this, maybe it didn't like some hazardous upgrades, but this is what I most like of Linux, having all the control ... even with the risk of messing up something.
So I had to reinstall Linux, in the form of SuSE Professional 9.3, restore my backups, recreate my development environment, and so on.
Then, I had to take a look at a lot of new mails and news (still in progress)....
And, last but not least, I had to realign myself with the interrupted work ....

Wow ..... very busy.
And I must say that, even if it still needs a lot of work for personalisation, my new SuSE Linux box looks very well and comfortable ..... take a look at this:



I have a lot of ideas and news that I want to share with you ..... as always, I hope to have the time for writing about them, too!

But I'll have.
I'll have.