Closed nazrinzuwair closed 7 months ago
@ash-teach Could you please review this.
Hi @nazrinzuwair I've reviewed your code, and overall, it's very well-structured and maintains good object-oriented principles. I also like to commend your detailed documentation of your implementation that made it easy to grasp the goal and functionality of the facade pattern.
Building upon the foundation of a well-documented code, one aspect to consider exploring to enhance flexibility is create instances of the subsystem classes outside of the SoftwareFacade
class,.
As an alternative to creating instances of SoftwareDeveloper
, Designer
, and DatabaseEngineer
within the SoftwareFacade
constructor, these can be passed as parameters. The benefit of creating instances of the subsystem classes externally rather than internal implementation helps SoftwareFacade
object (being the mediator between the client code and the subsystem classes) to access them in the software development process which aligns with facade pattern's goal to provide simplified interface to a complex system.
:raised_hands: Fantastic work, @nazrinzuwair
Thanks for your feedback @kattsky :)
Great work, @nazrinzuwair! Very well documented and structured. I have very few comments, other than primarily some styling related notes. Though I do want to highlight @kattsky's comment as valid (quoted below), and worth considering.
As an alternative to creating instances of
SoftwareDeveloper
,Designer
, andDatabaseEngineer
within theSoftwareFacade
constructor, these can be passed as parameters. The benefit of creating instances of the subsystem classes externally rather than internal implementation helpsSoftwareFacade
object (being the mediator between the client code and the subsystem classes) to access them in the software development process which aligns with facade pattern's goal to provide simplified interface to a complex system.
As a further note, I would normally suggest that you do not need to reproduce all code as part of your documentation (the user can easily visit the actual code afterall). However, in this case, you've done such a great job of discussing the code, I would prefer to leave it as-is. Fantastic work!
Hi @kattsky and @ash-teach Thanks for your valuable feedback. I have made the changes and it is ready for your review. Thank You!
Thanks for catching those details, @nazrinzuwair. Got nothing else to add from my end.
Hi @ash-teach
I've created PR #77, which includes updates for both the Factory Design Pattern and the Facade Design Pattern: