Skip to main content

Jazoon 2007: End of day two

After lunch I dropped in on Øystein Grøvlen's intro to JavaDB/Derby.

Supports some cool things I didn't know about, like support for external authentication mechanisms, encryption, calling java from SQL (for whatever reasons you want to do that for).

Different persistence mediums (file, jar, memory). Derby must be started as a networkServer in order for other applications to connect to it outside the runtime.

SQuirrel is a nice tool for browsing the db.

Had a quick talk with him afterwards on HSQL vs Derby in typically JUnit tests (like in a subclass of Spring's AbstractTransactionalDataSourceSpringContextTests). HSQL is still faster, and in-memory implementation of Derby is still in the experimental phase. It can be tuned by turning off some logging, and doing setup in @BeforeClass (junit 4) should help.


David (Day) Nuescheler's talk on AJAX on top of JCR. At the same time as this was pushing their CRX content repo thingie, it was actually quite a cool product. R-JAX is a JS API for reading and manipulating a content repository (js read, form post to write).

The slides are real nice! Nice chalk on blackboard thing going on there..

It runs on CRX. David does us the favour of showing off CRX's user-friendly installer :)

He uses webdav to mount the content repository. Is this webdav connector the one in Jackrabbit, I wonder?

There is obviously a servlet that listens to rjax.js functions. Nice url mapping between actual content and the servlet. Good to see some good has come of Fielding joining Day :)

Any security implications? Well, many of the other AJAX talks have strifed that subject..

Live demo of reimplementing a blog in 15 minutes. Very cool.

Ah, he actually managed to do it in 10 minutes (write post + archive)! He says it's the first and last time he managed to do it in time. The whole thing was done in 15 minutes and about 10 seconds. Impressive!


Then there was this great talk on RESTful WS and Java support for this coming into a JSR. Paul Sandoz is spec lead on JAX-RS. His advice is read the book, Restful Webservices (ordered it from Amazon like two months ago but it still hasn't arrived).

An API that helps you develop RESTful services. Get rid of boiler-plate url and json mapping.

Soec is still in an early version.

Declarative annotation of doGet in servlets, like @ProductMime("application/xml") .

Servlet Artist is annotation @UriTemplate("/artists/{id}"). The annotations are also applicable to POJOs.

Nice with sub-resources (artist/13/recordings)

Greg Murray does some good blogging on the subject.

It reminds me slightly of Struts2's @Result annotations.

When it comes to responses, instead of returning outputstreams they use Block's builder pattern.

The @UriPram is pretty cool, does injection of parameter values. I wonder whether there are any advanced converters for going from request parameters to field values.

Still some open issues in the spec when it comes to filters, authorization, etc. Jersey is the reference implementation.

Demo with Netbeans, hitting on breakpoints in generated Resource classes when firing off Resource requests/uris.

Looks like Netbeans has got a webtest framework. Interesting.

This is really cool stuff, there's a MatisseBlogger thick client that utilizes the API. Will have to keep an eye on this.


Next up I had a hard time finding an interesting subject. JavaDB performance would be cool, but I'm pretty satisfied with the performance as it is. Besides, it's quite likely that I will bump into these guys back home some time.

Went to the Swing/flash/ajax integration. Mixing different technologies on the client side. It's nice to get some input on what to use for rich clients these days, so I'm hoping I'll get some of that in this talk.

After some theory it's a demo based on the flex hybrid phone store example.

Then onto the Flex/Ajax bridge.

Instead of getting the Flex app as a DOM element you use the bridge to access the Flex model.

Moving on to bridging Swing to Ajax. They've got a demo application, a Swing app that embeds a small browser window with a Google Maps underlay. The cool part is that the zoom-function, a JS-function in the Maps API has been extracted into a Swing controller. Inside the controller there's like fBrowser.executeScript(map.zoom..). The protocol for shipping these requests is proprietary, there is no native JS event handling in Swing, naturally.

Next up is integrating flash into a Swing application. ActiveXControl.CallFunction, only works through IE at the moment.

Nearly fell asleep at this point. I have to hand it to you, German/Swiss people have a *very* monotone voice when speaking English for some reason. Combine that with free beer during the evening before and you get nappy listeners :)

