19 karma · joined Apr 28, 2017 (9y ago) · 3 submissions
comment 9y ago · link · parent
comment 9y ago · link · parent
That could be the right choice in some situations -- it certainly worked out well for Salesforce and allowing extensibility in their model. However if you want to build an app with consumer usability you'll be putting a lot of unique development effort into your view layer.
comment 9y ago · link · parent
Here's where the story breaks:
- Most app's domain objects and rules are small. You could describe them on a few sheets of notebook paper. The technology implementation (e.g. database or http logic) is a much larger portion of the codebase.
- In most teams, especially startups, the domain rapidly evolves. The technology stacks (databases, SQL, etc) are quite stable and have already been heavily abstracted for reuse over the years. Using these proven technologies and excellent existing interfaces is how you go fast.
- Technology choice isn't just about code interface. Each comes with its own assumptions of system behavior and theory of operation. Plugging a different implementation into your storage adapter interface is the least piece of work you need to think about unless it's nearly a 1:1 swap like postgres -> mysql.
So following a strict clean architecture approach will probably pour concrete around something changing all the time and create friction and extra work in using excellent available technologies.
Instead I'd rather follow pragmatic design guidelines:
- The concept of each component should be clear
- Sensible responsibilities for each component
- Abstractions should serve the composability of your existing design; introduce adapter layers if you truly have more than one implementation
- Keep it simple; optimize for reading the code end-to-end and easier refactoring
These aren't inconsistent with Clean Architecture but probably more productive than adding religious rules.