Request/Response & MVC Pattern Flashcards
What is the difference between JDBC & SpringJDBC?
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.
What is a web service?
A web service is any piece of software that makes itself available over the internet for client application.
What is an API?
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.
What is the difference between http: & https:?
https: are secure and http: are not?
What are RESTful Web services?
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.
What is the difference between RESTful web services & web services?
- 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)
What is the difference between a GET and a POST?
- GET is used for viewing data without changing it.
- POST is used to add something to the data.
What is the secure communication path?
protocol -> subdomain - > domain name -> port -> path -> query - > parameters -> fragment
What is object serialization and deserialization?
Changing a java object to the string representation of an object(JSON) is serialization.
JSON -> java object is deserialization
What is an annotation?
Annotations are tags that allow us to put metadata information to our source code.
What is dependency injection?
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 does a JSON web Token work?
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.
What’s the difference between authentication & authorization?
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.