Sie sind auf Seite 1von 35

1

1
Introduction to Computers, the Internet and Visual C#
2009 Pearson Education, Inc. All rights reserved.

OBJECTIVES
In this chapter you will learn: Basic hardware and software concepts. The different types of programming languages. Which programming languages are most widely used. The history of the Visual C# programming language.

2009 Pearson Education, Inc. All rights reserved.

OBJECTIVES
The history of the Internet and the World Wide Web. The motivation behind and an overview of Microsofts .NET initiative, which involves the Internet in developing and using software systems.

2009 Pearson Education, Inc. All rights reserved.

1.2 What Is a Computer?


A computer performs calculations and makes logical decisions. Supercomputers can perform trillions of additions per second. Computers process data using sets of instructions called computer programs. Programs guide computers through sets of actions that are specified by computer programmers.

2009 Pearson Education, Inc. All rights reserved.

1.2 What Is a Computer? (Cont.)


A computer consists of various devices referred to as hardware (e.g., the keyboard, screen, mouse, hard drive, memory, DVDs and processing units). The programs that run on a computer are referred to as software. Hardware costs have been declining dramatically. Software-development costs have risen, as programmers develop powerful and complex applications. Object-oriented programming, available in C# and other programming languages, is a significant breakthrough in productivity.
2009 Pearson Education, Inc. All rights reserved.

1.3 Computer Organization


Computers can be thought of as being divided into six units:
The input unit obtains information from input devices such as the keyboard and the mouse. The output unit takes information that the computer has processed and places it on various output devices, making it available for use outside the computer.

2009 Pearson Education, Inc. All rights reserved.

1.3 Computer Organization (Cont.)


The memory unit stores rapid-access, low-capacity data temporarily while an application is running.
To be executed, computer programs must be in memory. Often, the memory unit is called either memory or primary memory.

Random-access memory (RAM) is an example of primary memory.


Primary memory is usually volatile, meaning that it is erased when the machine is powered off.

2009 Pearson Education, Inc. All rights reserved.

1.3 Computer Organization (Cont.)


The central processing unit (CPU) serves as the administrative section of the computer. The arithmetic and logic unit (ALU) performs calculations and makes decisions. The secondary storage unit is the long-term, high-capacity warehousing section of the computer.
Secondary storage devices include hard drives, CD-ROM drives, DVD drives, and USB memory sticks. The computer can retrieve this information whenever it is needed. Secondary storage is nonvolatile, retaining information even when the computer is powered off.
2009 Pearson Education, Inc. All rights reserved.

1.4 Personal Computing, Distributed Computing and Client/Server Computing


In the early years of computing, computer systems were too large and expensive for individuals to own. In the 1970s, silicon chip technology appeared, making it possible for computers to be much smaller and economical. In 1977, Apple Computer popularized personal computing. In 1981, the IBM Personal Computer legitimized personal computing in business, industry and government organizations.
2009 Pearson Education, Inc. All rights reserved.

10

1.4 Personal Computing, Distributed Computing and Client/Server Computing (Cont.)


Computers originally were stand-alone unitspeople transported disks back and forth between computers to share information. Machines were linked together in computer networks, sometimes over telephone lines and sometimes in local area networks (LANs). In distributed computing, an organizations computing is distributed over networks to multiple computers. Todays personal computers are as powerful as the milliondollar machines of just a few decades ago. Computers called servers now offer a common data stores for use by client computers, hence the term client/server computing.
2009 Pearson Education, Inc. All rights reserved.

11

1.5 Hardware Trends


For many decades, hardware costs have fallen rapidly.
Every year or two, the capacities of computers have doubled without any increase in price. This tread, often called Moores Law, is especially true in relation to the amount of memory, amount of secondary storage and their processor speeds.

Microprocessor chip technology in the late 1970s and 1980s laid the groundwork for the productivity improvements in recent years.

2009 Pearson Education, Inc. All rights reserved.

1.6 Microsofts Windows Operating System


