Roles
- In a particular context with a particular set of influencing forces, there will be number of roles working for problem resolution.
- Real world analogy would be Organizational structure of an Office. Each role has specific responsibilities and abstraction. Role at each level prepares the information needed and delegates sub tasks to appropriate roles in lower-level.
- Software design focuses on strategical organization of components and decides which particular role must be implemented by which component.
- It is not necessary that each role is played by a separate distinct component. A single component may take on multiple roles.
- Structure of components (each having a specific role) should be designed to resolve the original problem keeping forces(non-functional requirements) in mind.
- Communication between different components performing different roles should be simple with strict dependency boundaries. Unnecessary indirection levels should be avoided so that design is more flexible and more effective.
- Consider the following dynamic model, in each subsystem there are three important roles(Components) a) Boundary b) Entities c) Control.
- Boundary objects responsibility is restricted to take the service request from external system, validate data to be processed and pass the service request with data to the Control object. Control object controls the process flow for fulfilling the service request. Control object orchestrates the Entity Objects to perform the task.
- Consider the following layered architecture model, which I got from the video :-https://www.youtube.com/watch?v=aZp7C971uC8&feature=youtube_gdata_player
- Each layer has a fat interface which acts as a facade. Facade abstracts the internal components of subsystem. Allows the domain model to evolve. Can also act as secure layer, validating the caller and data in case of N-tier deployment.
- Role of each layer (Analogy : Department of an office) & each component(Person in organization structure ) in a layer have specific roles and clear dependency firewalls.
In an organization, Seperation of Concerns at different levels of abstractions might be achieved as follows: Directory (boundary object) might take the operation requirement and orchestrate the activites and data managed by managers(of different departments) to complete the operation.
In a software system, seperation of concerns at different levels (layers) of abstraction and at the same level of abstraction(different controllers in a layer) avoids ripple effects of modifications to different components. It facilitates concurrent development and allow independent evolution of components in each layer.



No comments:
Post a Comment