I've drawn component diagram for the following scenario. User
comes to the system and download content. (This is a part of my whole system). I wanna check whether the User
has permission to download that content. Therefore I've used Access controller
component. Access controller
takes information of user from the database and it takes content from the database. After that it provides content to the user. That's how I've modelled this.
Can I leave provided interface without connecting to any required interface (like in Access controller
. That is the content provided to the user after checking permission)?
Is there any better way to do this?
Any guidance would be most helpful. Thanks!!!
A component represents a replaceable self-contained part of a system that offers and requires interfaces to interact with the other parts of the system.
Can an unused interface be represented in the component diagram?
In a component diagram, we are free to chose which component we want to represent, and which interfaces may be relevant for the readers. It's perfectly legitimate to show call the interfaces that a component requires or offers, even if some are left unused. There are even good explanations for that:
But are you sure about the access control interfaces?
Are you sure that the user should provide the interface
DownloadRequest
? Shouldn't it be theAccess controller
that offer the interfaceDownloadRequest
, and theUser
uses this interface to submit its requests?Also, according to your narrative, the user requires content to be provided:
Wouldn't a socket that requires
Content
be missing on theUser
side? And would theAccess control
providedContent
be connected to exactly this socket? (i.e. no unused provided interface anymore)