Skip to main content

3 posts tagged with "patterns"

View All Tags

· 6 min read
Pere Pages
Developer with bricks

Mixins are a concept in object-oriented programming where a class can include the properties and methods of another class without extending it. Essentially, it's a way to add functionality to a class from multiple sources.

Important

Especially working with modern JavaScript or TypeScript, you might encounter mixins in legacy code or specific libraries but will likely use more contemporary patterns for code reuse and composition.

· 5 min read
Pere Pages
Developer with blackboard

Recently, we had an in-depth discussion on structuring React applications using a layered architectural approach. This method aligns with fundamental software architecture principles such as the Single Responsibility Principle (SRP) and the Single Source of Truth (SSoT). It shares similarities with Clean Architecture and Layered Architecture and, interestingly, shows parallels with the Model-View-Controller (MVC) pattern in some respects. We are also applying Dependency Inversion principle (DIP), depending on abstractions rather than concrete implementations of lower-level modules.

TL;DR
  • Benefits: The architecture offers clear separation of concerns, encapsulation, reusability, and scalability.
  • Considerations: Potential complexity, performance implications of using Redux, and the learning curve associated with Redux and thunks.