Playing with Wicket’s templates

Wicket comes with some templating facilities. They’re often handy, especially when integrating JavaScript components.
Yet, for some reasons I don’t get, these functionalities aren’t much advertised. Anyway, let’s dig in !
Basically, this templating is about some text containing variables, for example ${variable}, whose values are provided through Java code.
Let’s take a simple example, a [...]

Defining JavaScript variables…

hi
Do you know the difference in JavaScript between these variables declarations :
- myVar = “foo”
- var myVarVar = “foo”
In fact, the first one will have an unlimited scope, and thus accessible from the outer world, whereas the second one will only be accessible at this level and below.
As such, this is why the [...]

Yui Compressor mojo

as we´re into bundling Wicket/JQuery-frontend components lately, we needed a way of automatically minimizing JavaScript on deployment.
luckily, there is an excellent mojo out there : http://alchim.sourceforge.net/yuicompressor-maven-plugin
the nice thing is, it does not only minify but also check and obfuscate, which turned out to be very handy!
if you´re bundling javascript (or even css, which it minimizes [...]

Book review : Learning JQuery

I recently read Learning JQuery, the version of 2007. I was reading it as a casual reader, just to get a better hand on JQuery.
My feeling about it is the following : it seems good at providing technical details but fails at “empowering” the reader and providing the big picture. I say “it seems” because [...]