I'm a Sharepoint development beginner and I would like to develop a custom application on top of Sharepoint Foundation 2010. I decided to write few visual web parts for simple logic and Silverlight web parts for complex application logic.
My application will use it's own data in a separate DB. The only connection between my DB and Sharepoint DB will be users. Users will authenticate against Sharepoint and access my application from there.
Within my application (and DB) all these users will be hierarchically related (I don't know if this is trivially possible in Active Directory so I could avoid one part of user administration?) and they will also define certain rights within my application.
If I do write web parts (of whatever kind), how do I ensure that these same web parts are not used in other Sharepoint sites as well? It would most probably break the application and it could of course make it possible to replicate the same application but using different users...
I thought of writing application pages (my application would be in _layouts folder as I understand it), which would make it possible to not reuse my application, but users and rights are assigned on site level... So I can't win this way either...
What would you suggest?