Monday, December 3, 2018

SERVLETS

Java servlet processes or stores a Java class inJava EE that conforms to the Java Servlet API, a standard for implementing Java classes that respond to requests. Servlets could in principle communicate over any client–server protocol, but they are most often used with the HTTP.


Execution of Servlets : 
Execution of Servlets involves the six basic steps:
1.    The clients send the request to the web server.
2.    The web server receives the request.
3.    The web server passes the request to the corresponding servlet.
4.    The servlet processes the request and generate the response in the form of output.
5.    The servlet send the response back to the web server.
6.    The web server sends the response back to the client and the client browser displays it on the screen.
                                                                                                                                                                                                           
JAVA SERVLET PAGES
JavaServer Pages (JSP) is a technology that helps software developers create dynamically generated web pages based on HTML, XML, or other document types. Released in 1999 by Sun Microsystems,[1] JSP is similar to PHP and ASP, but it uses the Java programming language.
To deploy and run JavaServer Pages, a compatible web server with a servlet container, such as Apache Tomcat or Jetty, is required.

JAVA SERVER FACES
JavaServer Faces (JSF) is a MVC web framework that simplifies the construction of User Interfaces (UI) for server-based applications using reusable UI components in a page. JSF provides a facility to connect UI widgets with data sources and to server-side event handlers. The JSF specification defines a set of standard UI components and provides an Application Programming Interface (API) for developing components. JSF enables the reuse and extension of the existing standard UI components.

FACELETS
In computingFacelets is an open-source Web template system under the Apache license and the default view handler technology (aka view declaration language) for JavaServer Faces (JSF). The language requires valid input XML documents to work. Facelets supports all of the JSF UI components and focuses completely on building the JSF component tree, reflecting the view for a JSF application.


MODEL VIEW CONTROLLER

In MVC  model ,MVC is a presentation layer pattern. The entire Model-View-Controller exists in presentation layer.
·         Model is object holding data (usually just VOs) which are represented by View 
·         Controller is what gets the request (and may  populate the model) and calls the service layer. Then gets another (or  same) model and sends it back to View.
·         View is what displays model, and provides  components to capture user input. (It is usually UI components).

THREE TIER APPLICATION



·Presentation Tier- The presentation tier is the front end layer in the 3-tier system and consists of the user interface. This user interface is often a graphical one accessible through a web browser or web-based application and which displays content and information useful to an end user. This tier is often built on web technologies such as HTML5, JavaScript, CSS, or through other popular web development frameworks, and communicates with others layers through API calls.

·Application Tier- The application tier contains the functional business logic which drives an application’s core capabilities. It’s often written in Java, .NET, C#, Python, C++, etc.

·Data Tier- The data tier comprises of the database/data storage system and data access layer. Examples of such systems are MySQL, Oracle, PostgreSQL, Microsoft SQL Server, MongoDB, etc. Data is accessed by the application layer via API calls.

No comments:

Post a Comment