1
Advance Internet
Techniques
Present by:
Ms.Azza Zeinelabdin Karrar
2008 Pearson Education, Inc. All rights reserved.
2
1
Introduction to
Computers and
the Internet
2008 Pearson Education, Inc. All rights reserved.
3
OBJECTIVES
In this Lecture you will learn:
Basic computing concepts.
The different types of programming
languages.
The evolution of the Internet and the World
Wide Web.
What Web 2.0 is and why it’s having such
an impact among Internet-based and
traditional businesses.
What Rich Internet Applications (RIAs) are
and the key software technologies used to
build RIAs.
2008 Pearson Education, Inc. All rights reserved.
4
1.1 Introduction
1.2 What Is a Computer?
1.3 Computer Organization
1.4 Machine Languages, Assembly Languages and High-Level
Languages
1.5 History of the Internet and World Wide Web
1.6 World Wide Web Consortium (W3C)
1.7 Web 2.0
1.8 Personal, Distributed and Client/Server Computing
1.9 Hardware Trends
1.10 Key Software Trend: Object Technology
1.11 JavaScript: Object-Based Scripting for the Web
1.12 Browser Portability
1.13 C, C++ and Java
1.14 BASIC, Visual Basic, Visual C++, C# and .NET
1.15 Software Technologies
2008 Pearson Education, Inc. All rights reserved.
5
1.1 Introduction
Software
– Instructions to command the computer to perform actions and
make decisions.
– JavaScript and PHP are popular software development languages
for web-based applications.
Computer development
– Computer use increasing in most fields
– Computer costs and size decreasing
2008 Pearson Education, Inc. All rights reserved.
6
1.1 Introduction (Cont.)
Applications
– Prepares for higher learning in C++, Java, C#, Visual Basic.NET as well as
object-oriented programming
– Allows development of applications with graphical user interfaces (GUIs)
- Multimedia capabilities
- Integration with the Internet and World Wide Web
– Apply database technologies
– Applications that are not limited to the desktop
– Portability
- Multiple platforms (i.e., different types of computers running
different operating systems).
2008 Pearson Education, Inc. All rights reserved.
7
1.2 What is a Computer?
Computer
– Device capable of
- Performing computations
- Making logical decisions
– Works billions of times faster than human beings
– Fastest supercomputers today
- Perform hundreds of billions of additions per second
2008 Pearson Education, Inc. All rights reserved.
8
1.2 What is a Computer? (Cont.)
Programs
– Sets of instructions that process data
– Guide computer through orderly sets of actions specified by
computer programmers
Computer system
– Comprised of various hardware devices
- Keyboard
- Screen
- Disks
- Memory
- DVD drives
- Processing Units
2008 Pearson Education, Inc. All rights reserved.
9
1.3 Computer Organization
Every computer divided into six units
1. Input unit
- “Receiving” section of computer
- Obtains data from input devices
Usually a keyboard, mouse, disk, scanner, uploads
(photos and videos) and networks (Internet)
- Places data at disposal of other units
2. Output unit
- “Shipping” section of computer
- Puts processed info on various output devices
Screens, paper printouts, speakers
- Makes info available outside the computer (e.g., Internet)
2008 Pearson Education, Inc. All rights reserved.
10
1.3 Computer Organization (Cont.)
3. Memory unit
- Rapid access, low capacity “warehouse”
- Retains information entered through input unit
- Retains info that has already been processed until can be sent to
output unit
- Often called memory, primary memory, or random access memory
(RAM)
4. Arithmetic and Logic Unit
- “Manufacturing” section of computer
- Performs calculations (addition, subtraction, multiplication and
division)
- Contains decision mechanisms and can make comparisons
2008 Pearson Education, Inc. All rights reserved.
11
1.3 Computer Organization (Cont.)
5. Central Processing Unit (CPU)
- “Administrative” section of computer
- Coordinates and supervises other sections
- Multiple CPUs (multiprocessors)
6. Secondary storage unit
- Long-term, high-capacity “warehouse”
- Stores programs or data not currently being used by other
units on secondary storage devices (like CDs and DVDs)
- Takes longer to access than primary memory
2008 Pearson Education, Inc. All rights reserved.
12
1.4 Machine Languages, Assembly
Languages and High-Level Languages
Three general types of programming languages
– Machine languages
– Assembly languages
– High-level languages
2008 Pearson Education, Inc. All rights reserved.
13
1.4 Machine Languages … (Cont.)
Machine languages
– “Natural language” of a computer
– Defined by hardware design of computer
– Generally consists of strings of numbers
– Are machine dependent
– Cumbersome for humans
- Example: Adding overtime pay to base pay and storing the
result in gross pay
+1300042774
+1400593419
+1200274027
– Slow and tedious for most programmers
2008 Pearson Education, Inc. All rights reserved.
14
1.4 … Assembly Languages…(Cont.)
Assembly languages
– Programmers began using English-like abbreviations to
substitute for machine languages
– Represents elementary operations of computer
– Translator programs called assemblers convert
assembly-language to machine-language
– Example:
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
2008 Pearson Education, Inc. All rights reserved.
15
1.4 Machine Languages, Assembly Languages
and High-Level Languages (Cont.)
High-level languages
– Developed as computer usage increased, assembly
language proved inadequate and time-consuming
– Single statements can be written to accomplish
substantial tasks
– Translator programs called compilers
– Allow programmers to write instructions almost like
every-day English
– Example:
grossPay = basePay + overTimePay
2008 Pearson Education, Inc. All rights reserved.
16
1.4 Machine Languages, Assembly Languages
and High-Level Languages (Cont.)
High-level languages (II)
– Much more desirable from programmer’s standpoint
– Specific languages include
- C, C++, Visual Basic.NET, C# and Java
- Among most powerful and widely used languages
today
– Interpreter programs developed to execute high-
level programs without compiling
- Popular in program development environments
2008 Pearson Education, Inc. All rights reserved.
17
1.4 Machine Languages, Assembly Languages
and High-Level Languages (Cont.)
High-level languages (III)
– Once program developed, compiled version made
– several key programming languages
- JavaScript, ActionScript, PHP and Ruby on Rails—each
of these scripting languages is processed by
interpreters
– Study markup languages
- XHTML and XML, which can be processed by
interpreted scripting languages
- Achieve their goal of portability across a variety of
platforms
2008 Pearson Education, Inc. All rights reserved.
18
Performance Tip 1.1
Interpreters have an advantage over
compilers in scripting. An interpreted
program can begin executing as soon as it is
downloaded to the client’s machine, without
the need to be compiled before it can execute.
On the downside, scripts generally run much
slower than compiled code.
2008 Pearson Education, Inc. All rights reserved.
19
Portability Tip 1.1
Interpreted languages are more portable than
compiled languages. Interpreters can be
implemented for each platform on which the
interpreted languages need to execute.
2008 Pearson Education, Inc. All rights reserved.
20
Software Engineering Observation 1.1
Interpreted languages are more dynamic than
compiled languages. For example, server-side
applications can generate code in response to
user interactions, and that code can then be
interpreted in a browser.
2008 Pearson Education, Inc. All rights reserved.
21
1.5 History of the Internet and World
Wide Web
ARPANET
– Implemented in late 1960’s by ARPA (Advanced
Research Projects Agency of DOD)
– Networked computer systems of a dozen universities
and institutions with 56KB communications lines
– Grandparent of today’s Internet
– Intended to allow computers to be shared
– Became clear that key benefit was allowing fast
communication between researchers – electronic-mail
(email)
2008 Pearson Education, Inc. All rights reserved.
22
1.5 History of the Internet and World
ARPA’s goals
Wide Web
– Allow multiple users to send and receive info at same
time
– Network operated packet switching technique
- Digital data sent in small packages called packets
- Packets contained data, address info, error-control info and
sequencing info
- Greatly reduced transmission costs of dedicated
communications lines
– Network designed to be operated without centralized
control
- If portion of network fails, remaining portions still able to
route packets
2008 Pearson Education, Inc. All rights reserved.
23
1.5 History of the Internet and World
Wide Web
Transmission Control Protocol (TCP)
– Name of protocols for communicating over ARPAnet
– Ensured that messages were properly routed and that
they arrived intact
Organizations implemented own networks
– Used both for intra-organization and communication
2008 Pearson Education, Inc. All rights reserved.
24
1.5 History of the Internet and World
Wide Web
Huge variety of networking hardware and software appeared
– ARPA achieved inter-communication between all platforms with
development of the IP
- Internetworking Protocol
- Current architecture of Internet
– Combined set of protocols called TCP/IP
The Internet
– Limited to universities and research institutions
– Military became big user
– Next, government decided to access Internet for commercial
purposes
2008 Pearson Education, Inc. All rights reserved.
25
1.5 History of the Internet and World
Wide Web
Internet traffic grew (I)
– Businesses spent heavily to improve Internet
- Better service their clients
– Fierce competition among communications carriers
and hardware and software suppliers
– Resulted in massive bandwidth increase and
plummeting costs
2008 Pearson Education, Inc. All rights reserved.
26
1.5 History of the Internet and World
Wide Web
Internet traffic grew(II)
– Tim Berners-Lee invents HyperText Markup
Language (HTML)
- Also writes communication protocols to form the
backbone new information system = World Wide Web
- Hypertext Transfer Protocol (HTTP):
– a communications protocol used to send
information over the web
– Web use exploded with availability in 1993 of the
Mosaic browser
– Marc Andreessen founds Netscape
- Company many credit with initiating the explosive
Internet of late 1990s.
2008 Pearson Education, Inc. All rights reserved.
27
1.6 World Wide Web Consortium
(W3C)
W3C Founded in 1994 by Tim Berners-Lee
Homepage at www.w3.org
Goals
– Internet universally accessible
– Standardization
- W3C Recommendations:
Technologies standardized by W3C
include the Extensible HyperText Markup Language
(XHTML), Cascading Style Sheets (CSS), HyperText
Markup Language (HTML—now considered a “legacy”
technology) and the Extensible Markup Language
(XML).
not an actual software product, but a document that
specifies a technology’s role, syntax rules and so
forth.
2008 Pearson Education, Inc. All rights reserved.
28
1.7 Web 2.0
2003 noticeable shift in how people and businesses were using
the web and developing web-based applications
The term Web 2.0 was coined by Dale Dougherty of O’Reilly
– Web 2.0 definition = companies use the web as a platform to create
collaborative, community-based sites (e.g., social networking sites,
blogs, wikis, etc.).
Web 1.0 (1990s and early 2000s) focused on a small number of
companies and advertisers producing content for users to access
– “brochure web”)
Web 2.0 involves the
– Web 1.0 is as a lecture,
– Web 2.0 is a conversation
Websites like MySpace , Facebook , Flickr , YouTube, eBay and
Wikipedia , users create the content, companies provide the
platforms.
2008 Pearson Education, Inc. All rights reserved.
29
1.7 Web 2.0 (Cont.)
Architecture of participation
– Open source software
– Collective
– Rich Internet Applications (RIAs)
– Software as a Service (SaaS)
Web services incorporate functionality from existing
applications and websites into own web applications
– Amazon Web Services
– Maps web services with eBay web services
2008 Pearson Education, Inc. All rights reserved.
30
1.7 Web 2.0 (Cont.)
Future computers learn to understand the meaning
of the data on the web = Semantic Web
Deitel Web 2.0 Resource Center at
www.deitel.com/web2.0/ for more information.
2008 Pearson Education, Inc. All rights reserved.
31
1.8 Personal, Distributed and Client/Server
Computing
1977 Apple Computer popularized personal
computing
– Computers became economical for personal or
business use
Machines could be linked together in computer
networks
– Local area networks (LANs)
– Distributed computing
Workstations
Servers offer data storage and other capabilities
that may be used by client computers distributed
throughout the network,
– Client/server computing
Popular operating systems
– UNIX, Linux, Mac OS X and Microsoft’s Windows
2008 Pearson Education, Inc. All rights reserved.
32
1.9 Hardware Trends
Improving technologies (I)
– Internet community thrives on improvements of
- Hardware, Software and Communications
– Cost of products and services
- Consistently dropping over the decades
– Computer capacity and speed
- Doubles every two years (on average) = Moore’s Law
2008 Pearson Education, Inc. All rights reserved.
33
1.9 Hardware Trends
Improving technologies (II)
– Microprocessor chip
- Laid groundwork in late 1970s and 1980s for productivity
improvements of the 1990s
– Hardware moving toward mobile, wireless technology.
- Hand-held devices more powerful than early
supercomputers
- Portability
- Wireless data-transfer speeds
2008 Pearson Education, Inc. All rights reserved.
34
1.10 The Key Software Trend:
Object Technology
Objects
– Reusable software components that model items in
the real world (classes)
– Makes software developers more productive
– Object-oriented programs often easier to understand,
correct and modify than older types of programs
2008 Pearson Education, Inc. All rights reserved.
35
1.11 JavaScript: Object-Based
Scripting for the Web
JavaScript
– Attractive package for advancing level of
programming language education
– Object-based language
– Supports proper software engineering
techniques
– Free as part of today’s most popular Web
browsers
– Powerful scripting language
- Portable
- Programs execute interpretively on client machines
Universal client scripting language, simplifying web
application development
2008 Pearson Education, Inc. All rights reserved.
36
Portability Tip 1.2
Although it is easier to write portable
programs in JavaScript than in many other
programming languages, differences among
interpreters and browsers make portability
difficult to achieve. Simply writing programs
in JavaScript does not guarantee portability.
Programmers occasionally need to research
platform variations and write their code
accordingly.
2008 Pearson Education, Inc. All rights reserved.
37
1.12 Browser Portability
Browser portability
– Great challenge
- Great diversity of client browsers in use
- Many different platforms also in use
Difficult to
– Know capabilities and features of all browsers and
platforms in use
– Find correct mix between absolute portability,
complexity and usability of features
2008 Pearson Education, Inc. All rights reserved.
38
Portability Tip 1.4
The web is populated with many different
browsers, which makes it difficult for authors
and web application developers to create
universal solutions. The W3C is working
toward the goal of a universal client-side
platform.
2008 Pearson Education, Inc. All rights reserved.
39
1.13 C, C++ and Java
C
– developed by Dennis Ritchie at Bell Laboratories
– development language of the UNIX operating system
– virtually all new major operating systems are written in C and/or
C++
C++
– developed by Bjarne Stroustrup in early 1980s
– “spruce up” the C language and provides capabilities for object-
oriented programming
Java
– developed by Sun Microsystems in 1991
– Sun saw the immediate potential of using Java to add dynamic
content (e.g., interactivity, animations and the like) to web pages
– Sun formally announced Java at an industry conference in May
1995
– Java is now used to
- develop large-scale enterprise applications
- enhance the functionality of web servers
- provide applications for consumer devices
2008 Pearson Education, Inc. All rights reserved.
40
1.14 BASIC, Visual Basic, Visual C++, C#
and .NET
BASIC
– Developed in the mid-1960s at Dartmouth College
– Primary purpose was to familiarize novices with
programming techniques
Microsoft’s Visual Basic language
– Based on Basic
– Has become one of the most popular programming
languages in the world
Microsoft’s .NET platform
– Provides the capabilities developers need to create
computer applications that can execute on computers
distributed across the Internet
- Visual Basic (based on the original BASIC)
- Visual C++ (based on C++)
- Visual C# (based on C++ and Java)
2008 Pearson Education, Inc. All rights reserved.
41
1.15 Software Technologies
Agile Software Development
– Set of methodologies that try to get software
implemented quickly
– Agile Alliance (www.agilealliance.org)
– Agile Manifesto (www.agilemanifesto.org)
Refactoring
– Reworking code to make it clearer and easier to
maintain while preserving its
Design patterns
– Proven architectures for constructing flexible
and maintainable object-oriented software
– Open source code
2008 Pearson Education, Inc. All rights reserved.
42
1.15 Software Technologies (Cont.)
Linux
– Open source operating system
Apache
– Most popular open source web server
MySQL , PostgreSQL
– Open source database management system
PHP
– Most popular open source server-side “scripting” language for developing
Internet-based applications
LAMP
– Linux, Apache, MySQL and PHP (or Perl or Python)
Game programming
– Software techniques used in game programming Adobe Flash CS3
Software as a Service (SaaS)
– Software runs on servers elsewhere on the Internet
- Salesforce.com, Google, Microsoft and 37Signals all offer SaaS
2008 Pearson Education, Inc. All rights reserved.
43
2
Developing Web Applications
Overview
2008 Pearson Education, Inc. All rights reserved.
44
OBJECTIVES
Describe the Web development process
Describe a typical server-side application
• Using TCP / IP and HTTP protocols
• Including GET, POST and Form Header
methods
Describe the contemporary server-side
technologies
• CGI
• Server-side Java Scripts (SSJS)
• Servlet
• JSP
• ASP
• PHP 2008 Pearson Education, Inc. All rights reserved.
Client-Server Architecture
Front end Back end
Order is
processed
here
2008 Pearson Education, Inc. All rights reserved.
Two-tier systems
Drawbacks of two-tier systems:
• Servers must be multi-lingual, as different
clients may speak different languages
• Clients have to decide which queue is the
shortest, to get their order quickly
• People may have to wait in long queues at
the server
• If the queues are too long, then a client
may decide to leave
2008 Pearson Education, Inc. All rights reserved.
A day in a typical restaurant
A customer enters A waiter accepts
the restaurant the order and then
serves food
Bill
Exit
The customer asks for the bill, pays
the money and leaves the restaurant
2008 Pearson Education, Inc. All rights reserved.
A day in a typical restaurant – (1)
Advantages of this system:
• The customer does not have to stand in a queue. He
can comfortably sit at a table and wait for his order to
be taken.
• The client has to interact only with a waiter. Thus, the
waiter alone needs to understand more than two
languages.
• There is a separate counter for paying bills. So clients
need not wait for the others to clear their bills first.
2008 Pearson Education, Inc. All rights reserved.
The Web based solution
He places the order (request)
based on the available menu,
which is received by the Web
server Process
The request is
processed here, by
the JSP or servlet
The results engine
are sent back
to the client The database is
A customer browses checked for any
the restaurant site on required
the Web, located at a information – like
particular URL stock of items
2008 Pearson Education, Inc. All rights reserved.
The Web based solution – (1)
The process of placing an order and being served by the
waiter can be explained as follows:
– Placing an order, which is accepted by the waiter, is
comparable to an HTTP request
– Being served by the waiter is similar to receiving an HTTP
response
– The entire mode of communication, that is sending and
receiving HTTP requests and responses is based on the TCP/
IP suite
2008 Pearson Education, Inc. All rights reserved.
The Web development process –
Some definitions
Web Page:
• simple text file consisting of text and HTML tags
Web Browser:
• connects to a Web Server, sends a request for a page and
receives and displays the result
• interprets HTML tags to display the page exactly the way
the designer wanted it to be
2008 Pearson Education, Inc. All rights reserved.
The Web development process –
Some definitions – (cont.)
Web Server:
– software which can respond to a Web browser’s
request for a page and then send that page to the
browser
Database:
– an RDBMS that stores data – connected to the Web
Server
2008 Pearson Education, Inc. All rights reserved.
A brief note on TCP/IP and HTTP
protocols
TCP/IP is a protocol suite that drives the Internet
Handles network communications between nodes
It is composed of layers:
• Internet Protocol
• Transmission Control Protocol
• Sockets
2008 Pearson Education, Inc. All rights reserved.
A brief note on TCP/IP and HTTP
protocols – (cont.)
HTTP defines:
• the way messages are formatted and transmitted
• what the Web servers and browsers do in response
to various commands
2008 Pearson Education, Inc. All rights reserved.
Connecting the client and server
through HTTP
HyperText Link HyperText Link
Web Client running a Browser
2008 Pearson Education, Inc. All rights reserved.
How does a Web server work?
When a browser sends a request to the Web
server, the following occur:
• The browser divides the URL into three parts:
• The protocol (HTTP)
• The server name (www.Microsoft.com)
• The file name (index.asp)
• The browser communicates with this server to
translate the server name into an IP address
2008 Pearson Education, Inc. All rights reserved.
How does a Web server work?
Server returns the HTML page
Browser sends a GET request
www.Mi… IP address
Translate
Connection
3. File name – index.asp
2. Server name – Microsoft.com
1. Protocol – HTTP
2008 Pearson Education, Inc. All rights reserved.
How does a Web server work? –(Cont.)
http://servername/HelloWorld.html
File system contains
HelloWorld.html
2008 Pearson Education, Inc. All rights reserved.
Web Application architecture
Client
2008 Pearson Education, Inc. All rights reserved.
Web Application architecture –(Cont.)
Forms
Returning Results to the browser
Executing the Server Script
Sending a Request to the Web
Collecting Data
2008 Pearson Education, Inc. All rights reserved.
The Prevalent Server-side Technologies
Common Gateway Interface (CGI)
• Perl is the most popular programming language for
CGI programming
• CGI acts as a gateway between a request and the
response
• Disadvantage is that it does not scale well – a new
process is created each time the server receives a
new request
2008 Pearson Education, Inc. All rights reserved.
The Prevalent Server-side
Technologies – (Cont.)
Proprietary Web Server APIs (ISAPI, NSAPI)
• Allow developers to write server applications as
shared libraries
• These libraries can service multiple requests without
creating a new process for each of these
2008 Pearson Education, Inc. All rights reserved.
The Prevalent Server-side
Technologies – (Cont.)
Server-side Java Scripts (SSJS)
• Uses JavaScript as the scripting language
• Has built-in features for
• database and e-mail support
• session management
• inter-operability with server-side Java classes
2008 Pearson Education, Inc. All rights reserved.
The Prevalent Server-side
Technologies – (Cont.)
Personal Home Page (PHP)
• Provides strong support for pattern matching and database
access
• Is an open source product and is available on a large
number of platforms
Servlet
• Small Java-based applications for adding dynamic
functionalities to Web servers
• Servlet requests are handled by threads
2008 Pearson Education, Inc. All rights reserved.
The Prevalent Server-side
Technologies – (Cont.)
Active Server Pages (ASP)
• Supports multiple scripting languages, including PerlScript,
JScript and VBScript
• The only limitation that it has is that it can run only on IIS on
Windows NT
JavaServer Pages (JSP)
• Supports two different styles for adding dynamic content –
through scripts and tags
• Separates presentation from implementation logic
2008 Pearson Education, Inc. All rights reserved.
66
Thank you
See you next week
2008 Pearson Education, Inc. All rights reserved.