Term | Explanation |
Abstraction |
|
Assertion | An assertion function is used in "Test Code". When an unexpected input values are provided, it causes the test containing it to fail. Example call: "assertEquals(expectedResult, actualResult)". |
Aware/Unaware | The class A contains a source code reference of the class B and therefore is aware of the class B. If you were to read only the source code of class A, you would know that there must be a class B. If there was no such reference, class A would be unaware of class B. |
Best Practices | Generally accepted guidelines aimed at increasing your programming productivity. If you take them seriously, you will save yourself a lot of pain. |
Concretion | It is the counterpart of "abstraction" and is sometimes called "implementation". It refers to classes that implement interfaces or inherit from abstract classes. It defines the internal workings of the functions it must provide by containing the "concrete" code. |
Constructor Injection | Dependency Injection performed by passing a dependency to an instance via constructor argument. |
Component |
|
Data Structure | A very simple type of class that contains only data and no logic. For example, a class that has only public fields but no methods. Another form is a class with private fields and simple corresponding getters and setters. |
Dependency | In the context of classes, a dependency is a field that must be initialized with an instance of another class in order for an object of that class to function properly. Often, the initialization is realized via Dependency Injection. |
Dependency Cycle | For example, an instance of one class requires an instance of another class to be constructed, and vice versa. So both classes need the other dependency to construct an instance. Therefore, it is impossible to construct either instance at all. Always make sure that the dependency graph looks like a directed acyclic graph. |
Dependency Injection (DI) | An object is injected with the dependencies it needs instead of constructing them itself. |
Dirty | 1. Messy, unreadable, or poorly designed code is referred to as "dirty code". Often associated with code written "quick-and-dirty" due to time pressure. 2. The term comes from the phrase "getting one's hands dirty" and refers to coding work that is considered monotonous, detailed, low-level and undemanding, but necessary. The term is often used in the context of I/O operations. Creating a database transaction, for example, is always handled very similarly and is not considered a fun task for experienced programmers who have done it many times. High-level design is more exciting because it requires more creativity from the developer and is more intellectually stimulating. |
Dynamic | Often refers to processes which appear at runtime when the code has already been executed and is "running". Examples:
|
Entity | 1. In an object context, this means that two objects of the same type that contain exactly the same values in their fields can be considered equivalent, but are still two separately existing entities. 2. In the context of software architecture, the term refers to classes that represent the model of the application and often represent things from the real world. For example, a banking application may have entity classes such as Account, Order, Customer, or Employee. They are often built like simple Data Structures, but may contain additional validation logic to impose logical constraints on their fields. For example, the integer field customer.age must always be between 0 and 150 because that is a logical constraint on people's ages, even though the integer data range is technically much larger. |
Field Injection | Dependency Injection is performed by forcibly injecting a dependency into an instance through the use of reflections that break even the encapsulation measures. This type of Dependency Injection is to be avoided. |
Inversion of Control (IoC) | Transfers the responsibility of defining the logic and order of Dependency Injections from the developer to computer. |
JavaBean | A design convention for data structures. Usually it means a class which has:
Often, DTO's and entities follow this convention. |
Logic | Any code with non-trivial complexity can be referred to as "logic". In contrast, for example, getters and setters have trivial complexity. |
Magic | "Code that handles complex tasks while hiding that complexity to present a simple interface."[sources] For example, the introduction of the Spring IoC container is quite simple, but the logic and wiring that goes on in the background is complex. |
Pain | Something causes pain when somebody spend unnecessary and great effort on a task that often could have been prevented by better code design. |
Production Code | The counterpart of the Test Code. It contains all the code required to run the application. |
Runtime | The time period in which the code is executed. For example:
|
Separation of Concerns | A principle that says that programs should be modular, with each module taking care of a different aspect of the program. |
Setter Injection | Dependency Injection performed by passing a dependency to an instance via setter method argument. |
Spring Bean | A term used in Spring Framework for an object that is contained in the IoC container to be injected into other beans and/or to receive dependency injections. It is one of many components/beans that are wired together via IoC to form the application when it is started. Not to be confused with JavaBeans. |
Static | Often refers to processes that depend non-running code. Examples:
|
Test Code | The counterpart of the Production Code. It is code that checks whether the production code works as expected. Test Code plays no role in the operation of an application. |
Test-Driven Development | A workflow in which the developer implements code in small steps, incrementally and iteratively, defining tests at each iteration. |
Wiring | The process of generating and injecting dependencies to set up an application performed by the IoC container. |