Qui trovi un bel po' di informazioni utili.
E qui anche un esempio.