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.

Comments

  1. Thanks for mentioning our talk (Mixing Ajax Swing and Flash). And sorry you fell asleep. The slides, demos and the source code are posted on our RIA blog.
    By the way, having lived in Norway for a while, I know what free beer does to you guys ;-).

    ReplyDelete

Post a Comment

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 https://github.com/tfnico/config-mr.git 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:

config-atom.git
    -> ~/.atom/*

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

config-tmuxinator.git  
    -> ~/.tmuxinator/*

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

config-bin.git   
    -> ~/bin/*

config-git.git          
    -> ~/.gitconfig

config-tmux.git  
    -> ~/.tmux.conf    

config-zsh.git
    -> ~/.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…

The End of GitMinutes (my podcast)

I'm just about ship GitMinutes episode 46, which is going to be the final episode. I'll just paste the outro script here, as it sums up the sentimental thoughts pretty well:

I’m happy to have finally finished [publishing the last episodes from Git-Merge 2017], just in time before Git-Merge 2018 takes place in March. I won’t be going there myself, so I’m counting on someone else to pick up the mic there.

It’s sad to be shipping this one as it is probably the last GitMinutes episode ever. To go a bit down memory lane, 6 years ago, my daughter was born, and as I used a little of that paternity leave to set up my podcasting infrastructure and produce the first few episodes. Initially it was just going to be 10 episodes and call the experiment finished. Instead, I got to 46 episodes, the last dozen or so lazily tailing the last few Git-Merge conferences.

To every one of my guests, thank you so much again for coming on to share your passion in this little niche of computer science a…

Joining eyeo: A Year in Review

It's been well over a year since I joined eyeo. And 'tis the season for yearly reviews, so...

It's been pretty wild. So many times I thought "this stuff really deserves a bloggin", but then it was too inviting to grab onto the next thing and get that rolling.

Instead of taking a deep dive into some topic already, I want to scan through that year in review and think for myself, what were the big things, the important things, the things I achieved, and the things I learned. And then later on, if I ever get around to it, grab one of these topics and elaborate in a dedicated blog-post. Like a bucket-list of the blog posts that I should have written. Here goes:
How given no other structures, silos will grow by themselves This was my initial shock after joining the company. Only a few years after taking off as a startup, the hedges began growing, seemingly almost by themselves, and against the will of the founders. I've worked in silos, and in companies without the…

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 https://svn.company.com/repos/project-foo/

You'll get this .git/config:

[svn-remote "svn"]
        url = https://svn.company.com/repos/
        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):
    remotes/trunk
    remotes/feat-bar

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