Module10-JSF RMI WebServices
Module10-JSF RMI WebServices
Why JSF?
• JavaServer Faces (JSF) is a new standard Java
framework for building Web applications.
• Java specification for building component-
based user interfaces for web applications
• JSF offers a clean separation between
behavior and presentation for web
applications.
What is JSF?
• Java Server Faces (JSF) technology is a front
end framework which makes the creation of user
interface components easier by reusing the UI
components.
• JSF is designed based on the Model View
Controller pattern (MVC) which segregates the
presentation, controller and the business logic.
• UI Components: Text fields, list boxes,
checkboxes, labels, panels, radio buttons, and
other elements
JSF Features
// response.xhtml
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:head>
<title>Response Page</title>
</h:head>
<h:body>
<h1><h:outputText value="Hello #{user.userName}"/></h1>
<h:outputText value="Your Record has been Saved Successfully!"/>
</h:body>
</html>
Web services
• A web service makes software application resources
available over networks using standard technologies.
• A web service is a collection of open protocols and
standards used for exchanging data between
applications or systems
• Web services are based on standard interfaces and
hence they can communicate even if they are running
on different operating systems and are written in
different languages.
• Therefore, Web services are an excellent approach for
building distributed applications that must incorporate
diverse systems over a network.
What are Web services?
• Web services are client and server applications that communicate over
the World Wide Web’s (WWW) HyperText Transfer Protocol (HTTP).
• web services provide a standard means of interoperating between
software applications running on a variety of platforms and frameworks.
• Web services are characterized by their great interoperability and
extensibility, as well as their machine-processable descriptions, XML.
• Web services can be combined in a loosely coupled way to achieve
complex operations.
• Software applications written in various programming languages and
running on various platforms can use web services to exchange data over
computer networks like the Internet in a manner similar to inter-process
communication on a single computer.
• A web service:
– Publicly describes its own functionality through a
WSDL file
• WSDL is an XML, and it stands for Web Service Description
Language. WSDL describes all the methods available in the
web service, along with the request and response types. It
describes the contract between service and client.
– Communicates with other applications via XML
messages, often formatted with SOAP
– Employs a standard network protocol such as HTTP
Types of web services
• There are two types of web services:
– SOAP Web Services
– REST Web Services
SOAP
• SOAP is an XML-based protocol.
• SOAP stands for Simple Object Access Protocol.
• SOAP was intended to be a way to do remote
procedure calls to remote objects by sending XML
over HTTP.
REST Web Services
REST SOAP
• REST is a style of software • SOAP is a protocol or a set of
architecture. standards.
• REST can use SOAP because it • SOAP cannot use REST
is a concept and can use any because it itself is a protocol.
protocol like HTTP, SOAP etc.
• REST uses URI to expose • SOAP uses the service
business logic. interface to expose business
• REST inherits security logic.
measures from the underlying • SOAP defines its own security
transport protocols. layer.
• REST accepts different data • SOAP only works with XML
formats like, Plain Text, HTML, format.
JSON, XML etc.