Chapter#6 - Web Technologies
Chapter#6 - Web Technologies
TECHNOLOGIES
ENGR.PRIHA
BHATTI(SED,SSUET) FOR WEB
APPLICATIONS
INTRODUCTION
Cookies
❏ A cookie is text which the Web application sends to the Web browser.
❏ The browser stores this text and sends it to the server on every HTTP request which it
makes.
❏ A cookie can generally store up to four kilobytes of any text a Web application chooses to
store in it. This text can be, for example, a unique ID to identify the user. Because the
cookie is returned to the server with every HTTP request, the unique ID can be used to
identify which user is accessing the page, and so can be used to track the user as they
move across the different pages in a Web application.
DOCUMENT-SPECIfiC TECHNOLOGIES
HTML
❏ HyperText Markup Language
❏ Primary document type for the web
- Transmitted using the HyperText Transfer Protocol
- Client sends request string (with parameters)
- Server returns a document
- Stateless protocol
❏ Describes document content and structure
- Precise formatting directives added later
- Content and structure in same document
HTML STRUCTURE
❏ HTML document is a text based representation of a tree of tags
❏ General structure:
<OUTERTAG attribute1=‘val1’ attribute2=‘val2’>
<INNERTAG attribute3=‘val3’>some text</INNERTAG>
</OUTERTAG>
CSS
❏ HTML was not meant to support styling information
- But browsers started supporting inline style changes to make web look better
❏ Inline styling information is problematic
- Difficult to change
- Lack of consistency
- No support for different display formats
- Bloats pages
- No support for some styling features
CONNECTING HTML TO CSS
❏ HTML document typically refers to external style sheet
<HEAD>
<LINK rel="stylesheet" type="text/css“ href="fluorescent.css">
</HEAD>
❏ Style sheets can be embedded:
<HEAD><STYLE type="text/css">
<!-- …CSS DEFINITIONS.. -->
</STYLE></HEAD>
XML
❏ Extensible Markup Language
- Based on SGML format
- Intended to facilitate data exchange
❏ Documents consist of tags and data
- Data is usually untyped characters
- Tags have names and attributes
❏ Document has tree structure
- Tags are nested
CLIENT SIDE: SCRIPTING
LANGUAGES(JAVASCRIPT)
❏ The most common scripting language
Originally supported by Netscape, eventually by IE
❏ Typically embedded in HTML page
Executable computer code within the HTML content
Interpreted at runtime on the client side
❏ Can be used to dynamically manipulate an HTML document
Has access to the document object model
Can react to events
Can be used to dynamically place data in the first place
Often used to validate form data
❏ Weak typing
VBSCRIPT
❏ Microsoft’s answer to JavaScript
- Never been supported by Netscape
- Less in use now
❏ Use <script type="text/vbscript">
❏ Similar to JavaScript
- Follows Visual Basic look and feel
- Possible to declare variables
- Use “option explicit” to force declaration
- Separates procedures and functions
CLIENT SIDE TECHNOLOGIES(JAVA APPLETS)
❏ Precompiled Java programs which can run independently within a browser
- Main applet class inherits from java.applet.Applet
❏ Sandboxed by a variety of security measures and functional limitations
- Cannot read/write most files on host
- Most network connections are blocked
<html>
<body>
<%response.write("Welcome to Hello World!")%>
</body>
</html>
ASP.NET
❏ ASP.NET was released in 2002 by Microsoft as a successor to ASP. It is also a server-side web
framework, open source, which is designed for the generation of dynamic web pages. The file
extension of ASP.NET pages are .aspx and are normally written in C# (C sharp). The latest version
of ASP.NET is ASP.NET 4.6.
❏ Example:
@{
var rank = 50;
}
<html>
<body>
@if (rank < 60)
{
<p>Welcome to Hello World!</p>
}
</body>
</html>
WEB SERVICES
The architecture of web service interacts among three roles: service provider, service requester, and service
registry. The interaction involves the three operations: publish, find, and bind.
The service provider hosts a network-associable module (web service). It defines a service description for
the web service and publishes it to a service requestor or service registry. These service requestor uses a find
operation to retrieve the service description locally or from the service registry. It uses the service description
to bind with the service provider and invoke with the web service implementation.
Service Provider
From an architectural perspective, it is the platform that hosts the services.
Service Requestor
Service requestor is the application that is looking for and invoking or initiating an interaction with a service.
The browser plays the requester role, driven by a consumer or a program without a user interface.
Service Registry
Service requestors find service and obtain binding information for services during development.
WEB SERVICES(OVERALL ARCHITECTURE)
❏ UDDI
- Information on available web service
❏ WSDL
- A description of how to communicate using the web service
❏ SOAP
- Protocol for exchanging messages
UNIVERSAL DESCRIPTION, DISCOVERY, AND
INTEGRATION (UDDI)
❏ Universal Description, Discovery, and Integration (UDDI) provides the definition of a set of
services supporting the description and discovery of
(1) businesses, organizations, and other Web Services providers,
(2) the Web Services they make available, and
(3) the technical interfaces which may be used to access those services. The idea is to "discover"
organizations and the services that organizations offer, much like using a phone book or dialing
information.
Registration consists of:
Detailed business data, organized by relevant business classifications. The UDDI version of the yellow pages
classifies businesses according to the newer NAICS (North American Industry Classification System) codes.
Information about a company's key business processes, such as operating platform, supported programs,
purchasing methods, shipping and billing requirements, and other higher-level business protocols.
WEB SERVICES DESCRIPTION LANGUAGE (WSDL)
WSDL stands for Web Services Description Language. It is the standard format for describing a web
service. WSDL was developed jointly by Microsoft and IBM. WSDL is written in XML
Web Services Description Language (WSDL) is an XML-based file that basically tells the client
application what the web service does. The WSDL file is used to describe in a nutshell what the web
service does and gives the client all the information required to connect to the web service and use
all the functionality provided by the web service.
• The WSDL file contains the location of the web service and
• The methods which are exposed by the web service.
Below is the general structure of a WSDL file
• Definition
• Data Types
• Messages
• Port type
• service
SIMPLE OBJECT ACCESS PROTOCOL (SOAP)
❏ It is an XML-based messaging protocol for exchanging information among computers. SOAP is an
application of the XML specification.
• SOAP is a communication protocol designed to communicate via Internet.
• SOAP can extend HTTP for XML messaging.
• SOAP provides data transport for Web services.
• SOAP can exchange complete documents or call a remote procedure.
• SOAP can be used for broadcasting a message.
• SOAP is the XML way of defining what information is sent and how.
• SOAP enables client applications to easily connect to remote services and invoke remote methods.
BIBLIOGRAPHY
Mandatory reading
Chapter 6