As for the example part why don't you take a look at this tutorial