Monthly Archives: August 2005

WebWork decides to go FreeMarker

The sleeping giant WebWork is under heavy development for the next 2.2 version. In fact the first beta is out and can be found here: download WebWork 2.2-b1.
One of the important changes in the next version is the default usage of FreeMarker. This news raised my interest into this framework, so I have spent last night a few moments to see what it is offering.
A very important aspect Patrick pointed about FreeMarker is that the project is still under development, a new version being announced in June. The alternative Velocity doesn’t seem to be in the same state, so from the point of view of an evolving framework this is very important.

I have downloaded the last version 2.3.3 and defined the project under Eclipse. I have noticed that the distribution contains example applications so you should be able to find good references about the usage. It has also an Eclipse plugin, but I haven’t used it so far. A bad thing I have noticed is that the framework is still using some beta libraries, that where not updated to their more stable versions, and this took me a while to make the project compilable in Eclipse.

On the good side, FreeMarker online documentation is very good and covers almost all you need. The flow is very clean and after reading it, you can definitely start using it.

One of the main questions I had after finishing the documentation was how is it different from Velocity? The principles are quite the same and the usage looks very similar. I haven’t seen any big differences from the beginning, but the guys have probably figured this out and they are publishing a comparison here. Some small improvements over Velocity can be considered the built-ins and error handling mechanisms.

The single reason I wouldn’t use this template engine for web applications (the same applies to Velocity, and in a measure to JSP too) is that you are not able to use WYSIWYG editors with your pages. This will increase the time to design the site and will make things harder to customize it. I still believe that the winner in this direction are Tapestry and the growing Wicket (which, by the way, is next on my list [blink/]).

Update: WebWork is already supporting FreeMarker and Velocity, but changed its defaults to FreeMarker. I thought I should mention this for clarification.



Filed under Uncategorized

Database design times

I was reading some posts about the moment the database design should happen while “agile” developping a new application.
Firstly I was wondering how many applications are not using a database to store their state. But this is not the real question here. It is only related to the rest [blink/].
The discussion I have read pointed out that the development started just after the database design was done. For me this means that all the cards for the domain model where drawn (and probably some more interaction diagrams). So at this early point you have all your domain model object defined. Isn’t this bduf? What is the relation with agile (iterative) development?
Now the real question bugging my head: isn’t supposed to have the domain model evolve together with the rest of the system? While doing iterative development I expect to have some changes into my model. These changes will be reflected in the database on which I have already spent some time before. Than why spend doing the database design in a separate iteration?
My opinion is that database design should be done the same way the development is done: are you doing waterfall than design the database the same way. Are you doing iterative development? Than do the database development the same way.


Filed under personalog

IDE advantage (or Ruby experiences)

Listening to my friend Cedric advice and considering all the talks about RoR, a few months ago I have decided to start looking and reading about Ruby.
I haven’t done much scripting before and discovering this OO scripting language is an interesting experience. However, coming from the Java world, my expectations are different; and I am not speaking at the language level, but at the tools level.
Right from the beginning I was asking on Ruby mailing list which editors/IDEs are they using? How are they organizing/managing the sources? How is the maintainance gonna work?

Well, the first question has generated a lot of traffic, with the conclusion that you don’t need a specialized editor/IDE, just some coloring and folding and some tricks to fire irb it’s just enough. I have gonne further and asked what about big projects with thousand of sources? This almost started another flame which concluded with the fact that Ruby source code is much more less than Java code and again you don’t need an IDE for it. I tended to distrust these reasons, as I was remembering my early days with Java when doing small projects with vim was fun, but comming back after a few months was a killer, and I bought a license of Arachno Ruby. I did some research in advance and finally I have concluded that this is the kind of editor that is gonna help me out with Ruby going to the directions I liked.
Making the story short and coming back to nowadays, today I have installed a desktop wiki in Ruby: Socks. It is a very nice and small wiki offering a lot of features. However I have disliked one or two of its offerings and one that I was looking for (page tagging) was missing, so I decided it is the right moment to dig for the first time in Ruby.
The project is indeed small compaired with a Java project: 36 sources. The first bad sign for my playtime were the files with more than 1000 lines. Than immediately a question raised in my head: how am I suppose to find the source of a class/module definition? In my Eclipse IDE I have been pressing F3 for a couple of times and the navigation was done. But here? I have to use find and sed and grep, forgetting that I am on an Win machine (hint! hint! Lothar).
I will not make this entry any longer, but I finished by asking myself how can you really be more productive in Ruby? Maybe if you write all your code by your own and maintain it permanently. Otherwise I cannot see how using such a diversity of tools just to accomplish an easy task can make you more productive.

Disclaimer: I definitely don’t have the Ruby mindset yet. Hope to find it soon.

Update: a small update about Arachno Ruby: it has a Lookup Selection function that may help you while doing navigation. Thanks a lot Lothar.


Filed under Tools