Terms

The differences between continuous integration, continuous delivery, and continuous deployment:

Continuous Integration (CI) is a software engineering practice in which developers integrate code into a shared repository several times a day in order to obtain rapid feedback of the feasibility of that code. CI enables automated build and testing so that teams can rapidly work on a single project together.

Continuous delivery (CD) is a software engineering practice in which teams develop, build, test, and release software in short cycles. It depends on automation at every stage so that cycles can be both quick and reliable.

Continuous Deployment is the process by which qualified changes in software code or architecture are deployed to production as soon as they are ready and without human intervention.


Continuous Integration is merging all code from all developers to one central branch of the repo many times a day trying to avoid conflicts in the code in the future. The concept here is to have multiple devs on a project to keep the main branch of the repo to the most current form of the source code, so each dev can check out or pull from the latest code to avoid conflicts.

Continuous Integration is about automating build and test processes to make sure the resulting software is in a good state, ideally every time a developer changes code.

 

With Continuous Deployment, every change that is made is automatically deployed to production. This approach works well in enterprise environments where you plan to use the user as the actual tester and it can be quicker to release.

 

Continuous Delivery benefits business users because as soon as code is successfully accepted in the CI stage and a logical function can be tested, it is released to users.

In Spring, the objects that form the backbone of your application and that are managed by the Spring IoC container are called beans. A bean is an object that is instantiated, assembled, and otherwise managed by a Spring IoC container.

Inversion of Control, or IoC for short, is a process in which an object defines its dependencies without creating them. This object delegates the job of constructing such dependencies to an IoC container.

 

We can use the @MockBean to add mock objects to the Spring application context. The mock will replace any existing bean of the same type in the application context. If no bean of the same type is defined, a new one will be added. This annotation is useful in integration tests where a particular bean � for example, an external service � needs to be mocked. To use this annotation, we have to use SpringRunner to run the test

 

The Mockito.mock() method allows us to create a mock object of a class or an interface. Then, we can use the mock to stub return values for its methods and verify if they were called.

 

An effectively final variable is a variable whose value is never changed, but it isn't declared with the final keyword.

 

Composition in java is the design technique to implement has-a relationship in classes. We can use inheritance or Object composition in java for code reuse. ie.: person has-a job

Inheritance

Implementation

Composition

Aggregation

Association

Dependency

 

Encapsulation: 

Delegation: calling a method in different task to solve the issue 

Abstraction: leaving irrelevant parts - interface, abstract classes

Polymorphism: function override