It depends on what type of app you want to create.
But start by using the Javascript OpenSocial API within the MySpace container (no iframe). Most of the examples are using that method and hence the best way to get started.
If you are creating a game/app with vector animations - then use Flash of course.
If you need to create something more involved perhaps the server side REST API down the track.