Sei sulla pagina 1di 14

Internet & World Wide Web: How to Program

by Deitel and Deitel

Rise of electronic-commerce (e-commerce) has


meant the reconstruction of modern business.

Internet and World Wide Web How to Program is


a textbook useful for learning about programming
languages, programming language principles and
Internet and Web-based application technologies.

Internet & World Wide Web: How to Program


by Deitel and Deitel

Introduction to Computers
(in Chapter 1)

1/19/2011 2

OBJECTIVES

 In this chapter you will learn about:


– 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.

1
Chapter 1 Sections
 1.1 Introduction
 1.2 What Is a Computer?
 1.3 Computer Organization
 1.4 Machine Languages, Assembly Languages and High-Level Languages

Introduction
 Subscribe to free e-mail newsletter at
http://www.deitel.com/newsletter/subscribe.html

Intro to Internet and World Wide Web How to


Program: 4/e
Structure and Content
 Walkthrough of Web 2.0
 For novices
 Structured and object-based programming
emphasized
h i d
 Live-code approach presents all concepts
in full working examples at
www.deitel.com/books/iw3htp4

2
Intro to Internet and World Wide Web How to
Program: 4/e
Structure and Content
 JavaScript, XHTML and CSS
– in early chapters
– solid foundation for subsequent chapters
 Applications of the textbook content
– prepares for more advanced study in C++, Java, C#, Visual Basic.NET,
and general object-oriented programming
– enables development of applications with graphical user interfaces
(GUIs) delivered through a browser
• applications that are not limited to the desktop
• applications that are portable
– run on multiple platforms (i.e., different types of computers
running different operating systems).
– includes multimedia capabilities
– apply database technologies
7

Intro to Internet and World Wide Web How to


Program: 4/e
Structure and Content
 Focus on Web 2.0 and rich Internet applications
 Chapters 1-20
– cover XHTML, JavaScript, Dynamic HTML, Extensible
Markup Language (XML), CSS, Flash, Flex, Silverlight and
Dreamweaver
– for applications running on client side (typically Mozilla
Firefox 2 and Microsoft Internet Explorer 7)
 Chapters 21-28
– cover web servers, databases, PHP, Ruby on Rails,
ASP.NET, ASP.NET Ajax and JavaServer Faces (JSF)

What is a Computer?
 Device
 Performs computations fast
 Performs yes/no decisions fast
 Fastest supercomputers today
– perform hundreds of billions of additions per
second

3
What is a Computer?
 Supercomputers: most powerful
 Computer programs: sets of instructions
that tell the computer what to do
 Computer
C t programmers: people l who
h
construct computer programs

10

What is a Computer System?


 Hardware: devices such as keyboard, screen,
mouse, hard drive, memory, DVD drive,
processors, etc.
 Software: p
programs
g that run on a computer
p
– word processing programs
– email
– browser
– games
– etc.

11

Six Logical Units


 Input unit
 Output unit
 Memory unit
 Arithmetic and logic unit
 Central processing unit (CPU)
 Secondary storage unit

12

4
Input Unit
 Gets data and computer programs into the
system
 Input devices
– keyboard
k b d
– mouse
– scanner
– microphone
– etc.

13

Output Unit
 Takes info from computer and transfers it
to output devices
 Output devices
– monitor
it
– printer
– network
– etc.

14

Memory Unit
 Fast-access, low capacity (relatively),
storage
 RAM, memory, primary memory, core
memory are other terms used
 This memory is volatile
– when power is lost, the info in memory is no
longer there

15

5
Arithmetic and Logic Unit
 ALU (lingo)
 Performs calculations (+, -, *, /)
 Decisions (compare two items in memory
and
dddecide
id if th
they are th
the same))

16

Central Processing Unit


 CPU (lingo)
 Coordinates activities of the other units
 More than one CPU is more common now
– multiprocessor

17

Secondary Storage Unit


 Slower access, more capacity, storage
 Hard drives
 CD, DVD
 Memory stick
 Floppy disks (old technology)

18

6
Early Computing
 Before 1960
 Batch processing: computers performing
one task at a time
– submit
b it a ‘j‘job’
b’ on punched
h d cards,
d gett output
t t
(paper printout) the next day
 Computer fills a room
 No PCs

19

Early Operating Systems


 Operating system: software to make a
computer easier to use
– made computers able to do more ‘jobs’
through multiprogramming
• computers handle more than one job at a time by
holding more than one program in memory and
working on them in a round-robin way
• each program receives some attention some of the
time

20

Timesharing
 During the 1960s and 70s
 Multiple users access one large computer
