0% found this document useful (0 votes)
52 views9 pages

Web Development With Java

Uploaded by

Prince Jutt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views9 pages

Web Development With Java

Uploaded by

Prince Jutt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

www.SalmanAdeeb.wixsite.com/DAE-CIT-books www.facebook.

com/Gctpak

COURSE CODE: CIT 303 by: Instructor IT Miss.Saba

WEB DEVELOPMENT WITH JAVA

Chp.01 Introduction to web development

1-What is a Web Application?


A web application is a computer program that utilizes web browsers
and web technology to perform tasks over the internet.

Web applications are usually coded into browser-supported


languages such as Javascript and HTML as these languages rely on the
browser to render the program executable.
In computing, a web application or web app is a client–server
computer program which the client runs in a web browser. Common
web applications include webmail, online retail sales, online auctions,
wikis, instant messaging services and many other functions.
Client-Server: denoting a computer system in which a central server
provides data to a number of networked workstations.

Hyper Text Markup Language(HTML):


HTML is the standard markup language for creating Web pages.

 HTML stands for Hyper Text Markup Language


 HTML describes the structure of Web pages using markup
 HTML elements are the building blocks of HTML pages
 HTML elements are represented by tags
 HTML tags label pieces of content such as "heading", "paragraph",
"table", and so on

www.youtube.com/AdeebTechnologyLab www.facebook.com/Adeeb.Technology.Lab
www.SalmanAdeeb.wixsite.com/DAE-CIT-books www.facebook.com/Gctpak

 Browsers do not display the HTML tags, but use them to render the
content of the page

For example:
<!DOCTYPE.html>
<html>
<head>
<title>Page.Title</title>
</head>
<body>

<h1>MyFirstHeading</h1>
<p>Myfirstparagraph.</p>

</body>
</html>

JAVASCRIPT:
JavaScript is a programming language commonly used in web
development.
Web Page:
A web page is a document that is suitable for the World Wide
Web and web browsers. A web browser displays a web page on
a monitor or mobile device.
webpage is a document commonly written in HyperText Markup
Language (HTML) that is accessible through the Internet or other
network using an Internet browser
Website:
A set of related web pages located under a single domain name. and
published on at least one web server.
For example www.tevta.gop.pk

www.youtube.com/AdeebTechnologyLab www.facebook.com/Adeeb.Technology.Lab
www.SalmanAdeeb.wixsite.com/DAE-CIT-books www.facebook.com/Gctpak

2-HTTP Basics:
HTTP (Hypertext Transfer Protocol) is the set of rules for transferring
files (text, graphic images, sound, video, and other multimedia files)
on the World Wide Web. As soon as a Web user opens their
Web browser, the user is indirectly making use of HTTP. HTTP is an
application protocol that runs on top of the TCP/IP suite of protocols
(the foundation protocols for the Internet).

World Wide Web: The World Wide Web (WWW) is combination of all
resources and users on the Internet that are using the Hypertext
Transfer Protocol (HTTP).
Protocol : When computers communicate with each other, there
needs to be a common set of rules and instructions that each
computer follows. A specific set of communication rules is called a
protocol. Some examples of these different protocols include PPP,
TCP/IP, SLIP, HTTP, and FTP.

3-How HTTP works?


HTTP is a request response protocol to communicate asynchronously
between client and server. Mostly in HTTP a browser acts as a client
and a web-server like Apache or IIS acts as server. The server which
hosts the files (like html , audio , video files etc) responses to the
client. Depending on the request a response contains the status of
the request.

www.youtube.com/AdeebTechnologyLab www.facebook.com/Adeeb.Technology.Lab
www.SalmanAdeeb.wixsite.com/DAE-CIT-books www.facebook.com/Gctpak

A client (browser) submits an HTTP request to the server; then the


server returns a response to the client. The response contains status
information about the request and may also contain the requested
content.
4-HTTP Methods/Requests.
 GET
 POST
 PUT
 HEAD
 DELETE
 PATCH
 OPTIONS

1-GET is used to request data from a specified resource. GET is one


of the most common HTTP methods.

2-POST is used to send data to a server to create/update a resource

3-PUT is used to send data to a server to create/update a resource.

4-HEAD is almost identical to GET, but without the response body

5-The DELETE method deletes the specified resource.

www.youtube.com/AdeebTechnologyLab www.facebook.com/Adeeb.Technology.Lab
www.SalmanAdeeb.wixsite.com/DAE-CIT-books www.facebook.com/Gctpak

6-The OPTIONS method describes the communication options for the


target resource.

5-Server side and Client side Programming


Server side programming:-
It is the program that runs on server dealing with the generation of
content of web page.
1) Querying the database
2) Operations over databases
3) Access/Write a file on server.
4) Interact with other servers.
5) Structure web applications.
6) Process user input. For example if user input is a text in search
box, run a search algorithm on data stored on server and send the
results

