1/22
Vocabulary practice flashcards covering software quality, architecture models, the Repository pattern, ORM, Domain-Driven Design concepts, and SOLID+T principles from Module 4.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Dependency Inversion Principle (DIP)
A software design principle stating that high-level modules must not depend on low-level modules, both must depend on abstractions, and abstractions must not depend on details.
High-Level Module
In the context of the Dependency Inversion Principle, a module that contains business logic and domain rules, positioned further away from technical implementation details.
Low-Level Module
In the context of the Dependency Inversion Principle, a module closely tied to technical details and implementation mechanics, such as database access, frameworks, or hardware drivers.
Layered Architecture Problem (with DIP)
An architectural issue where upper domain layers depend directly on data access or infrastructure layers below them, thereby violating the Dependency Inversion Principle.
Hexagonal Architecture (Ports and Adapters)
An architectural model where the business domain is placed at the stable center and all external elements (such as UI, APIs, and databases) interact with it through abstract ports and adapters.
Repository Pattern
An abstraction functioning as an in-memory warehouse to persist and retrieve domain objects while hiding the underlying complexity of persistence mechanisms.
Repository Scope Guideline
A rule stating that a repository should manage access to a single domain entity aggregate (e.g., a single portfolio repository rather than separate repositories for a portfolio and its stocks), and should normally not call another repository.
Object-Relational Mapping (ORM)
A concept and tooling (such as Hibernate in Java or Entity Framework in C#) that connects object-oriented programming to relational databases by mapping classes to tables and attributes to columns.
Advantages of ORMs
Key benefits including familiar object-oriented language syntax, reduction of boilerplate and repeated code, improved readability, and abstraction of database-specific query languages.
Disadvantages of ORMs
Drawbacks that include an overhead performance cost, reduced query flexibility compared to raw SQL, and the ongoing requirement to maintain and update the ORM library.
« Is-A » Premise
The requirement that an inheritance relationship must genuinely represent an 'is a' relationship (e.g., B is an A), preventing the improper use of inheritance purely to reuse methods.
Liskov Substitution Principle (LSP)
A design principle stating that objects of a child class must be able to replace objects of a parent class without harming the integrity or expected behavior of the application.
Formal Definition of LSP
Barbara Liskov's formal rule stating that if property q(x) is provable for all objects x of type T, then q(y) must be true for all objects y of type S, where S is a subtype of T.
Rectangle-Square Problem
A classic LSP violation where a Square subclass modifying width and height simultaneously violates the client assumption that a Rectangle base class can adjust width and height independently.
Level of Abstraction
The guideline that interface contracts must remain at the exact conceptual level of the capability being described, maintaining a strict minimum so subclasses are not forced to implement inapplicable concepts.
Open-Closed Principle (OCP)
A design principle stating that software entities should be open for extension but closed for modification, thereby reducing the scope of changes and preventing avalanche effects.
OCP Practical Limitation
The architectural reality that a system cannot respect OCP at 100%, as excessive adherence exponentially increases design complexity; engineers must use judgment to balance extensibility and maintainability.
Type-Switching Violation of OCP
A common anti-pattern where methods use if/else or switch statements on object types, or directly instantiate concrete types with new, requiring class modification whenever a new subclass is added.
Creational Object
A specialized object (such as a factory) whose sole responsibility is to decide which concrete implementation to instantiate, centralizing OCP-violating instantiations in one controlled location.
Domain Factory (DDD)
A Domain-Driven Design pattern whose purpose is to instantiate a domain business object for the first time, unlike a repository which dehydrates and rehydrates existing stored objects.
Single Responsibility Principle (SRP)
The SOLID principle stating that a class should have only one reason to change, meaning it must encapsulate a single, well-defined responsibility.
Interface Segregation Principle (ISP)
The SOLID principle stating that a client should never be forced to depend on interfaces containing methods that it does not use.
Tell, Don't Ask (TDA)
An object-oriented principle stating that an object should not retrieve data from another object to make decisions on its behalf, but rather tell that object what action to execute.