Lesson-1-web-app-web-services (1)
Lesson-1-web-app-web-services (1)
Introduction to Advanced
Web Programming
1
Session Learning Outcomes
• At the end of this Topic, the learner should be able
to:
2
Web Programming
• Web programming refers to the writing, markup
and coding involved in Web development, which
includes Web content, Client side and server
scripting.
• web programming can be divided into Client
Side and Server Side
3
Client Side vs Server Side
Client-side scripting Server-side scripting
Its main function is to provide the requested Its primary function is to manipulate and provide
output to the end user. access to the respective database as per the
request.
HTML, CSS, and JavaScript are used. PHP, Python, Java, Ruby are used.
4
Web Application.
• A Web application is a program or software created
as a result of web programming and is normally
stored on a remote server.
• a web application consists of a frontend-GUI, a
middleware-business logic and a database(data
storage)
5
Web 1.0
6
Web 1.0
8
Web 2.0
9
Web 3.0
The first and most reliable Because of developments in web Web 3.0 is the next break
internet in the 1990s. technologies such as Javascript, in the evolution of the
Provided limited info and HTML5, CSS3, etc., and Web 2.0 Internet, allowing it to
little to no user made the internet a lot more understand data in a
interaction, interactive. human-like manner.
Consumers struggled to
Many web inventors, including This will enable the
locate valuable
the above-mentioned Jeffrey intelligent creation and
information in Online 1.0
Zeldman, pioneered the set of distribution of highly
since there were no
technologies used in this tailored content to every
algorithms to scan
internet era. internet user.
through websites.
11
Web Services
• A web service is a software application that
communicates with another software for the
purposes of exchanging data between the apps
using a collection of open protocols and
standards.
12
Service Provider and Consumer
• SERVICE CONSUMER-Client 13
Service Provider and
Consumer(cont.)
• EXAMPLE: While speaking to your friend over
telephone, Medium is the phone and format is the
common language(e.g English) that both of you can
understand
14
Software Interoperability
• Refers to the functionality of different programs to exchange
information, share files and use the same protocols.
• Case study: TUM SIMS and SAGE: TUM SIMS uses PHP and
JavaScript while Sage ACCPAC uses C#.
16
REST Architecture and API’s
• REST, a term coined by Roy Fielding in 2000 is an
acronym for REpresentational State Transfer.
17
REST Architecture and API’s
• REST can be used to create APIs or just web apps that allow
you to perform CRUD (create, read, update, and delete)
operations between a clients and a servers.
18
Rest API Examples
Twitter: Twitter API permits third-party applications to access and write
data from Twitter. Write and post tweets, share tweets, and read profiles
using it. This API is handy for obtaining and analyzing massive quantities
of tweets regarding certain subjects.
Spotify: Spotify's web API lets customers obtain information about artists,
songs, albums, and playlists on the Spotify platform. You may also use it to
create playlists, stop and play music, shuffle tracks, and do various other
things.
19
REST Principles
• REST defines a set of principles or constraints to be followed
while designing a service for communication or data
exchanged between two applications.
• Client -Server
• Uniform interface
• Statelessness
• Cacheable
• Layered System
20
1.Client-Server
• Both the client and the server are completely autonomous
in every way.
21
2. Statelessness
• No client context shall be stored on the server between
requests. The client is responsible for managing the state
of the application.
23
Cacheable
o Caching is the ability to store copies of
frequently accessed data in several places
along the request-response path.
24
Layered System
• An API may have multiple layers such as proxy servers or
load balancers, and the endpoint server may deploy
additional servers to formulate a response.
25
Application Programming
Interface(API)
• Software apps written in different languages use API’s to
integrate and interoperate.
26
How REST API works
REST APIs employ HTTP requests to communicate with
databases to do routine tasks like creating, reading, updating,
and deleting entries (also known as CRUD) within a resource.
27
Methods of Rest API(cont.)
It defines a set of functions (GET, PUT, POST, DELETE) that
clients use to access server data. The functions used are:
28
Software Architecture, Design &
Benefits
• A software architecture is a structure that describes software's major
components, their relationships and how they interact with each other.
29
1. Client Server
• Most Architecture
of the web applications are based on
client server architecture.
Client: Client process is requester of the service
or information.
Example: Browser, Online chat client, Email client etc.
o Server: Server process accepts the request of
the client, performs the processing, gathers the
required information.
o Example: Print server, Web server, Database server,
chat server, FTP server etc.
Medium of communication of client and server:
It defines the path by which client and server
communicate with each other. E.g.-Internet, Intranet,
Bluetooth network etc.
30
2. Layered/Tiered
An Architecture
improvement over the client/server
architecture pattern.
Most commonly used architectural pattern.
31
3. Service-Oriented
Architecture (SOA)
Service-oriented architecture (SOA) is a method of software
development that uses software components called services to
create business applications.
Each service provides a business capability, and services can also
communicate with each other across platforms and languages.
32
4. Micro Services
Micro services, or micro service architecture, is an
approach to application development in which a large
application is built as a suite of modular components or
services.
35