Examples :
The Programming languages for server-side programming are :
1) PHP
2) C++
3) Java and JSP
4) Python
5) Ruby on Rails

PHP: Hypertext Preprocessor (or simply PHP) is a server-side


scripting language designed for Web development, but also used as
a general-purpose programming language. PHP code may be
embedded into HTML code, or it can be used in combination with
various web template systems, web content management systems,
and web frameworks.

Syntax:
<!DOCTYPE html>
<html>
<head>

www.youtube.com/AdeebTechnologyLab www.facebook.com/Adeeb.Technology.Lab
www.SalmanAdeeb.wixsite.com/DAE-CIT-books www.facebook.com/Gctpak

<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>

C++ : C++ is a general purpose language in computer programming.


It is a middle level language that can be used for several purposes in
the computer industry. C++ language may not always be the most
preferred programming language, but there are many aspects of
software programming that cannot be done without the use of C++.

Java and JSP:

Java - Java is a programming language that produces software for


multiple platforms. When a programmer writes a Java application,
the compiled code (known as bytecode) runs on most operating
systems (OS), including Windows, Linux and Mac OS.

JSP - Java Server Page (JSP) is a technology for controlling the


content or appearance of Web pages through the use of servlets,
small programs that are specified in the Web page and run on the
Web server to modify the Web page before it is sent to the user who
requested it.

Java Servlet - Servlet technology is used to create web application


(resides at server side and generates dynamic web page).

Client-side Programming:
It is the program that runs on the client machine (browser) and deals
with the user interface/display and any other processing that can
happen on client machine like reading/writing cookies.

1) Interact with temporary storage


2) Make interactive web pages

www.youtube.com/AdeebTechnologyLab www.facebook.com/Adeeb.Technology.Lab
www.SalmanAdeeb.wixsite.com/DAE-CIT-books www.facebook.com/Gctpak

3) Interact with local storage


4) Sending request for data to server
5) Send request to server
6) work as an interface between server and user

The Programming languages for client-side programming are:

1) Javascript
2) VBScript
3) HTML
4) CSS
5) AJAX

Javascript : JavaScript is a dynamic computer programming


language. It is lightweight and most commonly used as a part of web
pages, whose implementations allow client-side script to interact
with the user and make dynamic pages. It is an interpreted
programming language with object-oriented capabilities.

HTML : HTML is the standard markup language for creating Web


pages.

 HTML stands for Hyper Text Markup Language


 HTML describes the structure of Web pages using markup
 HTML elements are the building blocks of HTML pages

CSS: stands for Cascading Style Sheets


 CSS describes how HTML elements are to be displayed on
screen, paper, or in other media
 CSS saves a lot of work. It can control the layout of multiple
web pages all at once
 External stylesheets are stored in CSS files

www.youtube.com/AdeebTechnologyLab www.facebook.com/Adeeb.Technology.Lab
www.SalmanAdeeb.wixsite.com/DAE-CIT-books www.facebook.com/Gctpak

Web Application Layers:


The Three Layer Model:-
This model of web application development is Very
Similar to the Service layer/Domain layer/Data layer
Infect the idea named as 3-Tier Architecture. Its construction is 3-
Tier once over the other being the application the Set of them
working together.
The benefit of using layered model in software
development are in the way that is easier to know exactly what each
part of the application does. It makes easier to construct application,
to debug it & to maintain & reuse the code.
For Example;
If it is needed to exchange some details in the
presentation layer of the context what the business rule
And data model do not change only one layer is affected.

1. Presentation layer:
The outermost layer in this kind of model deals
with the presentation of content & Interaction with the user. It can
be called view/presentation UI. In this layer the application shows to
be what is needed to be seen and give the tools for interaction. The
extract kind of interaction depend on the application. One can create
a web app that only shows information to the user without any kind
of interaction, not even hyper link to be clicked. This layer
communicate with the business layer.

2. Business layer:
The central layer of the model deals with the logic of
the programme. It receives data
From the upper layer & transform It under the inner application
logics. It also retrieve data from the deepest data level & uses the
logic.

www.youtube.com/AdeebTechnologyLab www.facebook.com/Adeeb.Technology.Lab
www.SalmanAdeeb.wixsite.com/DAE-CIT-books www.facebook.com/Gctpak

It Includes:-
1. Performing all required Calculation & validation
2. Managing all work flow
3. Managing all data access from the presentation layer.

3. Data layer:
The deepest level in the three layer architecture is data
layer which deals with the data
Retrieval from its source. It is an abstraction to get plain data that
can be in a wide variety of forms. Its play a huge role on the re-
usability and exchange of technologies used in this layer are
Database Management system like My SQL.

www.youtube.com/AdeebTechnologyLab www.facebook.com/Adeeb.Technology.Lab

You might also like