CHAPTER 1 THE ABC OF PROGRAMMING B HOW DO COMPUTERS FIT IN WITH THE WORLD AROUND THEM?

Slides:



Advertisements
Similar presentations
Chapter 7 JavaScript: Introduction to Scripting. Outline Simple Programs Objects and Variables Obtaining User Input with prompt Dialogs – –Dynamic Welcome.
Advertisements

JavaScript Objects - DOM CST 200 JavaScript. Objectives Introduce JavaScript objects Introduce Document Object Model Introduce window object Introduce.
The Web Warrior Guide to Web Design Technologies
CM143 - Web Week 2 Basic HTML. Links and Image Tags.
Chapter 9 Introduction to the Document Object Model (DOM) JavaScript, Third Edition.
Inline, Internal, and External FIle
Lesson 8 Creating Forms with JavaScript
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Styling and theming Build campaigns in style. What we'll look at... How a web document is structured How HTML and CSS fit together Tools you will need.
Integrating JavaScript and HTML5 HTML5 & CSS 7 th Edition.
Working with Objects Creating a Dynamic Web Page.
CITS1231 Web Technologies JavaScript and Document Object Model.
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Write basic.
JavaScript, Fourth Edition
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Web Design (7) Images (1). Images and the Image Element Images can be placed in the flow of text..jpg,.png and.gif image files work in web pages The img.
USING XML AS A DATA SOURCE. Data binding is a process by which information in a data source is stored as an object in computer memory. In this presentation,
JavaScript - A Web Script Language Fred Durao
Creating Links. The Anchor Element: The anchor tag can be used in three different ways: 1.External link – to link to a web page outside your own website.
Dr. Qusai Abuein1 Internet & WWW How to program Chap.(6) JavaScript:Introduction to Scripting.
The Web Wizard’s Guide To JavaScript Chapter 8 Working with Windows and Frames.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
CO1552 – Web Application Development Further JavaScript: Part 1: The Document Object Model Part 2: Functions and Events.
CHAPTER 3 FUNCTIONS, METHODS & OBJECTS WHAT IS A FUNCTION?
Headings are defined with the to tags. defines the largest heading. defines the smallest heading. Note: Browsers automatically add an empty line before.
INTRODUCTION JavaScript can make websites more interactive, interesting, and user-friendly.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Invitation to Computer Science 6 th Edition Chapter 10 The Tower of Babel.
HTML DOM Basharat Mahmood, Department of Computer Science, CIIT, Islamabad, Pakistan 1.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Chapter 1 Murach's JavaScript and jQuery, C1© 2012, Mike Murach & Associates, Inc.Slide 1.
Beginning JavaScript 4 th Edition. Chapter 1 Introduction to JavaScript and the Web.
Chapter 6 Murach's JavaScript and jQuery, C6© 2012, Mike Murach & Associates, Inc.Slide 1.
Chapter 4 Frames and Cascading Style Sheets. Frames Frames divide a browser window into two or more separate pieces or panes, with each pane containing.
Source of website: “Text/css rel=“styles heet” This is an external style sheet link. This means that the.
HTML Links CS 1150 Spring 2017.
DHTML.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Section 17.1 Section 17.2 Add an audio file using HTML
Creating Links.
Scope, Objects, Strings, Numbers
Introduction to Programming the WWW I
Introduction to AJAX MIS 3502 Jeremy Shafer Department of MIS
Introduction to AJAX MIS 3502 Jeremy Shafer Department of MIS
Inserting and Working with Links
Chapter 13 - Dynamic HTML: Object Model and Collections
CHAPTER 1 THE ABC OF PROGRAMMING
Document Object Model (DOM): Objects and Collections
Creating Links.
Cascading Style Sheets™ (CSS)
Unit 6 part 6 Test Javascript Test.
CIS 133 mashup Javascript, jQuery and XML
CHAPTER 3 FUNCTIONS, METHODS & OBJECTS
Introduction to Programming and JavaScript
JavaScript: Introduction to Scripting
Cascading Style Sheets
An ABC Book by.
An ABC Book by.
An ABC Book by.
HTML Links CS 1150 Fall 2016.
Creating Links.
Murach's JavaScript and jQuery (3rd Ed.)
Web Software Model CS 4640 Programming Languages for Web Applications
Murach's JavaScript and jQuery (3rd Ed.)
[Robert W. Sebesta, “Programming the World Wide Web
JavaScript: BOM and DOM CS Programming Languages for Web Applications
© 2017, Mike Murach & Associates, Inc.
Murach's JavaScript and jQuery (3rd Ed.)
Presentation transcript:

CHAPTER 1 THE ABC OF PROGRAMMING

B

HOW DO COMPUTERS FIT IN WITH THE WORLD AROUND THEM?

Here is a model of a hotel, along with some trees, people, and cars.

To a human, it is clear what kind of real-world object each one represents. OBJECT TYPE: HOTELOBJECT TYPE: CAR

Computers create models of the world using data.

The objects in these models use properties, events, and methods.

PROPERTIES

Properties tell the computer about the characteristics of an object.

PROPERTIES nameQuay rating4 rooms42 bookings21 gymfalse pooltrue OBJECT TYPE: HOTEL

EVENTS

Events tell the computer how the user can interact with an object.

EVENThappens when: bookreservation is made cancelreservation is cancelled OBJECT TYPE: HOTEL

METHODS

Methods tell the computer how to change the properties of an object.

METHOD what it does: makeBooking() increases value of bookings PROPERTY cancelBooking() decreases value of bookings property checkAvailability() subtracts value of bookings property from value of rooms property and returns number of rooms available OBJECT TYPE: HOTEL

Here is the data the computer might use to make a model of one of the cars.

OBJECT TYPE: CAR EVENThappens when:method called: brakedriver slows downchangeSpeed() acceleratedriver speeds upchangeSpeed() METHODwhat it does: changeSpeed()increases or decreases value of currentSpeed property PROPERTIES makeBMW currentSpeed45mph colorsilver fueldiesel

OBJECT TYPE: CAR EVENThappens when:method called: brakedriver slows downchangeSpeed() acceleratedriver speeds upchangeSpeed() METHODwhat it does: changeSpeed()increases or decreases value of currentSpeed property PROPERTIES makeBMW currentSpeed45mph colorsilver fueldiesel

OBJECT TYPE: CAR EVENThappens when:method called: brakedriver slows downchangeSpeed() acceleratedriver speeds upchangeSpeed() METHODwhat it does: changeSpeed()increases or decreases value of currentSpeed property PROPERTIES makeBMW currentSpeed45mph colorsilver fueldiesel

OBJECT TYPE: CAR EVENThappens when:method called: brakedriver slows downchangeSpeed() acceleratedriver speeds upchangeSpeed() METHODwhat it does: changeSpeed()increases or decreases value of currentSpeed property PROPERTIES makeBMW currentSpeed45mph colorsilver fueldiesel

OBJECT TYPE: CAR EVENThappens when:method called: brakedriver slows downchangeSpeed() acceleratedriver speeds upchangeSpeed() METHODwhat it does: changeSpeed()increases or decreases value of currentSpeed property PROPERTIES makeBMW currentSpeed30mph colorsilver fueldiesel

WEB BROWSERS

Web browsers use models of the browser window and the web pages contained in them.

PROPERTIES locationhttp:// OBJECT TYPE: WINDOW PROPERTIES URLhttp:// lastModified09/04/ :33:37 titleLearn JavaScript & jQuery - A book that teaches you in a nicer way OBJECT TYPE: DOCUMENT

Web browsers use these models to understand how to interpret web pages.

1

The browser receives a web page 1

Constructive & Co Constructive & Co For all orders and enquiries, please call

2 The browser receives a web page 1

12 It creates a model of the page and stores it in memory

document OBJECT

document ELEMENT OBJECT

document Constructive & Co. For all orders and inquiries please call TEXT ELEMENT OBJECT

document Constructive & Co. For all orders and inquiries please call rel stylesheet href css/c01.css ATTRIBUTE TEXT ELEMENT OBJECT

3 The browser receives a web page 12 It creates a model of the page and stores it in memory

3 It shows the page on screen using a rendering engine The browser receives a web page 12 It creates a model of the page and stores it in memory