To wake back up, I tapped in on some blog analytics. Since I started blogging on Jazoon, the search income on the stats have pushed up traffic quite a bit. Sorry I'm not putting more energy into making these posts more readable/interesting.


Ajax enterprise for Java... By Greg Murray whose blog was mentioned in the previous presentation. This talk was great for a quick run-up in jMaki and various Ajax toolkits Sun are working with these days. I didn't take too much notes as I was listening carefully to lots of interesting tips about Javascript, cross domain scripting workarounds and request-keys used to restrict/control JS requests.


All in all, it has been a great day at Jazoon. The quality on the talks was generally higher than the ones I went to yesterday. Next up is dinner, then BOFs.

Popular posts from this blog

Encrypting and Decrypting with Spring

I was recently working with protecting some sensitive data in a typical Java application with a database underneath. We convert the data on its way out of the application using Spring Security Crypto Utilities. It "was decided" that we'd be doing AES with a key-length of 256, and this just happens to be the kind of encryption Spring crypto does out of the box. Sweet!

The big aber is that whatever JRE is running the application has to be patched with Oracle's JCE in order to do 256 bits. It's a fascinating story, the short version being that U.S. companies are restricted from exporting various encryption algorithms to certain countries, and some countries are restricted from importing them.

Once I had patched my JRE with the JCE, I found it fascinating how straight forward it was to encrypt and decrypt using the Spring Encryptors. So just for fun at the weekend, I threw together a little desktop app that will encrypt and decrypt stuff for the given password and sa…

Managing dot-files with vcsh and myrepos

Say I want to get my dot-files out on a new computer. Here's what I do:

# install vcsh & myrepos via apt/brew/etc
vcsh clone mr
mr update

Done! All dot-files are ready to use and in place. No deploy command, no linking up symlinks to the files. No checking/out in my entire home directory as a Git repository. Yet, all my dot-files are neatly kept in fine-grained repositories, and any changes I make are immediately ready to be committed:

    -> ~/.atom/*

    -> ~/.mrconfig
    -> ~/.config/mr/*

    -> ~/.tmuxinator/*

    -> ~/.vimrc
    -> ~/.vim/*

    -> ~/bin/*

    -> ~/.gitconfig

    -> ~/.tmux.conf    

    -> ~/.zshrc

How can this be? The key here is to use vcsh to keep track of your dot-files, and its partner myrepos/mr for operating on many repositories at the same time.

I discovere…

Always use git-svn with --prefix

TLDR: I've recently been forced back into using git-svn, and while I was at it, I noticed that git-svn generally behaves a lot better when it is initialized using the --prefix option.

Frankly, I can't see any reason why you would ever want to use git-svn without --prefix. It even added some major simplifications to my old git-svn mirror setup.

Update: Some of the advantages of this solution will disappear in newer versions of Git.

For example, make a standard-layout svn clone:

$ git svn clone -s

You'll get this .git/config:

[svn-remote "svn"]
        url =
        fetch = project-foo/trunk:refs/remotes/trunk
        branches = project-foo/branches/*:refs/remotes/*
        tags = project-foo/tags/*:refs/remotes/tags/*

And the remote branches looks like this (git branch -a):

(Compared to regular remote branches, they look very odd because there is no remote name i…

The Best Log Viewer Ever

This is what it looks like when I want to have a look through the logfile, to see what a user did on one of our machines one day:

Read the whole story about how it works on the Viaboxx Systems blog (and upvote on DZone!).

Microsoft ups their Git efforts another notch

This week Microsoft announced first class Git support embedded in the coming version of Visual Studio.

Now, it's not completely shocking. We could have seen it coming since Microsoft started offering Git repos on CodePlex, and more recently offering a Git client for TFS. In any case, these are some big news. Scott Hanselman weighs on some features and some more background here.

For those who are a bit unaware of what the Git situation on Windows looks like these days, I've dotted down these notes:
Some explanation on these:

msysGit has long been The Way to use Git on Windows. It's basically a port of Git itself, so it's a command-line tool.GitExtensions (includes Visual Studio integration), TortoiseGit, Git Shell, posh-git and most other tools are powered by msysGit.libgit2 is a native library for doing Git stuff. It is developed completely separate from Git itself. The above tools could (and should) probably use libgit2 instead of hooking onto and around msysGit.Github…