Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Учебник Computer_Science А.Л. Иванова, А.А. Гареев

.pdf
Скачиваний:
221
Добавлен:
11.12.2019
Размер:
29.56 Mб
Скачать

There are a number of different elements that you can use on a web page:

Text - displayed in a variety of fonts and sizes. Most text files are available in two formats: HTML or PDF (the portable document format that can be viewed with Acrobat Reader).

Background - the underlying colours and patterns of a web page

Tables - with columns and rows, used to position images and text on a page

Frames - rectangular areas that allow the display of different pages in the same browser window

Cascading Style Sheets (CSS) - a mechanism for adding styles to web documents. You could use HTML code to specify the font, text styles and background colour. Nowadays, however, it is more common to use CSS.This makes it easy to apply presentation changes across a website.

Graphics, clip art, icons, background templates, wallpaper, and transparent images - common formats are .jpg (joint photographic experts group), ideal for pictures with many colours, .gif (graphics interchange format), ideal for pictures with fewer colours, and .png (portable network graphics), which supports 16 million colours.

Hyperlinks - highlighted text or pictures (buttons, image maps, etc.) that act

as links to other pages. If you want to share information with people, you can use RSS feeds and provide readers with a link to the feed. RSS allows subscribers to receive updates of blogs, news, podcasts, etc. Before going live, you should check that all the links work.

Many websites now incorporate audio files, and if you're designing a site, you may like to insert songs, podcasts, etc.The most common audio formats are: .wav (Windows wave audio format), .ra (RealAudio file) and .mp3 (MPEG-1 Audio Layer-3).

Full-motion video is stored in these formats: .avi (audio video interleave), .mov (QuickTime movie) and .mpg (moving picture experts group). If you want to inject something special into your web pages, you can use Adobe Flash to include interactive animations and streaming audio. Additionally, you can insert Java applets - small programs that enable the creation of interactive files. Animations are made up of a series of independent pictures put together in sequence to look like moving pictures.To see or hear all these files, you must have the right plug-in, an auxiliary program that expands the capabilities of your web browser [4].

61P

3.Read the text again and then match the sentence beginnings (1-6) with the correct endings (a-f).

1.Instructions in HTML

2.Cascading Style Sheets are the way

3.A hyperlink is any clickable text,

4.A plug-in is a small program

5.Java applets are used to provide

6.RSS feeds are summaries of web content

a)image or button that takes you to another place on the Web

b)used for handling audio, video and animation files

c)are called tags

d)interactive features to web applications.

e)to define the presentation of web pages, from fonts and colours to page layout

f)published in the Really Simple Syndication format for download.

GRAMMAR

4. Language work: modal verbs

Underline all the modal verbs in the text on page 115 and then look at the HELP box. Which modal verb from the HELP box does not appear in the text? Can you think of any other modal verbs?

*HELP BOX Modal verbs

We use modal verbs to add extra meaning to the main verb.They are followed by infinitive without to. Modal verbs are used in the following ways:

To express a possibility

You can/ could useAdobe Flash to include interactive animations. You may like to insert songs, podcasts, etc.

The price of Dreamweaver might go down next month.

Can and could are often interchangeable when talking about possibility. May and might are used to express weaker possibilities and often come before the verb like to mean It is possible you will like.

To ask for permission

Can/Could/May I use your mobile phone?

May is more formal than can or could.

62P

To talk about ability

They are looking for artists who can draw and design web pages.

Could is the past tense of can and is used to talk about ability in the past. To talk about obligation or necessity

To see or hear all these files, you must have the right plug-in.

... you needn't learn HTML in order to build your own website.

Needn't means don't need to or don’t have to and is used to express a lack of obligation.

To give advice (see Unit 7)

Before going live, you should check that all the links work [4].

5. Complete these sentences with suitable modal verbs from the HELP box. There may be more than one possible answer.

1.With Java, I ______________ include some attractive banners on my website.

2.With a web editor, you______________ create a web document easily.

3.These days, you________ ____ _ learn how to use complicated HTML codes. Modern web design software is user-friendly and converts a visual

layout into HTML code.

4.Once live, you ____________ ____ update your website regularly.

5.To view a PDF file, you ____________ have Adobe Acrobat Reader.

6.Websites with graphics are more inviting than those written in plain text, so you ____________ like to insert some graphics into your documents.

7.I use your laptop? I need to print out this report.

