← Back to books

Patterns of Enterprise Application Architecture
by Martin Fowler
Rating:
★★★★★
(4.5/5)Publisher: Addison-Wesley Professional
Published: 2002
ISBN: 9780321127426
Started: February 10, 2023
Finished: April 2, 2023
Genres:
Software DevelopmentArchitectureProgrammingDesign Patterns
Patterns of Enterprise Application Architecture
Key Insights
- Layered Architecture: Enterprise applications benefit from organizing code into distinct layers (presentation, domain, data source) to manage complexity and support change.
- Domain Logic Patterns: Different approaches to organizing business logic—Transaction Script, Domain Model, and Table Module—suit different application complexities.
- Data Source Architectural Patterns: Patterns like Row Data Gateway, Table Data Gateway, and Data Mapper provide strategies for database interaction.
- Object-Relational Mapping: The impedance mismatch between object-oriented programming and relational databases requires specific patterns to manage effectively.
- Web Presentation Patterns: Patterns like Model-View-Controller (MVC) provide structure for developing maintainable user interfaces.
- Distribution Strategies: Remote Facade and Data Transfer Object patterns help manage the complexities of distributed systems.
- Offline Concurrency: Optimistic and pessimistic locking strategies address multiple users modifying the same data.
- Session State: Patterns for managing user state across multiple interactions while maintaining scalability.
- Base Patterns: Foundational patterns like Registry, Value Object, and Mapper provide building blocks for larger architectural patterns.
- Pattern Languages: Patterns don't exist in isolation but form languages that guide overall system design.
Favorite Quotes
- "The interesting thing about software development is that it's all design. The actual 'construction' phase where we type the code amounts to giving instructions to the compiler that's so focused on detail it can't figure out what we want to do." (p. 6)
- "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (p. 11)
- "The biggest issue I've run into with Domain Models is the interface with relational databases." (p. 118)
- "The glory of distribution is that a well-designed distributed system can have greater availability and can scale better." (p. 89)
- "All patterns are design solutions to problems, but these problems occur in different contexts." (p. 15)
- "It's useful to have a relatively complete hierarchical structure of domain objects, even if they don't correspond to a similar hierarchy in the database." (p. 125)
- "If you find that you're spending a lot of time thinking about computers, databases, and pattern implementation, rather than thinking about the domain, that's a sign that you're focusing on infrastructure rather than on delivering value." (p. 33)
- "A simple domain will be mapped most easily with Active Record, while a complex domain will want the fuller separation that Data Mapper provides." (p. 165)