Clean Architecture - What is the Humble Object Pattern?

Topics covered
Popular Clips
Episode Highlights
Data Formatting
Data formatting is crucial for maintaining a clean separation of concerns in software architecture. Alan Underwood emphasizes that views should not handle data formatting; instead, this responsibility should lie with the viewmodel or presenter object 1. This approach ensures that data is consistently formatted across different platforms and clients, avoiding redundancy and potential errors. Joe Zack adds that locale-specific formatting decisions, such as currency or date formats, should be made server-side to maintain consistency 2.
If you needed something to be formatted in a particular currency, the view should not be doing that. That data should be formatted, provided to the viewmodel.
--- Alan Underwood
This method also simplifies the view layer, making it easier to manage and test.
  Â
ORM Concepts
Object-relational mapping (ORM) presents unique challenges and considerations. Alan Underwood and Joe Zack discuss the distinction between objects and data structures, noting that ORMs often create data structures with no implied behavior 3. This can lead to confusion and misuse, as developers might expect more functionality from these objects than they provide. The debate extends to database gateways, which serve as interfaces for CRUD operations and help maintain clean architecture principles 4.
What you get out of an ORM is a data structure. It's literally the record from a database or the record from some sort of storage thing just basically shoved into an object.
--- Alan Underwood
Understanding these distinctions is key to effectively using ORMs and maintaining a clean, maintainable codebase.
Related Episodes


Clean Architecture - Programming Paradigms
Answers 383 questions
Clean Architecture - Fight for Architecture
Answers 383 questions

Clean Architecture - Are Microservices Truly Decoupled?
Answers 383 questions
Clean Architecture - The Art of Drawing Lines
Answers 383 questions

Clean Architecture - Make Your Architecture Scream
Answers 383 questions

Clean Architecture - Components and Component Cohesion
Answers 383 questions

Clean Code - How to Build Maintainable Systems
Answers 383 questions

Clean Architecture - How to Quantify Component Coupling
Answers 383 questionsWhat is Supple Design?
Answers 383 questionsDesign Patterns Part 3
Answers 383 questions

Clean Architecture - Keeping Your Options Open
Answers 383 questions

Clean Code - How to Write Classes the Right Way
Answers 383 questionsDesign Patterns Part 1
Answers 383 questionsClean Code - How to Write Amazing Functions
Answers 383 questionsDesign Patterns Part 4 - Adapter, Facade, and Memento
Answers 383 questions
