And so on. Just ask yourself: what does the one-click buy functionality have to do with shipping? One-click buy cares about credit card numbers, and user info, while shipping cares about product attributes, like weight and height, and addresses. Similarly refund logic has nothing to do with a wishlist.
Despite the fact that these modules, these classes are very different from each other, they live in the same repository, they can be accessed by the same API, they can call each other, and they can share some general functions or classes.
They are tightly coupled and have low cohesion. But in great architecture, we’d like to have loose coupling and high cohesion.
Tất cả sách điện tử, ebook trên website TimSach.VN đều có bản quyền thuộc về tác giả. Chúng tôi khuyến khích các bạn nếu có điều kiện, khả năng xin hãy mua sách giấy để ủng hộ Tác giả và Nhà xuất bản