OOP is associated with Inheritance, Encapsulation and Polymorphism. These should enable maintainable and re-usable code. Let’s see how this ends up in practice and what are the solutions, so that you REALLY get maintainable and re-usable code. Based on an interesting and entertaining article on medium by Charles Scalfani. This article is a summary. If you need some explanations and examples you should read the original article.
Continue reading “Flaws in OOP practice: use flat composition and interfaces instead of hierarchical inheritance!”Tag: Design Patterns
Article recommendations: decorator pattern vs inheritance|AOP
Starting from Python decorators I wanted to dig deeper what the software engineering community says about decorators and differences to other main concepts. I come up with following recommendations:
- When to use AOP or decorator in your architecture: https://crosscuttingconcerns.com/AOP-vs-decorator
- Difference between AOP and decorator:
https://damnhandy.com/2005/07/05/aop-is-not-simply-a-decorator/ - Decorator and subclassing and good mentioning of common Liskov violation: https://stackoverflow.com/a/15231311
- Decorator and class hierarchy:
https://dzone.com/articles/is-inheritance-dead - Starting point: decorators in Python (nice and simple introduction into topic)
https://python-3-patterns-idioms-test.readthedocs.io/en/latest/PythonDecorators.html - A second introduction, but Angular:
https://ultimatecourses.com/blog/angular-decorators
ValueObjects and its usage in classes (in comparison to states and dependencies)
I saw following recently in a pull request I was supposed to review. A ValueObject was used as an property – for a validator class.
Continue reading “ValueObjects and its usage in classes (in comparison to states and dependencies)”
Customizable Software Architecture – Approaches overview
- All in One and feature toggles
- Challenges: if much customization is needed
- Branching/Forking of whole product
- Challenges: merging with main branch in post-delivery
- Entity-Attribute-Value-Model (EAV) for database as addition
- Plugin Architecture
- Challenges: “Points of Customization” (aka Extension Points) in the main product
- Extension Approach (inheritance)
- Separation of main product and customer-specific
Continue reading “Customizable Software Architecture – Approaches overview”