Archive

Posts Tagged ‘spring’

Hood: example application for jcouchdb 0.10.0-1

October 15th, 2009 2 comments

On the occasion of presenting CouchDB and jcouchdb at my place of work, I got around to finally create a small example application that is now downloadable as sneak preview. There need to be bugs fixed, features implemented and lots of documentation to be added, but it kind of works.

It’s called “Hood” for neighbourhood and allows you to mark places or people around a place of activity of yours, called hood. it is meant to foster collaboration / tips on local places etc.

It’s Spring Web Application demonstrating some techniques of working with jcouchdb. It’s an eclipse WTP/Spring IDE project with all dependencies you need besides couchdb and tomcat or another servlet container.

Stay tuned for hood to grow into a fullblown app.

Links:

Twitter/IRC integration with boticelli

October 6th, 2009 No comments

I have been planning to release my IRC bot project as open source for quite a while now and the recently added twitter integration gave me the final push to actually do it. So now I am proud to announce the inital release of boticelli, a java / spring IRC bot/web application based on the martyr IRC library. Its mean to be easily configurable and extendable and ships with lots of plugins already included.

Available Plugins:

  • Logging – log channel conversation and provide a web interface to browse and search them
  • Seen – Remembers when a user last spoke in the channel
  • FAQ – Manages a keyword list of FAQ keywords that are matched to a description. Useful to provide answers for reoccuring topics in the channel.
  • AccountCreator?/Revoke/Grant – commands to automatically create accounts for the webapplication and to revoke / grant web app access rights (for ops)
  • ServerPing? – plugin that detects broken connections and makes the bot reconnect.
  • Say – plugin to let the bot say something or make it do something (a CTCP Action)
  • Twitter – two way integration into twitter over a bot specific twitter account.

So if you’re into old-school IRC fun, head over to google code and grab yourself a copy.

Links:

Categories: Blog Tags: , , , ,

Hybrid XML-Annotation-based Controllers in Spring

March 7th, 2009 No comments

When talking to people about the Spring MVC, it became increasingly clear to me that many are thrilled by the possibilities of using annotation based controllers but are somewhat put off by auto discovery / auto-injecting.

Luckily, it’s pretty easy to combine the power of annotation-based MVC Controller (extremely flexible controller methods, flexible binding and validation) and the advantages of  externally declared beans: You continue to use the @Controller annotation, but you don’t use a <context:component-scan/> directive.

 

Spring Praxishandbuch

November 6th, 2007 No comments

I’ve been working a lot with the Spring Framework again in the last year. Apart from lots of my work involving it and the JsServ Interceptor I wrote last weekend, another result of this is a book some people from my company wrote. It is about Spring and integrating other technologies into it. It is meant to focus on the practical aspects and tries to explain some exemplary solutions to common problems encountered when working with Spring.

I wrote an awesome chapter about web development with Spring which contains examples for creating a little shop application with a REST-like interface in Spring Web MVC and Spring Webflow. 

So if you like a read a brilliant book Spring development, go and buy it :) . This might work best if you can read German, but you can buy one anyway if you don’t. Hell, buy two and give one away for Xmas.

The book and example code should be available in a few days. 

Links:

Categories: Uncategorized Tags: , , ,

JsServ – Serverside Javascript and DOM emulation

November 4th, 2007 4 comments

I played around with some ideas about JavaScript on the server-side and came up with this little prototype. It’s a set a spring components that allow running the scripts in a website on the server side in case a user has no support for JavaScript or has disabled it.

The following diagram shows the way things work:

The parts of jsserv

The parts of jsserv

The DOMInterceptor intercepts the HTML output of other controller and initializes a dom state with it. The document itself is parsed into a DOM tree and the referenced scripts are loaded and executed. Additional patch scripts can be defined to alter the behaviour of other scripts.

The current version adds
<a class="eventHelper" href="/app/event?uuid=42">...</a>

Links around every element for which a onclick handler is registered. The links point to a DOMEvent Controller that triggers updates in the user’s DOM State.

A little example scripts implements a collapsable tree that changes the style classes of nested unordered lists. With the JsServ DOM Manipulation this works with JavaScript as well as without JavaScript on the client side.

While this code is only a rough sketch it promises a lot in terms of vastly reducing the amount of work for sites that must use javascript to get an optimal user experience but who cannot or want not to have a java-script only site. Although the link-as-click event method is rather limited, it is good enough to make a lot of DOM manipulations possible. Expressed only once in JavaScript. Running in it’s deluxe form for people with client-side JavaScript and in a basic form for people with the help of using server-side JavaScript. All is seamlessly integratable into all kinds of Controllers.

Links:

Dependencies:

Edit: code.google.com link added, update to 0.12

Categories: Blog Tags: , , ,