Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

IP - Lecture 1 Chapter-1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Insy341: Internet Engineering

Chapter 1- Overview of the


Internet and WWW
Overview of the Internet and WWW
 A computer program is an organized set of
instructions that causes a computer to behave in a
prescribed manner.
 Unambiguous, ordered, and with a definite outcome
 Informal definition: instructions written for a computer
 Formal definition: representation of an algorithm
 Human readable (usually) - source code
 Machine readable (eventually) - e.g. machine code/native code
 A programming language is a rigidly-defined
language designed to communicate instructions to
a machine.
 Means of defining solutions to problems in simple steps
 Each language has its own vocabulary, syntax and semantics.

2
Programming language can be:

 Low-level or high-level : is a way of describing how abstracted a


programming language is from the details of the computer.
 Low-level programming languages: such as machine code (first-
generation language) and assembly language (2GL).
 High-level programming languages: similar to natural human
languages and provide a greater level of abstraction, which can make
problems easier to solve. E.g. JavaScript and PHP
 Procedural: allows programs to be written in a more structured,
modular form. A list of instructions telling a computer what to do step
by step which is mainly based on the concept of procedure call
 Event-driven: flow of program execution is determined by events -
for example a user action such as a mouse click, key press, or a
message from the operating system or another program. E.g.
JavaScript, Visual Basic and Java..

3
Cont...
 Object-oriented: is one in which data and program logic are
contained in a single software component called an object. E.g.
C++, Java , PHP. Javascript is generally referred to as an
object-based language, because it does not support true
inheritance.
 Compiled is one which the source code written by the
programmer must be translated into machine code that the
computer can run directly. E.g. C++, Java , Visual Basic .NET
 Interpreted: is one which runs more directly on the
computer and does not have an explicit compilation step.
 Platform-independent or platform-specific

4
Programming and the Web
What is WWW? All its content…
 WWW (world wide web) is an interlinked hypertext
documents that are accessed via the Internet.
 A subset of internet, which consists of pages that can be
accessed using a Web browser.
 With a web browser, one can view web pages that may contain
text, images, videos, and other multimedia and navigate
between them via hyperlinks.
 HTTP (HyperText Transfer Protocol)- is a method used to
transfer Web pages to your computer.
 URL (Universal Resource Locator) - is name of file on a
remote computer.

5
What is Hypertext?
It is a method of presenting information, where selected words in text
can be expanded at any time to provide other information about the
word. Those words are links to other documents which may be text,
file, pictures etc.
??HTML (Hypertext Markup Language) is the language used to
create WWW pages and associated links.
??URLs (Uniform Resource Locators) are the addresses of the
WWW pages
e.g.: http://www.computing.dcu.ie/~cgreene/index.html ??

Features of the WWW are:


• Graphical, Easy to use
• Cross Platform, Distributed

6 • Dynamic, Interactive
To view / read the WWW pages you must have a special
application i.e. a web browser
A Web browser is an application program that provides a way to
look at and interact with all the information on the WWW.
Technically, a Web browser is a client program that uses the
Hypertext Transfer Protocol (HTTP) to make requests of Web
servers throughout the Internet on behalf of the browser user and
then displays web pages by interpreting the HTML that is used to
build theses pages on the web.
Browser is used To publish and deliver information on the web
you need a web Server
A web server is a program that runs on web sites and is
responsible for replying to a web browsers request for files

7
How??The Web works on a client / server model in which client
software (Browser) runs on a local computer while the Server
software runs on a web host.
To use the web you must make an Internet connection and then
launch your web browser.
 Type the URL you want to visit
 Browser makes a connection to a server using HTTP
protocol
 The Server then
 Accepts the connection
 Sends the file contents back to browser, and
 Closes the connection
 Web browsers interpret the html pages and display them
on screen, they can also display programs, animation,
graphics, video-conferencing, download files etc.,
Browsers also allow you to create and publish web pages.
8
Client <-> Server model

Internet

Database

Web Server Web Client

9
Cont…
 ??Client-side vs. Server-side
 Client refers to the end-user's computer or a program running
on that computer.
 Server refers to a central computer (or a program running on a
central computer) that clients connect to and interact with.
 Clients and servers connect via the Internet or a local
