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 its 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 easily possible in Active Directory so that 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 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?