JEE - Spring - Spring Boot Flashcards
What is JEE ?
JEE is Jakarta EE, a java framework to build web applications
What are Key components in JEE ?
*Servlets
*JSP : Java ServerPages
*EJB : Enterprise Java Beans
*JMS : Java Message Service
*JTA : Java Transaction API
*JPA : Java Persistence API
*CDI : Context and Dependency Injection
*JAX-RS : Java API for RESTful Web Services
*JAX-WS : Java API for Web Services
Why we need application servers ?
JEE applications are deployed and run on application servers that support JEE specifications
Give some popular JEE application servers
*Apache Tomcat
*WildFly ( JBoss )
*GlassFish
*WebLogic ( by Oracle )
*WebSphere ( by IBM )
What is servlet ?
*Servlet is a JEE server-side component that handle HTTP requests/responses
*Servlet is a class which extends HttpServlet ,redefine methods like doGet(),doPost(),doPut(),doDelete(),doHead() , and make processes on server side after receiving HTTP requests.
*La méthode doX() est exécutée si la requête HTTP est envoyée avec la méthode X.
____________________________________________
method syntax : doGet(req,resp)
What are Sevlets lifecycle methods ?
*init() : invoked before app start
*service()
*destroy() : invoked before class object destroyed.
What is JSP ?
JSP is a technology that allows embedding java code directly in HTML for generating dynamic content
=> the code in jsp file gets compiled into a servlet by web container ( Tomcat ).
What is JPA ?
JPA is a specification for managing relational data in java apps.It provides an Object-Relational Mapping (ORM) mechanism to map java objects to database tables and vice versa
=> JPA eliminates the need for manual JDBC ( Java Database Connectivity ) code and simplifies database interactions.
=> JPA uses Entity Classes to represent database tables.
=> Common annotations : @Entity, @Id , @OneToMany …
What is JAX-RS ?
Used for creating RESTful WS, works over HTTP and stateless.REST based on HTTP methods ( GET,POST,PUT,DELETE,OPTIONS,HEAD…)
=> supports different data format : XML , JSON…
What is JAX-WS ?
Building SOAP WS. It supports only XML format.
What is Socket ?
Socket is an interface for network communication to receive/send data over network. It is commonly used in a client-server architecture where a client connects to a server with IP address and port number.
TCP sockets provide a reliable communication , while UDP sockets offer faster but less reliable communication
________________________________________
Example of sockets use : web browsers,chat apps, and real-time multiplayer games
What are Socket components ?
*IP Address : usually IPv4 or IPv6
*Port Number : port 80 for HTTP, 443 for HTTPS , 3306 for MySQL
*Protocol : TCP or UDP
What is Communication Process for Client-Server Model ?
*A client specifies IP address and port number.
*Once connection established , client and server can send/receive data through the socket
=>vice versa ( server instead of client ) for steps above
What is HTTP ?
HTTP (HyperText Transfer Protocol) is a protocol to restore data from a server
What is CORS ?
CORS ( Cross-Origin Resource Sharing ) is a security feature implemented by web browsers to prevent malicious websites from making unauthorized requests on a different domain ( origin ) than the one from which the page was served.It is a protocol that allows or restrict resources to be accessed by different origin.