24 Jan 2009, 5:47am
work:
by toni

leave a comment

Mavenized

It’s almost two months now that I use Maven every day, I have to say that it helped me a lot, I’m much more productive. 

There are, indeed things that I don’t like and problems but the dependency management is really sweet, the project setup too, with the archetypes. 

Some good links to start if you’re still not mavenized: 

I still get annoyed sometimes, with the xml, with some weird repositories publishing strange versions, or just with Log4J for example, depending on libraries not available on any repository, but hey, Maven downloaded for me, only once, only in one place hundreds of jar, I’ll really never do that job again by myself.

19 Nov 2008, 12:35pm
work:
by toni

4 comments

Waffles are good, do you fancy a Waffle?

During ThoughtWorks University XI we took the decision to introduce to the trainees Waffle as an example of MVC framework

I’ve been impressed by the simplicity of the framework. It has been a while since the last time I’ve played with any Java Web Framework ( I think it was around 6 years ago the last time, using the super hated Struts 1.0! )

So the first good news is the Java world is alive and some good people are writing great frameworks ( with also the big help of all the knowledge/experience gained using other languages) 

I’ve a very personal opinion on this: many people moved to Ruby and have such a bad remembering of the old times in Java, well I think that frameworks like Waffle keeps the name of Java high. 

In addition to that Waffle has a nicer design compared to Rails, no command line scripting ( you might like it, I don’t ), it’s not annotation heavy and you don’t have to write a line of xml ( ok, just one but in the web.xml! )

The only bad thing of Waffle is that there’s not that much documentation on the web ( I’ve to say that it’s so simple to use that you don’t need it! ) so my goal for the next months will be blog as much as possible about it and prepare some speeches too.

When I find something good I definitely want to spread it, and this is the case.

 

 

Waffle is different from the multitude of web frameworks that exist today, in that Waffle:

  • has no mandatory XML configuration files (beyond a minimalist web.xml required by any J2EE-compliant webapp)
  • is interoperable with best-of-breed UI templating technologies
  • does not have a base controller class to extend or interface to implement
  • has controller classes that can support multiple actions, each a single method rather than a sequence of initialiation/settter/execute methods
  • has a small learning curve

 

8 Nov 2008, 7:01pm
work:
by toni

3 comments

HelloWorld v 2.0

Once upon a time we used to write:

public static void main(String[] args) {
   System.out.println(”Hello World”);
}

Now I prefer:

@Test
public void shouldSayHelloToTheGivenName() throws Exception {
	// given
	PrintStream mockStream = mock(PrintStream.class);
	Greeter greeter = new Greeter(mockStream);

	// when
	greeter.helloworld(”toni”);

	// then
	verify(mockStream).println(”Hello world, toni”);
}

The test is of course using the beautiful test double framework Mockito

18 Sep 2008, 10:20pm
work:
by toni

2 comments

Reviving JRake

The post about the need of a new build tool had many comments and reactions so I started, before coding something brand new, to search on the web for something to solve the current, well known build tools problems.

I found out that Gant is pretty cool but then I started to search for something using ruby, rake and java…

And I found that back in 2006 Martin Fowler and Mattew Foemmel were already talking and working on this…

So I’ve sent an email to Mattew since his svn repository wasn’t neither working, I’ve got the code of his jrake and I’ve started a project on Google code, the name, unfortunately is j-rake (another jrake project was already there).

I’ve just did the first check in, compacting the vendor folder on all the scripts. J-Rake in fact comes out with jruby, rake and all the libraries you need to compile and test your code.

The next small step will be to upgrade all the libraries to the latest version, then some more clean up and then writing more examples on how to write J-Rake tasks.

I’ve a very bad rake/ruby knowledge so any help/suggestion is more than welcome.