Genius/Novice: refer to SP Dev guide...There are some examples of Controllers/Externals in there...
Many example classes provided by Teamsite with installation . The path for the sample files in the server is \Interwoven\TeamSite\install\livesite\docs\impl.zip .please refer that classes for sample codes. This path I have provided based on TeamSite 7.3.2 version