Document Details

NikolaDichev

Uploaded by NikolaDichev

Technical University of Sofia

Tags

software architecture design principles clean architecture programming

Summary

These flashcards cover the core concepts of clean architecture, including introduction, values, design principles, and various components. They are designed to be used for learning software architecture. The document also includes questions and answers.

Full Transcript

Clean Architecture Flashcards ============================= Chapter 1: Introduction ----------------------- - Q: What is the primary goal of software architecture? 1. A: To minimize the human resources required to build and maintain the system. - Q: Why is architecture important for lon...

Clean Architecture Flashcards ============================= Chapter 1: Introduction ----------------------- - Q: What is the primary goal of software architecture? 1. A: To minimize the human resources required to build and maintain the system. - Q: Why is architecture important for long-term software success? 2. A: It enables the system to adapt to changing requirements and reduces maintenance costs. Chapter 2: A Tale of Two Values ------------------------------- - Q: What are the two primary values of software? 3. A: Behavior (meeting user needs) and structure (maintainability and adaptability). - Q: Which value of software becomes more critical over time? 4. A: Structure, as maintainability directly affects long-term costs. Chapter 4: Design Principles ---------------------------- - Q: What is the Single Responsibility Principle (SRP)? 5. A: A module should have one, and only one, reason to change. - Q: Why is the Open/Closed Principle (OCP) essential? 6. A: It allows software entities to be open for extension but closed for modification, enabling easier adaptability. Chapter 5: Component Principles ------------------------------- - Q: What is the Reuse/Release Equivalence Principle (REP)? 7. A: The granularity of a reusable component is determined by the level at which it is independently released. - Q: What is the Common Closure Principle (CCP)? 8. A: Classes that change for the same reasons and at the same times should be in the same module. Chapter 7: The Rules of Architecture ------------------------------------ - Q: What is the Dependency Rule? 9. A: Source code dependencies must point inward, toward higher-level policies. - Q: How does the Dependency Rule relate to the layers in a clean architecture? 10. A: Lower-level details depend on higher-level abstractions, not vice versa. Chapter 10: The Clean Architecture ---------------------------------- - Q: What are the core layers of Clean Architecture? 11. A: Entities, Use Cases, Interface Adapters, and Frameworks/Drivers. - Q: What is the role of the Entities layer? 12. A: It contains business rules and is independent of frameworks and external systems. Chapter 12: Screaming Architecture ---------------------------------- - Q: What does \'Screaming Architecture\' mean? 13. A: A good architecture should clearly communicate the system\'s intent and purpose. - Q: How can architecture scream its intent? 14. A: By structuring the system around use cases and business rules, rather than frameworks or tools. Chapter 18: Presenters and Humble Objects ----------------------------------------- - Q: What is the purpose of a Presenter in Clean Architecture? 15. A: To decouple the business logic from the UI by transforming data into a format the UI can display. - Q: What are Humble Objects? 16. A: Objects designed to have minimal logic, making them easy to test and maintain. Chapter 20: The Database is a Detail ------------------------------------ - Q: Why is the database considered a detail in Clean Architecture? 17. A: It is a mechanism, not the core of the system, and should not dictate the system's design. - Q: How should business rules interact with the database? 18. A: Through interfaces, allowing the database to be interchangeable. Chapter 23: The Conclusion -------------------------- - Q: What is the key takeaway from Clean Architecture? 19. A: Focus on creating systems that are easy to change, adapt, and maintain, while adhering to solid design principles. - Q: How does Clean Architecture improve testability? 20. A: By isolating business rules from external dependencies, making testing independent of frameworks or databases.

Use Quizgecko on...
Browser
Browser