in another room through a terminal
– keyboard
k b d andd screen
 OS directs computer to handle one user’s
job for a few seconds, then another, etc.
 Timesharing allowed different clients to
“pay” for only the portion of time they used
the processor 21

7
Personal Computing
 1970s
– silicon chip technology
– smaller computers
– Apple (1977)
– IBM PC (1981)
 Stand-alone computers on your desk
 Boot from floppy disk with OS on floppy
 Store work on floppy disks
 Share work by sharing floppy disks
22

Distributed Computing
 Network stand-alone units together to
facilitate sharing
– work (files)
– equipment (printers)
 Local area networks (LAN)

23

Client/Server Computing
 Server: provides a common data store for
multiple users
– file server
– application server
– web server
– database server
 Client: desktop computer uses data from
the common data store on the server

24

8
Hardware Trends
 Computer hardware costs have steadily
decreased in relation to the capability of
the devices purchased
 Moore
Moore’ss Law: Every year or two you can
buy twice as much computing power for
the same amount of money

25

Road to Microsoft’s Windows


OS
 1981 DOS (Disk Operating System)
– user types commands from a keyboard
• on the terminal screen is a cursor and a prompt
– tells the OS what to tell the computer to do
– doesn’t need a mouse, just a keyboard
 1990 Windows 3.0
– graphical user interface (GUI)
– not an OS, ran on top of DOS
 1993 Windows NT OS
– Windows XP is based on Windows NT 26

Other OS
 LINUX
– open-source: the source code is freely
available to users who can modify it to suit
their needs
 UNIX
– proprietary (Bell Labs)
– written in C programming language

27

9
Software
 Instructions to command the computer to
perform actions and make decisions
 JavaScript and PHP are popular software
development
p languages
g g for web-based
applications
 Development of instruction sets is called
programming or coding

28

Types of Programming Languages


 Machine languages
 Assembly languages
 High-level languages

29

Machine Language
 The “natural language” of a specific
machine
 Determined by the hardware design of the
machine
 Machine dependent: any given machine
language can be used on only one type of
computer
 Cumbersome for humans
30

10
Machine Language Program
Example

+1300042774  Adds overtime pay to


+1400593419
b
base pay
 Stores the result in
+1200274027 gross pay

 Not very human-readable

31

Assembly Language
 Use English-like abbreviations for strings
of numbers
 Assembler: a translator program that
translates English
English-like
like assembly language
statements into machine language

32

Assembly Language Program


Example

Load basepay  Adds overtime pay to


Add overpay
b
base pay
 Stores the result in
Store grosspay gross pay

 More human-readable (understandable by


reading English)
33

11
High-Level Language
 Single statements accomplish substantial
tasks
 Instructions look almost like everyday
English and math

34

High-Level Language Statement


Example

grossPay = basePay + overTimePay

 Adds overtime pay to base pay


 Stores the result in gross pay
 Understandable
 Looks something like Algebra
35

High-Level Languages
 More desirable from programmer’s standpoint
 Examples of high-level languages
– C
– C++
– Visual Basic.NET
– C#
– Java
 These are among the most powerful and widely used
languages today

36

12
Other High-Level Languages
 Fortran (FORmula TRANslator)
 COBOL (Common Business Oriented
Language)
 Pascal
P l
 Ada

37

Compiler versus Interpreter


 Compiler: a translator program that
converts high-level language into machine
language
 Interpreter: a program that executes high
high-
level language directly one line at time
– execution is slower than with a compiled
program
– scripting languages for the web are executed
by an interpreter that is part of the browser
38

Compiler versus Interpreter


 Interpreter programs popular in program development environments
 Once program fully developed, compiled version made
 Several key programming languages are processed by
interpreters
– JavaScript
– ActionScript
– PHP
– Ruby on Rails
– each of these scripting languages is processed by
interpreters
 Some markup languages key to web applications (XHTML
and XML) can be processed by interpreted scripting languages
 Interpreted languages help to achieve the goal of
39 application portability across a variety of platforms
(more on this later)

13
Advantages/Disadvantages of
Interpreted Language
 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 first
 Disadvantage is interpreted scripts generally run slower
 Interpreted languages are more portable than compiled
languages
– Interpreters can be implemented for each platform on
which the interpreted languages need to executed
 Interpreted languages more dynamic than compiled
languages
– For example, server-side applications can generate code
in response to user interactions, and that code can then be
40 interpreted in a browser.

Internet & World Wide Web: How to Program


by Deitel and Deitel

End of Slides for Chapter 01


Part 01

1/19/2011 41

14

Potrebbero piacerti anche