-
Notifications
You must be signed in to change notification settings - Fork 0
Identifying Design Patterns
Designing Solutions and Identifying the patterns
Problem Statement: Consider designing a solution for a Hostel, starting from scratch i.e. purchasing a building to get it fully functional.
Step 1: Finding a property in a suitable area, a place where the probability of getting the Hostel full is more. A few things more to consider,
- The property is not expensive.
- There aren't many issues like water logging, electricity, etc.
- The surrounding is safe as most college students live in Hostels.
I have been living in Indore, but only know wither about my area and its surrounding areas and a few popular places like Saket, Palasia.
I need someone who can help me get the property considering all the above points, I will approach a property dealer in this case as they usually know a lot of areas as well as the prices and issues related to the areas.
The property dealer can play the Information expert here.
There can be other friends and relatives who can help me find a property but they might not know about all the properties available in safe surroundings and in a good price.
Step 2: Once I have got the property, I want to get the fully functional and to do so, I may need some in-house services and some services to be outsourced. The following roles need to be filled
- Manager
- Cook
- Laundry services
- Security services
There are four roles to be filled, they can be managed by two people but a single person managing multiple duties can not be a good approach.
Let's say, the food preparation and laundry services are done by a single person, if that person gets sick, two services of the Hostel will get affected at the same time.
Instead delegating the responsibilities to different people makes it safe for me.
This brings modularity as well as a bit of low coupling maybe. If one of the services gets disturbed, the other will not be because of the former. Not sure if low coupling suits best here.
I hire a manager with some prior experience in managing hostels and ask him to recruit these other people as he might have some connections. -> Again the manager is an Information expert here.
The manager hires for required roles.
The hostel gets running and has some college students.
Scenario 1:
Students complain that the food provided is not good and up to the mark, but they make this complaint to the Manager, not to the owner or the cook himself.
The Manager here acts as a communication layer between these students and the Owner(considering complaints get redirected to the Owner for any action).
This can be an example of Indirection.