Angular/Spring QC Flashcards

1
Q

What is Http Client?

A

A service class that is a simplified client HTTP API for Angular applications.

The HttpClient Module is already included when creating a new Angular app. We just need to register it in our Angular application. Import HttpClient into the app.module.ts file, to make use of the HttpClient service.

Also, include HttpClient in @NgModule’s imports array.

The HttpClient service is used for communication between front-end web apps and backend services. it contains the usual http request methods. (get, put, post etc)

All HttpClient methods return an Observable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an Observable?

A

Observables provide support for passing messages between parts of your application. We can use observables for event handling, asynchronous programming, and handling multiple values.

Observables define a function for publishing values, but it is not executed until a consumer subscribes to it. subscribe() unsubscribe()

An observable can deliver multiple values of any type

An RxJS Subject is a special type of Observable that allows values to be multicasted to many Observers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Publisher/Subscriber Design Pattern

A

A design pattern that describes the flow of messages between applications, devices, or services.

A message is published by Publishers to a Channel, that will be consumed by all Subscribers monitoring that channel.

in Pub-Sub pattern, publishers and subscribers don’t need to know each other.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Spring Framework

A

The Spring Framework acts as an inversion of control container, used to create loosely coupled Java applications by utilizing dependency injection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Spring

A

Spring is an umbrella term for a family of frameworks which can be utilized to rapidly create loosely coupled Java applications.

This loose coupling allows developers to focus on business logic for applications as Spring handles the infrastructural needs.

Dependency Injection is the core feature of the Spring frameworks, resulting from the framework acting as an inversion of control container.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Spring Core

A

The Core Container provide the basic framework for the IoC container and dependency injection.

It consists of: Core(IOC) & Beans(BeanFactory, used for dependency injection); Context; SpEL (Spring Expression Language):

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

ApplicationContext

A

ApplicationContext represents the Spring IoC container and is used to instantiate, assemble and manage beans.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Spring Data Access/Integration Frameworks

A

The Data Access/Integration layer provides support for database management. Layers of abstraction for ease of use.

JDBC: A module which provides a layer of abstraction for JDBC

ORM: A module which provides integration layers for ORM APIs, such as JPA and Hibernate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

AOP (Aspect Oriented Programming)

A

Aspect-oriented programming (AOP) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns.
This allows behaviors that are not central to the business logic (such as logging) to be added to a program without cluttering the code core to the functionality.

In AOP the unit of modularity is the aspect

Aspect-oriented programming entails breaking down program logic into distinct parts, called concerns(Cohesive areas of functionality).

AOP implementations encapsulate each concern in one place to avoid cross cutting.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Inversion of Control

A

Inversion of Control is a design principle in which control over certain parts of object-oriented design is inverted to achieve loose coupling.

i.e. The framework has control rather than the developer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Dependency Injection

A

A design pattern that removes dependencies by providing the dependencies from an external source. Helps to create more loosely coupled applications.

Dependency Injection can occur through constructor injection where the dependencies are provided through the constructor, or setter injection
where the dependencies are provided through the objects setters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Spring Bean

A

created by bean factory or the application context

Term used for objects created in spring which form the backbone of an application. They are created and managed by the IOC container.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Lombok

A

Java Library used to reduce boilerplate code by auto-generating the required code at compile time. Can be used to generate boilerplate code for objects such as models.

annotations:
@Getter                   @Setter
@RequiredArgsConstructor
@ToString             @EqualsAndHashCode
@Data: includes the above annotations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Stereotypes

A

Stereotypes are a number of built in annotations which are used as markers to declare obects as a bean, define their name and clarify to a developer what the bean will be used for.

@Component generic stereotype that declares object as bean.
@Repository, @Service, 
@Controller:  Marks a class as a spring MVC Controller which allows use of handler mapping annotations.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

@Autowired

A

Used to properly configure beans. This annotation injects the bean based on their type.

Commonly used with the singleton bean design pattern.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly