|
January 2006
[
vmassol
]
08:55, Saturday, 21 January 2006
I'm currently writing my third book and I'm starting to notice a pattern. Whenever I write a book about a tool/framework to which I have access to the sources, the code ends up being better. The way I work goes like this: I start writing about a topic. If it's taking too long to explain it, I consider that something is wrong about the code. I modify the source code so that the document I'm writing has the minimal required size to explain the topic. The good thing with a book is that what you're explaining has to be simple and not convulted which leads to this nice effect of improving usability of your code. I get a bit of the same result when I write project documentation but not to the same level. This is probably simply because writing a book is a more involved process, you dedicate more time to it and thus you want it to be as perfect as possible (and thus as readable as possible). I guess nothing here is new. This is all about having a user of your code. Tests are "users" of your code and thus leads to better design. I guess documentation can also be a "user" of the code and thus help improving it. If you're writing some framework/tool, consider writing a book for it and if you're diligent in your writing your code will end up being better! As an added benefit your users will love you... :-)
[
vmassol
]
21:05, Tuesday, 10 January 2006
Cargo is a container-manipulation library that allows configuring, starting and stopping containers. It also deploys modules to those containers. Version 0.7 has been released last week along with version 0.1 of a Maven2 plugin. The nice thing about Cargo is that it provides a uniform API across all containers and it has several end user APIs: a Java API, Ant tasks, a Maven 1 plugin, a Maven 2 plugin, a Netbeans plugin, an IntelliJ IDEA plugin, etc. You can use any of those extensions with all the supported containers. I'd like to quickly demonstrate how to use the new Maven 2 plugin on 2 use cases (more samples can be found here):
Deploying a WAR and starting Tomcat 5.xCreate a Maven 2 project and put the following configuration in your
To generate your WAR, start Tomcat and deploy the WAR in it, simply type:
Orion 2.0.5 will then be automatically downloaded and installed the first time you run your build. Inplace webapp development with JettyLet's imagine you're using the same project as above but this time you'd like to start Jetty and make it point to your webapp directory (i.e.
Then open a shell prompt and type If you're interesting in learning more, check the documentation and join us on the Cargo mailing lists. |