network such as an intranet.
 Differences between client-side and server-side are
important when programming for the World Wide Web.
 In most cases, creating a dynamic web site requires both
client-side programming (e.g. Javascript) and server-side
programming (e.g. PHP).

10
Web Processing Models
 HyperText Markup Language (HTML)
 The public files on the web servers are ordinary text files, much
like the files used by word-processing software.
 To allow Web browser software to read them, the text must be
formatted according to a generally accepted standard.
 The standard used on the web is Hypertext markup language
(HTML).
 Web of linked documents
 Unlimited scope of information content
 HTML uses codes, or tags, to tell the Web browser software how to
display the text contained in the document.
 For example, a Web browser reading the following line of text:
<B> Web server and client communicate with <I> platform-
independent Hypertext Transfer Protocol </I></B>
 recognizes the <B> and </B> tags as instructions to display the entire
line of text in bold and the <I> and </I> tags as instructions to display
the text enclosed by those tags in italics.
11
Addresses on the Web: IP Addressing

 Each computer on the internet does have a unique


identification number, called an IP (Internet Protocol)
address.
 The IP addressing system currently in use on the
Internet uses a four-part number.
 Each part of the address is a number ranging from 0 to
255, and each part is separated from the previous part
by period,
 For example, 106.29.242.17

12
IP Addressing
 The combination of the four IP address parts provides
4.2 billion possible addresses (256 x 256 x 256 x 256).
 This number seemed adequate until 1998.
 Members of various Internet task forces are working to
develop an alternate addressing system that will
accommodate the projected growth.
 However, all of their working solutions require
extensive hardware and software changes throughout
the Internet.

13
???Domain Name Addressing

Most web browsers do not use the IP address to


locate Web sites and individual pages.
They use domain name addressing.
A domain name is a unique name associated with a
specific IP address by a program that runs on an
Internet host computer.
This program, which coordinates the IP addresses
and domain names for all computers attached to it,
is called DNS (Domain Name System ) software.
The host computer that runs this software is called
a domain name server.
14
Domain Name Addressing
 Domain names can include any number of parts separated
by periods, however most domain names currently in use
have only three or four parts.
 Domain names follow hierarchical model that you can
follow from top to bottom if you read the name from the
right to the left.
 For example, the domain name bdu.edu.et is the computer
connected to the Internet at Bahir dar university which is
an educational institution (edu) found in ethiopia(et).
 No other computer on the Internet has the same domain
name.

15
Uniform Resource Locators
 The IP address and the domain name each identify a
particular computer on the Internet.
 However, they do not indicate where a Web page’s
HTML document resides on that computer.
 To identify a Web pages exact location, Web browsers
rely on Uniform Resource Locator (URL).
 URL is a four-part addressing scheme that tells the
Web browser:
 1.What transfer protocol to use for transporting the file
 2.The domain name of the computer on which the file
resides
 3.The pathname of the folder or directory on the
computer on which the file resides
 4.The name of the file

16
???Structure of a Uniform Resource Locators

pathname
protocol

http://www.chicagosymphony.org/civicconcerts/index.htm

Domain name filename

http => Hypertext Transfer Protocol

17
HyperText Transfer Protocol (HTTP)
HTTP is a set of rules, or protocols which governs the transfer of hypertext between two or
more computers.
The World Wide Web encompasses the universe of information that is available via HTTP.
 HTTP is based on the client/server principle.
 HTTP allows "computer A" (the client) to establish a connection to "computer B" (the
server) and make a request. The server accepts the connection initiated by the client and
sends back a response.
 An HTTP request identifies the resource that the client is interested in and tells the server
what "action" to take on the resource.
 When a user selects a hypertext link, the client program on their computer uses HTTP to
contact the server, identify a resource, and ask the server to respond with an action. The
server accepts the request, and then uses HTTP to respond to or perform the action.
 For example, when you select a hypertext link, you are identifying a particular resource,
and asking the server to send it back to your computer in a format that your computer can
display.
 Universal access
 HTTP is a "request-response" protocol specifying that a client will open a connection to