An operating system is software that manages a computers hardware resources. In 1981, Microsoft released DOS for the IBM Personal Computer. In the mid-1980s, Microsoft developed the Windows operating system, a graphical user interface built on top of DOS. Windows 95 and Windows 98 virtually cornered the desktop operating-systems market by the late 1990s. Windows Vista followed by Windows 7 is Microsofts latest operating-system offering.

12

2009 Pearson Education, Inc. All rights reserved.

1.6 Microsofts Windows Operating System (Cont.)


Another operating system, Linux, derives from the UNIX operating system.
Linux is a free, open-source operating system. The source code is freely available for users to modify.

13

Another popular operating system is Apple Computers Mac OS X.

2009 Pearson Education, Inc. All rights reserved.

14

1.7 Machine Languages, Assembly Languages and High-Level Languages


Programmers write instructions in various programming languages. Computer languages can be divided into three general types:
Machine languages Assembly languages High-level languages

2009 Pearson Education, Inc. All rights reserved.

15

1.7 Machine Languages, Assembly Languages and High-Level Languages (Cont.)


A computer can directly understand only its own machine language. Machine languages generally consist of streams of numbers (ultimately reduced to binary 1s and 0s). Machine-language programs are nearly incomprehensible to humans:
+1300042774

+1400593419
+1200274027
2009 Pearson Education, Inc. All rights reserved.

16

1.7 Machine Languages, Assembly Languages and High-Level Languages (Cont.)


Machine-language programming proved to be slow and error prone. English-like abbreviations form the basis of assembly languages. Assemblers convert assembly-language programs to machine language.
LOAD ADD STORE BASEPAY OVERPAY GROSSPAY

Computers cannot understand assembly-language code until it is translated into machine language.
2009 Pearson Education, Inc. All rights reserved.

17

1.7 Machine Languages, Assembly Languages and High-Level Languages (Cont.)


To speed up the programming process, high-level languages were developed.
Compilers convert high-level-language programs into machine language. High-level languages look almost like everyday English:
grossPay = basePay + overTimePay

2009 Pearson Education, Inc. All rights reserved.

18

1.7 Machine Languages, Assembly Languages and High-Level Languages (Cont.)

Fig. 1.1 | Comparing machine, assembly and high-level languages.


2009 Pearson Education, Inc. All rights reserved.

19

1.8 Visual Basic


Visual Basic evolved from BASIC, a language designed to teach fundamental programming techniques. When Bill Gates founded Microsoft Corporation in the 1970s, he implemented BASIC on several early personal computers. In the late 1980s and the early 1990s, Microsoft developed the Microsoft Windows graphical user interface (GUI)the visual part of the operating system with which users interact. The natural evolution of BASIC was to Visual Basic.

2009 Pearson Education, Inc. All rights reserved.

20

1.9 C, C++ and Java


C first gained widespread recognition as the development language of the UNIX operating system.
C is a hardware-independent language (i.e. it is portable to most computers).

C++ took the C language and provided capabilities for object-oriented programming (OOP).

Objects are reusable software components that model items in the real world.
Object-oriented programs are often easier to understand, correct and modify.

2009 Pearson Education, Inc. All rights reserved.

21

1.9 C, C++ and Java (Cont.)


Sun Microsystems began development of the Java programming language in 1991. Sun saw the possibility of using Java to add dynamic content to web pages. Java is now used to develop large-scale enterprise applications, to enhance the functionality of web pages and for many other purposes.

2009 Pearson Education, Inc. All rights reserved.

22

1.10 Visual C#
C# was designed specifically for the .NET platform as a language that would enable programmers to migrate easily to .NET. C# is object oriented and has access to a powerful class library of prebuilt components. It has roots in C, C++ and Java, adapting the best features of each.

2009 Pearson Education, Inc. All rights reserved.

23

1.10 Visual C#
Visual C# is an event-driven, visual programming language. Youll write programs that respond to events such as mouse clicks and keystrokes. Youll also use Visual Studios graphical user interface to drag and drop predefined objects like buttons and textboxes into place.

2009 Pearson Education, Inc. All rights reserved.

24

1.10 Visual C# (Cont.)


