First, before you proceed, you should read David Johnston whitepaper that defines a Decentralized Application (DA). There are several examples of DAs – Bitcoin and Mastercoin are such examples. Bitcoin is a decentralized application for sending money over the Internet. Mastercoin is an application for implementing various finance and security features.
However, Mastercoin is more than that – it is also a “DA for creating your own DA”. It wasn’t always.