2009-09-11

Express-Wind: a brand new MVC framework

Express-Wind is a brand new MVC framework that is completely different with tradictional Java MVC frameworks such as Struts.

Express-Wind supports friendly URL like '/blog/post/2009-09-09.html', and simple URL mapping mechanism like '/blog/post/$1.html'.

See example:



import org.expressme.wind.Mapping;

public class MyPage {

@Mapping("/hello")
public String hello() {
return "<h1>Hello, world</h1>";
}

@Mapping("/hello/$1")
public String hello(String name) {
return "<h1>Hello, " + name + "</h1>";
}
}


Please visit http://code.google.com/p/express-me/wiki/ExpressWind for more docs and download.

2009-02-19

How to use OpenID to sign on with Google account

Recently Google announced its support for OpenID, called "Federated Login", to let any site enable their users to sign on by their Google accounts, without registrations.

This is really a good news, and for Java developers they can write some code to make the 3rd-part site to connect to Google. There are already lots of libaries that can be used in J2EE. However, after I do some evaluation of these libaries, I do not find a suitable libary. The well-known "OpenID4Java", is too large (46MB!), with dependencies on many other libaries. So I decided to write a small, but very lightweight libary to support OpenID 2.0 spec, called "JOpenID".

It is very small, with only 48KB including both source & binary. You can download from http://code.google.com/p/jopenid/downloads/list.


It has been fully tested based on Google accounts. However, I think it also can support Yahoo! OpenID, but with little information provided by Yahoo! I do not test yet.