Microsoft introduced C# along with its .NET strategy in 2000. The .NET platform allows applications to be distributed to a variety of devices.

2009 Pearson Education, Inc. All rights reserved.

25

1.11 Other High-Level Languages


Fortran (Formula Translator) was developed in the mid-1950s to create scientific and engineering applications. COBOL is used primarily for business applications that require the manipulation of large amounts of data.

2009 Pearson Education, Inc. All rights reserved.

26

1.12 Structured Programming


Structured programming is a disciplined approach to creating clear, correct and easy-to-modify programs. The Pascal programming language was designed for teaching structured programming. The Ada structured programming language was developed under the sponsorship of the U.S. Department of Defense (DOD).

2009 Pearson Education, Inc. All rights reserved.

27

1.13 The Internet and the World Wide Web


In the late 1960s, ARPA (Advanced Research Projects Agency of the Department of Defense) connected computer systems of universities and research institutions. This became known as the ARPAnet. Its quick and easy communication came to be known as electronic mail (e-mail).

2009 Pearson Education, Inc. All rights reserved.

28

1.13 The Internet and the World Wide Web (Cont.)


The protocol for communicating over the ARPAnet became known as the Transmission Control Protocol (TCP). TCP ensured that message packets were properly routed from sender to receiver. One challenge was to enable different networks to communicate with each other.
ARPA accomplished this by developing the Internet Protocol (IP).

The combined set of protocols is now called TCP/IP.


2009 Pearson Education, Inc. All rights reserved.

29

1.13 The Internet and the World Wide Web (Cont.)


Companies started to develop and enhance their Internet presence. This generated fierce competition among communications carriers and hardware and software suppliers. As a result, bandwidth has increased tremendously, while communication costs have plummeted.

2009 Pearson Education, Inc. All rights reserved.

30

1.13 The Internet and the World Wide Web (Cont.)


The World Wide Web is a collection of hardware and software associated with the Internet. Tim Berners-Lee of CERN developed a technology for sharing information via the HyperText Markup Language (HTML). He also wrote HyperText Transfer Protocol (HTTP), the main internet communications protocol.

2009 Pearson Education, Inc. All rights reserved.

31

1.13 The Internet and the World Wide Web (Cont.)


In 1994, Berners-Lee founded the World Wide Web Consortium (W3C), devoted to developing technologies for the World Wide Web.
The W3C aims to make the web universally

accessible regardless of disabilities, language or culture.

2009 Pearson Education, Inc. All rights reserved.

32

1.14 Extensible Markup Language (XML)


HTMLs lack of extensibility frustrated developers. As a result, XML was developed by the W3C. Data independence is the essential characteristic of XML.
Because XML documents describe data, any application conceivably can process them. Software developers are integrating XML into their applications to improve web functionality and interoperability. XML is also being employed in databases.

2009 Pearson Education, Inc. All rights reserved.

33

1.14 Extensible Markup Language (XML) (Cont.)


Applications employing XML can communicate with one another, if they can understand common XML vocabularies. The Simple Object Access Protocol (SOAP) is a technology for the transmission of objects. Since SOAPs foundations are in XML and HTTP, it is supported on most computer systems.

2009 Pearson Education, Inc. All rights reserved.

34

1.15 Introduction to Microsoft .NET


Microsofts .NET initiative uses the Internet and the web in the development, engineering, distribution and use of software. Applications in any .NET-compatible language can interact with each other. Microsofts ASP.NET technology allows you to create web applications. The .NET strategy allows programmers to concentrate on their specialties without having to implement every component of every application.
2009 Pearson Education, Inc. All rights reserved.

35

1.16 The .NET Framework and the Common Language Runtime


The Microsoft .NET Framework:
manages and executes applications and web services contains a class library (called the .NET Framework Class Library)

provides security and other programming capabilities.

The Common Language Runtime (CLR):


Programs are compiled first into Microsoft Intermediate Language (MSIL). When the application executes, the just-in-time compiler translates the MSIL in the executable file into machine-language code.

2009 Pearson Education, Inc. All rights reserved.

Das könnte Ihnen auch gefallen