server then send request using a very specific format. Server will then respond and close
18
connection.
Programming the web
Client-side programming
• Used to define the operations performed on the client’s machine.
Required skills: XHTML, Javascript, Java, Dreamweaver,
Flash,SMIL, XML
 recall: HTML is good for developing static pages
 can specify text/image layout, presentation, links, …
 Web page looks the same each time it is accessed
 in order to develop interactive/reactive pages, must integrate
programming written in a separate programming language
e.g., JavaScript, JScript, VBScript programs are embedded in the
HTML of a Web page, with tags to identify the program component
 e.g., <script type="text/javascript"> … </script>
 the browser executes the program as it loads the page, integrating
the dynamic output of the program with the static content of HTML

19
 Adding dynamic elements to the Web
 HTML and XHTML pages are static - no real interactivity
with the user.
 Web programming languages such as Javascript and PHP can
be used to add interactivity to HTML/XHTML.
 Examples include responding to mouse and keyboard
actions, checking user input, building web pages
dynamically, inputting and displaying data, etc.

Programming vs. Scripting


 Not a concrete distinction, but...
 a scripting language is a simple, interpreted programming
language

20
Cont…
 a scripting language is a simple, interpreted programming language
 scripts are embedded as plain text, interpreted by application
 simpler execution model: don't need compiler or development
environment
 saves bandwidth: source code is downloaded, not compiled
executable
 platform-independence: code interpreted by any script-enabled
browser
 but: slower than compiled code, not as powerful/full-featured
 JavaScript: the first Web scripting language, developed by Netscape in
1995 syntactic similarities to Java/C++, but simpler & more flexible
(loose typing, dynamic variables, simple objects)

21
????Common scripting tasks
 Adding dynamic features to Web pages
 validation of form data
 image rollovers
 time-sensitive or random page elements
 handling cookies
 Defining programs with Web interfaces
 utilize buttons, text boxes, clickable images, prompts, frames
Limitations of client-side scripting
 since script code is embedded in the page, viewable to the world
 for security reasons, scripts are limited in what they can do
e.g., can't access the client's hard drive
 since designed to run on any machine platform, scripts do not contain
platform specific commands
 script languages are not full-featured e.g., JavaScript objects are crude,
not good for large project development

22
Server-Side programming
 What is server-side code?
 Software that runs on the server, not the client
 Receives input from
 URL parameters
 HTML form data
 Cookies: Cookies are files that a site asks the browser to store on the
computer of a user to save data to be used in a later session.
 HTTP headers: define various characteristics of the data that is
requested or the data that has been provided
 Can access server-side databases, e-mail servers, files, mainframes, etc.
 Dynamically builds a custom HTML response
for a client
 to define the operation to be performed on the server. Skills that
are often required: CGI, PHP, ASP, Perl, Java Servlet, …

23
 ???To develop a Web site, three steps:
1. Obtain the appropriate equipment
 Web Server – hardware and software
2. Register the Web Server to an Internet Service
Provider (ISP)
 Obtain the IP address and DNS address
3. Develop the contents
 Internet Programming

24
???System Architecture
 Multi-tier application (n-tier application)
◦ Information tier (data or bottom tier)
 Maintains data for the application
 Stores data in a relational database management
system (RDBMS)
◦ Middle tier
 Implements business logic and presentation logic
 Control interactions between application clients and
application data
◦ Client tier (top tier)
 Application’s user interface
 Users interact directly with the application through the
client tier
25
Goals of the Web
 Universal readership
 When content is available it should be accessible from any type of
computer, anywhere.
 Interconnecting all things
 Hypertext links everywhere.
 Simple authoring
 Goal is connectivity
 Achieved with Internet Protocol (IP)
 Stateless so survives failures – no need to backup
 Made scalable with end-to-end intelligence
 Transport Control Protocol (TCP)
 Sender does not send until receipt is acknowledged
 Amount sent is based on receiver’s current available buffer size
– so receiver won’t be flooded.
26
 Be strict when sending and tolerant when receiving
Web Design Principles
 Universal
 Decentralized
 Modular
 Extensible
 Scalable
 Accessible
 Forward/backwards compatibility
 Architecture of World Wide Web(a broad concept, try
to read more)

27

You might also like