In a component based architecture where a large number of decoupled components communicate through a set of standardized interfaces - are there any guidelines for where-to-store / how-to-group the interfaces?
Extreme solutions would be:
Both of these option seems wrong to me - the first being not flexible enough (for example if you want to change only one interface) the second being the other extreme, which could escalate to maintenance nightmare very quickly.
In particular, I am looking for KILLER arguments not to adopt the two extremes above and obviously alternative approchaes.
Any opinions appreciated.
Component-Based Architecture. Component-based architecture focuses on the decomposition of the design into individual functional or logical components that represent well-defined communication interfaces containing methods, events, and properties.
Component Interface 1 Scripting. Component Object Model (COM) is a binary interface standard that allows objects to interact with each other via interprocess communication. 2 Component-Based Service Development. James McGovern, ... ... 3 Software Application. ... 4 Securing Windows 7
An interface mapping is complete if for every required action of one component, there corresponds a provided action from the other component. It is nonambiguous if for every required action of one component, there corresponds at most one provided action from the other component.
Pure Components, Interfaces and Logic Hooks. This architecture is divisible into three components, Pure Components, Interfaces and Logic Hooks. It is a variant on the Presentational and Container Components pattern described by Dan Abramov, now considering the existence of Hooks.
In a nutshell If the interfaces are shared then they have to be grouped in a common assembly, otherwise they have to be in the component interfaces assembly.
In a bit more detail If one of the standardized (i.e. shared) interface changes no matter where you put it you will have to change all the components which are implementing it, whether that interface is in a common assembly or in a component one. So there's no drawback specific to option 1, even if, as you say, you might have to change only one interface. On the other hand you would have a drawback by replicating common interfaces in every component, see standard redundancy issues.
This is not a special suggestion but a natural choice from the moment you chosen (wisely) to have standardized interfaces. You made the effort to identify them, you found they were standard, and now you group them.
If the components that implement these common interfaces have in addition some other ad hoc interfaces those will have to be in the component assembly as they shouldn't be exposed to the other components who have access to the common assembly.
IMO The interface(s) for the component should reside with the component - possibly in a component specific interfaces assembly.
Any "common" datatypes should live separately from the components (possibly in a "common" or "shared" component).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With