SPEAKING

6.In pairs, discuss at least two things:

1.you can now do more easily because of the Internet.

2.you could do better if you had a faster internet connection.

3.that may/might happen to the Internet in the next ten years.

4.you must consider when designing a website.

5.you should take into account when choosing which PC to buy.

7.Discuss these questions.

1.What is a blog?

2.Which blogs do you read regularly?

63P

8. Look at the screenshot from tpsreport.co.uk, a popular gaming blog. Can you see any design differences between blogs and normal websites?

9.Imagine you wanted to start your own blog. In pairs, discuss these questions.

1)Why would you start your own blog - to write a diary of your thoughts or to share your expertise on a particular topic?

2)What types of media would you include - text, photos, video, audio (including podcasts)?

3)Would you insert links to other blogs? Which ones?

4)Would you focus on a particular subject or have a mix of several topics?

5)Which site would you use to host your blog?

WRITING

10. Write an entry for the blog you've described in (80-100 words). Introduce the blog to the world and talk about why you've started it [4].

64P

LESSON 4. PROGRAMMING LANGUAGES. GETTING TO KNOW JAVA PART 1. BACK TO HISTORY

James Gosling, “the father” of Java programming language

1.Before reading the text answer the following questions: - What programming languages do you know?

- What do you know about Java language? READING

2.Read the text and find out more about Java and the person who invented it.

Java programming language

James Arthur Gosling, OC (born May 19, 1955) is a Canadian computer scientist, best known as the father of the Java programming language.

James Gosling received a Bachelor of Science from the University of Calgary and his M.A. and Ph.D. from Carnegie Mellon University. While working

65P

towards his doctorate, he wrote a version of Emacs called Gosling Emacs (Gosmacs). Before joining Sun Microsystems he built a multi-processor version of Unix for a 16-way computer system while at Carnegie Mellon University. There, he also developed several compilers and mail systems. Between 1984 and 2010, Gosling was with Sun Microsystems.

On April 2, 2010, Gosling left Sun Microsystems which had recently been acquired by the Oracle Corporation. Regarding why he left, Gosling cited reductions in pay, status, decision-making ability, change of role, and ethical challenges. On March 28, 2011, James Gosling announced on his blog that he had been hired by Google. Five months later, he announced that he joined a startup called Liquid Robotics.

Gosling is listed as an adviser at the Scala company Typesafe Inc., Independent Director at Jelastic and Strategic Advisor for Eucalyptus.

Gosling is generally credited with having invented the Java programming language in 1994. He created the original design of Java and implemented the language's original compiler and virtual machine. Gosling traces the origins of the approach to his early graduate-student days, when he created a pseudo-code (p-code) virtual machine for the lab's DEC VAX computer, so that his professor could run programs written in UCSD Pascal. Pascal compiled into p-code to foster precisely this kind of portability. In the work leading to Java at Sun, he saw that architectureneutral execution for widely distributed programs could be achieved by implementing a similar philosophy: always program for the same virtual machine [14].

The JavaTM Programming Language is a general-purpose, concurrent, strongly typed, class-based object-oriented language developed by James Gosling and colleagues at Sun Microsystems in the early 1990s. Unlike conventional languages which are generally designed either to be compiled to native (machine) code, or to be interpreted from source code at runtime, Java is intended to be compiled to a bytecode, which is then run (generally using JIT compilation) by a Java Virtual Machine.

Java is a programming language, but there are several aspects to it. Java refers to the virtual machine that executes Java programs. Java refers to the environment in which source programs are developed and the tools that assist in development. Java also refers to the libraries of already developed code.

The language itself borrows much syntax from C and C++ but has a simpler object model and fewer low-level facilities, it bears a deaper resembleness to

66P

Ada and Modula-3. Java is only distantly related to JavaScript, though they have similar names and share a C-like syntax.

Java was started as a project called "Oak" by James Gosling in June 1991. Gosling's goals were to implement a virtual machine and a language that had a familiar C-like notation but with greater uniformity and simplicity than C/C++. The first public implementation was Java 1.0 in 1995. It made the promise of "Write Once, Run Anywhere", with free runtimes on popular platforms. It was fairly secure and its security was configurable, allowing for network and file access to be limited. The major web browsers soon incorporated it into their standard configurations in a secure "applet" configuration. New versions for large and small platforms (J2EE and J2ME) soon were designed with the advent of "Java 2". Sun has not announced any plans for a "Java 3".

