There's multiple ways of extending InDesign.
For consistency and to ensure people know what you are talking about, it's important to stick to the accepted terminology:
1) Scripts are text files written (generally) in ExtendScript, AppleScript or VBS, and run for the script panel or automatically using events.
2) Plugins are pieces of software written in C++ and compiled for Mac/Windows and become an integral part of the application.
3) Extensions is software that runs within the CSXS/CSInterface/CEP architecture and are written in either Flex/ActionScript or HTML/JS.
You are asking about Extensions (and not plugins). The best place for these answers are in the Extension Builder forum. I'm moving your question to there.