Friday, July 27, 2007

Vim setup

Here is my Vim setup information for reference

in .vimrc or _vimrc, add at the beginning:
set langmenu=en_US.ISO_8859-1
set gfn=Bitstream_Vera_Sans_Mono:h9:cANSI
colorscheme oceandeep

First line is to avoid menus in French.
The font (you can find here) is simply the best programmer's font.
oceandeep mode can be found here .

Vim setup

Here is my Vim setup information for reference

in .vimrc or _vimrc, add at the beginning:
set langmenu=en_US.ISO_8859-1
set gfn=Bitstream_Vera_Sans_Mono:h9:cANSI
colorscheme oceandeep

First line is to avoid menus in French.
The font (you can find here) is simply the best programmer's font.
oceandeep mode can be found here .

Why Eclipse Is Better

Initially I adopted Eclipse instead of Emacs because it was more powerful to search code, and it allowed refactoring. I regularly tried other IDEs but always end up back to Eclipse, even though there has been less big improvements in Eclipse in the past years (but lots of small ones).

I just saw today that Eclipse allowed programmatic refactoring. Now that's something quite amazing, and I don't think other IDEs do that yet. Someone even had fun writing an Eclipse extension in Scala to add a particular kind of refactoring to Eclipse.

Why Eclipse Is Better

Initially I adopted Eclipse instead of Emacs because it was more powerful to search code, and it allowed refactoring. I regularly tried other IDEs but always end up back to Eclipse, even though there has been less big improvements in Eclipse in the past years (but lots of small ones).

I just saw today that Eclipse allowed programmatic refactoring. Now that's something quite amazing, and I don't think other IDEs do that yet. Someone even had fun writing an Eclipse extension in Scala to add a particular kind of refactoring to Eclipse.

Wednesday, July 11, 2007

Tapestry5 vs Wicket: 1 - 0

Getting started with Tapestry 5 is easier than with Wicket 1.3. Some readers will complain that it is again the view of someone who has no deep knowledge of either Tapestry or Wicket. But I think it is important for projects to be easily accessible to developers. Wicket seems to have more buzz around these days, and has a detailed wiki with plenty of useful information in it. But that's the problem I see with Wicket, it is not simple to do simple things, that is why there is so much information to do simple things in the Wicket wiki.

Granted my test was based on a specific case for component frameworks, I was not so much interested into statefulness, I wanted to display a bookmarkable "user page" with content coming from hibernate.This kind of behaviour is quite general in web applications, especially in web 2.0.

It was relatively easy to have the page working with Wicket, although I was disappointed at their hibernate integration. Hibernate integration in wicket means either using the full databinder project, or creating your own solution. I chose the later based on source code from databinder, but I actually rewrote everything in the end. I was disappointed that databinder, a specific Hibernate oriented framework did not really handle Hibernate sessions the simplest way possible. Tapestry5 got that right. To manage Hibernate sessions right, I had to dwelve into Wicket code as no documentation offers insight about inner workings of wicket. The code was too complex for my taste. In my short experience, I saw it seemed the developers are changing it to the better, removing some unnecessary abstractions.

In the end I got frustrated many times with Wicket, and did not manage to have a bookmarkable page the way I wanted. You can have a bookmarkable page, but after some action on the page, it would become unbookmarkable. Furthermore, the structure of the URL is not very flexible without yourself rewriting completely the bookmarkable page feature of Wicket.

With Tapestry5, I was at first worried about the small amount of documentation on the site, the use of maven in the tutorial. I was wrong, documentation proved to be exactly what I needed, and detailed enough. It is much easier to understand how Tapestry5 works after reading the doc than Wicket. Concepts in Tapestry5 are simpler and more powerful. Maven use is in the end not that big of a deal, I am still not as comfortable with it but I am productive enough that it is not an issue, much more productive than with Wicket. The standard tutorial setup is a very good one.

Doing a bookmarkable page was trivial, it also was easy to have the format i wanted, and it was kept after action in the location bar. Hibernate integration was trivial, since Tapestry5 provides the tapestry-hibernate module, a few classes that helps managing the session and transactions for you. The only drawback is maybe the yet another inversion control system to learn. Tapestry5 IoC is very near from Guice in its philosophy. I wish Guice was made the default for IoC in Tapestry5.

To conclude, there is no doubt about it, Tapestry5 is the winner.

Tapestry5 vs Wicket: 1 - 0

Getting started with Tapestry 5 is easier than with Wicket 1.3. Some readers will complain that it is again the view of someone who has no deep knowledge of either Tapestry or Wicket. But I think it is important for projects to be easily accessible to developers. Wicket seems to have more buzz around these days, and has a detailed wiki with plenty of useful information in it. But that's the problem I see with Wicket, it is not simple to do simple things, that is why there is so much information to do simple things in the Wicket wiki.

Granted my test was based on a specific case for component frameworks, I was not so much interested into statefulness, I wanted to display a bookmarkable "user page" with content coming from hibernate.This kind of behaviour is quite general in web applications, especially in web 2.0.

It was relatively easy to have the page working with Wicket, although I was disappointed at their hibernate integration. Hibernate integration in wicket means either using the full databinder project, or creating your own solution. I chose the later based on source code from databinder, but I actually rewrote everything in the end. I was disappointed that databinder, a specific Hibernate oriented framework did not really handle Hibernate sessions the simplest way possible. Tapestry5 got that right. To manage Hibernate sessions right, I had to dwelve into Wicket code as no documentation offers insight about inner workings of wicket. The code was too complex for my taste. In my short experience, I saw it seemed the developers are changing it to the better, removing some unnecessary abstractions.

In the end I got frustrated many times with Wicket, and did not manage to have a bookmarkable page the way I wanted. You can have a bookmarkable page, but after some action on the page, it would become unbookmarkable. Furthermore, the structure of the URL is not very flexible without yourself rewriting completely the bookmarkable page feature of Wicket.

With Tapestry5, I was at first worried about the small amount of documentation on the site, the use of maven in the tutorial. I was wrong, documentation proved to be exactly what I needed, and detailed enough. It is much easier to understand how Tapestry5 works after reading the doc than Wicket. Concepts in Tapestry5 are simpler and more powerful. Maven use is in the end not that big of a deal, I am still not as comfortable with it but I am productive enough that it is not an issue, much more productive than with Wicket. The standard tutorial setup is a very good one.

Doing a bookmarkable page was trivial, it also was easy to have the format i wanted, and it was kept after action in the location bar. Hibernate integration was trivial, since Tapestry5 provides the tapestry-hibernate module, a few classes that helps managing the session and transactions for you. The only drawback is maybe the yet another inversion control system to learn. Tapestry5 IoC is very near from Guice in its philosophy. I wish Guice was made the default for IoC in Tapestry5.

To conclude, there is no doubt about it, Tapestry5 is the winner.