In 1997, Sun approached the ISO/IEC JTC1 standards body and later the Ecma International to formalize Java, but it soon withdrew from the process. Java remains a proprietary de facto standard that is controlled through the Java Community Process. Sun makes most of its Java implementations available without charge, with revenue being generated by specialized products such as the Java Enterprise System. Sun distinguishes between its Software Development Kit (SDK) and Runtime Environment (JRE) which is a subset of the SDK, the primary distinction being that in the JRE the compiler is not present [15].

3. Here is a number of abbreviations that you came across in the text. Do you know what they stand for?

M.A.

Ph.D.

ISO/IEC

JTC1

DEC

VAX

UCSD

JRE

SDK

J2EE

J2ME

JIT

JVM

p-code

 

 

 

 

 

 

 

4. Do you know why the languages mentioned in the text (C, Unix, Pascal, Ada) were given such names? What about other programming languages and software products? Find out what the etymology of their names is or come up with your own version of their names’ origin. Share your ideas with the group.

5. Why the following names and a date are mentioned in the text?

-March 28, 2011

-Oak

67P

-Emacs

-Carnegie Mellon University

-Sun Microsystems

-Jelastic

-Ada

-Liquid Robotics

6. Match the words in two columns so that they should form wordcombinations from the text.

architecture-neutral

notation

 

 

distributed

from source code

 

 

C-like

distinction

 

 

public

facilities

 

 

share

without charge

 

 

proprietary

syntax

 

 

available

programs

 

 

secure

Implementation

 

 

primary

standard

 

 

to be compiled

"applet" configuration

 

 

be interpreted

execution

 

 

low-level

to native (machine) code

 

 

PART 2. KEY FEATURES

68P

Java interface

1. Before you read the text try to answer the questions:

-Why is Java so popular?

-What is object oriented programming?

READING

2. Read the text and say if information in the text corresponds to your answer.

Key features of the Java programming language

The first characteristic, object orientation ("OO"), refers to a method of programming and language design. Although there are many interpretations of OO, one primary distinguishing idea is to design software so that the various types of data it manipulates are combined together with their relevant operations. Thus, data and code are combined into entities called objects. An object can be thought of as a selfcontained bundle of behavior (code) and state (data). The principle is to separate the things that change from the things that stay the same; often, a change to some data structure requires a corresponding change to the code that operates on that data, or vice versa. This separation into coherent objects provides a more stable foundation for a software system's

69P

design. The intent is to make large software projects easier to manage, thus improving quality and reducing the number of failed projects.

Another primary goal of OO programming is to develop more generic objects so that software can become more reusable between projects. A generic «customer" object, for example, should have roughly the same basic set of behaviors between different software projects, especially when these projects overlap on some fundamental level as they often do in large organizations. In this sense, software objects can hopefully be seen more as pluggable components, helping the software industry build projects largely from existing and well-tested pieces, thus leading to a massive reduction in development times. Software reusability has met with mixed practical results, with two main difficulties: the design of truly generic objects is poorly understood, and a methodology for broad communication of reuse opportunities is lacking. Some open source communities want to help ease the reuse problem, by providing authors with ways to disseminate information about generally reusable objects and object libraries.

The second characteristic, platform independence, means that programs written in the Java language must run similarly on diverse hardware. One should be able to write a program once and run it anywhere.

This is achieved by most Java compilers by compiling the Java language code "halfway" to bytecode (specifically Java bytecode)—simplified machine instructions specific to the Java platform. The code is then run on a virtual machine (VM), a program written in native code on the host hardware that interprets and executes generic Java bytecode. Further, standardized libraries are provided to allow access to features of the host machines (such as graphics, threading and networking) in unified ways. Note that, although there's an explicit compiling stage, at some point, the Java bytecode is interpreted or converted to native machine instructions by the JIT compiler.

There are also implementations of Java compilers that compile to native object code, such as GCJ, removing the intermediate bytecode stage, but the output of these compilers can only be run on a single architecture. The first implementations of the language used an interpreted virtual machine to achieve portability. These implementations produced programs that ran more slowly than programs compiled to native executables, for instance written in C or C++, so the language suffered a reputation for poor performance. More recent JVM implementations produce programs that run significantly faster than before, using multiple techniques.

70P