diff --git a/README.md b/README.md index d7bb31b92280c891422a07a68aff4c09a5dfddf3..391a7eb436b4249ec94495f21b95c8a4ea033f03 100644 --- a/README.md +++ b/README.md @@ -100,4 +100,16 @@ This implementation utilizes both DashMap and Singleton pattern (lazy_static). B #### Reflection Publisher-2 +##### Separation of Service and repository from a Model + +The separation of "Service" and "Repository" is done to fit the Single Responsibility Principle which states that each component should have only one responsibility and only one reason to change. In this case, model focuses on data structure, repository to hand data access and service contains the business logic. + +##### Without Separation + +Using models only to handle everything in BambangShop would impact the codebase and future maintenance negatively. It would cause complex dependencies which in result would stray from Open/Close Principle due to the need of refactoring multiple codes for one small update. + +##### Postman + +Personally, this has helped me alot in API testing. It allows me to make repeated requests quickly, which gives me more time to analyze and debug where my program went wrong. The environment variable interests me alot, as this feature lets us define certain variable such as BASE_URL and PORT which then can be used in the request creation. + #### Reflection Publisher-3