Request/Response & MVC Pattern Flashcards

1
Q

What is the difference between JDBC & SpringJDBC?

A

SpringJDBC is an abstraction layer on top of JDBC making it easier to use providing a consistent way to create queries, handle requests, deal with exceptions, and automatically provides transactions.
JDBC allows java applications to access SQL databases in a standard way.

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

What is a web service?

A

A web service is any piece of software that makes itself available over the internet for client application.

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

What is an API?

A

An API(Application Programming Interface) defines the communication protocol and data exchange format that clients can use to access the service and exchange data.

An Api is a set of instructions or rules that allows applications to talk to each other and share data.

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

What is the difference between http: & https:?

A

https: are secure and http: are not?

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

What are RESTful Web services?

A

REST(Representational State Transfer) is web standards based architecture that uses Http protocol.

RESTful web services are loosely coupled, lightweight web services that are particularly well suited for creating APIs for clients spread out across the internet. Representational State Transfer (REST) is an architectural style of client-server application centered around the transfer of representations of resources through requests and responses. In the REST architectural style, data and functionality are considered resources and are accessed using Uniform Resource Identifiers (URIs), typically links on the Web. The resources are represented by documents and are acted upon by using a set of simple, well-defined operations.

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

What is the difference between RESTful web services & web services?

A
  • Webservices are a type of API which must be accessed through a network connection.
  • RESTful web services are a standardized architecture for building web APIs using HTTP methods.
    - uniform interface driven based on resources.
    - stateless
    - client/server based
    - layered(data, logic, interface)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between a GET and a POST?

A
  • GET is used for viewing data without changing it.

- POST is used to add something to the data.

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

What is the secure communication path?

A

protocol -> subdomain - > domain name -> port -> path -> query - > parameters -> fragment

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

What is object serialization and deserialization?

A

Changing a java object to the string representation of an object(JSON) is serialization.

JSON -> java object is deserialization

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

What is an annotation?

A

Annotations are tags that allow us to put metadata information to our source code.

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

What is dependency injection?

A

Dependency Injection is a design pattern that implements IoC. It inverts control of the instantiation of dependencies from the class using them to an dependency injection container. Rather than instantiating classes with “new” in our class, they will be injected into our class at runtime.

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

How does a JSON web Token work?

A

A common way to use JWTs is as OAuth bearer tokens. In this example, an authorization server creates a JWT at the request of a client and signs it so that it cannot be altered by any other party. The client will then send this JWT with its request to a REST API. The REST API will verify that the JWT’s signature matches its payload and header to determine that the JWT is valid. When the REST API has verified the JWT, it can use the claims to either grant or deny the client’s request.

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

What’s the difference between authentication & authorization?

A

Authentication is the “key” to the application. It lets you in, but does not say what you can do once you get in. (e.g. Login, New user Registration)

A door person checks IDs and allows entry into an event based on criteria like age or dress code.

Authorization (Access Control) says what a user can do one they have been permitted entry. (e.g. you can see only your paycheck, only a manager can assign work)

Rules inside the event determine what the person can do once inside, like not entry to staff-only areas, no stage diving, or only being able to order drinks after the event official begins.

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