Monday, June 18, 2012

Javascript Tutorial


1.     What is Java script?
A scripting programming language most commonly used to add interactive features to webpages.

2.     What is Object Oriented Programming (OOP)?
Creating a program that can use and support objects (data structures)

3.     What three components make up OOP?
Model: the data
View: visual representation of the data
Controller: the interface between the view and model

4.     Give an example of an object, a method and an event.

5.     Where is Java script placed in a html page?
It can either be placed at the head of the document (between the <head> and </head> tags) or in the body (between <body> and </body> )

6.     What four lines of code indicate the beginning and end of java script?

7.     What do java script forms do? Name two objects that could be included in a form.

8.     What four attributes does a java script button have?

Alter a basic HTML page to contain the code used in chapter 1 of this tutorial as well as display a clock as coded by the java script in the link below.


Data compression involves reducing file size by either discarding unnecessary data or by use of algorithms that look for repeating patterns in data (redundancy).

Visit the sites below then answer the following questions;



  1. Name two programs used for file compression.
    -Winzip
    -WinAce

  2. What name is given to the file compression method that looks for redundant patterns?
    Lossless Data. This is when the original data is reconstructed to make it more easily compressed.
    Why can’t music be compressed efficiently with this type of  compression technique?
    Because music often don’t repeat as many text files as text files.

  3. What method of compression is most suited to graphics and music files?
    Lossy compression. This is when data is compressed by getting rid of (losing) bits of data. This reduces the amount of data that needs to be held. It is most suited to graphics and music files as it eliminates bits of sound not heard by the humar ear in music files, and gets rid of pixels in an image.

 Use Gimp (Start > Programs > Gimp2) to open an image and then save it as a jpeg with different levels of compression. Paste these images below. Explain why the appearance of the images varies!!


Uncompressed (108.5)




 






Low Compression (9.37 KB)  
Medium Compression (4.82KB)
 High Compression (1.14KB)
The images appear different because each time the image is compressed bits of information (pixels) are taken out of the picture. At a low compression our brains fill in the gaps of the missing pixels, but as more pixels are removed, our brain finds it harder to fill in the missing pixels.












 

Basic HTML and Basic HTML 2


There are many online tutorials on using HTML. The link below is to an excellent site that steps you through creating a basic page.


Work through the first four pages – Home, Introductions, Elements, Basic Tags.

Use the tutorial and NOTEPAD to create a page displaying the following elements;

  • Headings
<h1>Headings</h1>

  • Background colours
<body style-“background-colour-blue”>

  • Paragraph break
<p>paragraph</p>
<p>second paragraph</p>

  • Line break
<p>paragraph<br/> with multiple <br/> line <br/> breaks

  • Bold font
<b>

  • Comments
    <!—Comments-->

  • Image as a background
    body
    (
    background-image: url(‘name of image.gif’);
    )

  • A hyperlink to the first page
    <a href= “url”>Link text</a>

  • An image
    <img src=“source of the image” alt “alternative text for the image”>

  • Image as a hyperlink
    <a href= “url’>
    <img src= “image source.gif” alt= “alternative text”

Coloured Fonts
<h style=font-family:verdana;colour;red;”>Heading</h>

<p style=font-family:times;colour;blue”>Pararaph</p>



Using Frontpage



Visit the site below and work through the tutorial. The tutorial includes some simple exercises that assist you in creating a simple website. As you complete the tutorial answer the questions below.


  1. What two steps are recommended in planning your site?
·       Establish a goal and keep it simple
·       Know your audience

  1. What is a web server?
·       A Web server is a computer that runs special serving software. That software "serves" HTML pages and associated files when requested by a client, such as a Web browser.

  1. Provide examples of some features that FrontPage Server Extensions provide for a website?
·       Graphics
·       Documents
·       Multimedia

  1. How do you put your website on a web server?
·       To put your site on a Web server, you publish it.
·       Publishing generally means copying all of the files to a remote location on a server.
·        In most cases, the remote location is either an HTTP path or an FTP path. 

  1. FrontPage has two key functions – website design and …..?
·       Management

  1. What are some commonly used file names for Home Pages accepted by servers?

·       Defult.html
·       Index.html
·       Index.htm

  1. What is FrontPage Metadata and which two folders contain these files?
·       FrontPage metadata is information about your FrontPage Web site that makes managing the site possible. 
·        the _vti_cnf folder and the _vti_pvt folder.

  1. There are two basic types of website can you create in FrontPage; what are they and how do they differ?
·       Disk- Based: A disk-based Web site is a site you create on your local hard drive. After you design and work on the site, you can later publish it to a remote location like a Web server
·       Server- Based: A server-based Web site is a site you create and work with directly on a Web server.


Internet Addresses Activity


Scan through the following links to assist you in answering the following questions.


1.     What is a URL?
 Universal Resource Locator. It is the addressed of all world wide web pages (WWW)

2.     What is an IP address and how is it related to a URL?
An IP address (internet protocol) is a set of digits in a certain order used to identify a computer in a network. A URL is a way to correspond these digits into a name that can be easily remembered.
3.     Given our school website's URL is http://www.mcauley.nsw.edu.au, what is our domain name and what protocol do you need to use to access the site?
Domain Name: mcauley.nsw.edu.au
Protocol: http (hypertext transfer protocol)
4.     In the context of an IP address, what is an octet?
IP address uses 32 binary bits to create a single unique address on a computer network. It is expressed by four numbers separate by dots. Each number is the decimal (base 10) representation for an eight digit binary number, This is called an octet.
Example: 216.27.61.137


Broadband Speedtest
For a bit of fun determine the speed of our internet connection using the site below. Start by testing the connection speed to the Sydney location then select a different location from the map (drag the map to find a location).


  1. What is meant  by upload and download speeds?
Download Speed: how quickly a file can be downloaded, or obtained on your computer, usually through the internet.
Upload Speed: How quickly information can be transmitted from a computer to a location on the internet.

  1. What are the units used to measure download speeds?
-Mega bits per second (Mbps)
-Kilo bits per second (Kbps)

Some Key Terms



  1. Define the term – Protocol
Protocol: The code or procedure that must be followed. Computers use protocols or codes to communicate between each other. These specific set of rule and codes is what a computer protocol is.

  1. What are the following protocols used for?
·       TCP/IP
“Transmission Control Protocol/ Internet Protocol.” These two protocols were delelveped by the U.S military. They were used to communicate between computers over long distances.
·       http
“Hyper Text Transfer Protocol.” This protocol is used to transfer information through the internet. When a URL is typed in the browser sends a HTTP request to the appropriate web server.
·       Smtp
“Simple Mail Transfer Protocol.” Is used to send e-mails over the internet. Is a set of commands that determine the validity of e-mails.
·       pop
“Post Office Protocol.” A simple method to send emails. A POP server filters the mail and places them in appropriate folders.
·       FTP
“File Transfer Protocol.” The commone method of transferring files through the interenet from one computer to another.

  1. What does GUI stand for? What was used before GUI?
Stands for Graphical User Interface. It enables users to interact with electronic devices through the use of images and colour rather than plain text. GUI presents the information and actions that are available through visual images.

  1. There are two methods of data transmission – serial and parallel. Explain the difference between them.
Serial Data transfer is when data bits are transferred one bit at a time, while Parallel data transfer is when groups of data are transferred simultaneously

  1. Define the term “URL”. Explain the components that make up the url.
Universal Resource Locator: this is the address for a web page. It consists of:
·       A scheme name: (http) followed by a colon and two slashes.
·       A host or domain name. This identifies the resource
·       The path: the path of the resource to found of the program to be run
·       Query String: contains data to be passed to web applications such as CGI programs. Contains a set of parameters and values that affect the handling of the request.
Example: scheme://domain/path?query_string



  1. In the context of data transmission, what is “error detection”?
    A process used during file transfer to discover differences between transmitted and received data.

  2. What is HTML and explain why it is important
HTML stands for “Hyper Text Markup Language”. It is the one central language that can read a web page. It is used alongside Javascript and CSS (Cascading Style Sheets. Used mainly to decrease the amount of source code on a page,) to create the page that is visible. HTML is used to format the text, images, links, display and everything that you see on the page. HTML is what formats websites, and without it there would be no websites.





Smart Phone Tour


In addition to completing your section of the school tour, each person must post on their blog regarding the following aspects of the project;
1.     Technology used in creating the smart phone tour. List all hardware and software needed to implement the project. Briefly outline how each technology was used.

HARDWARE
·        Mobile Phones
·        Computers
·        Digital Camera
·        USB
·        Colour Printer
·        Router
·        Internet Connection
·        Computer Network (LAN)

SOFTWARE
·        File transfer app
·        Image software (was used to resize and edit the images)
·        Online QR code generator
·        QR code reader
·        Online collaboration tool (google docs)
·        Voice recorder
·        Google sites (hosting the website)
·         

2.     Constraints and considerations. To make the tour a hassle free and pleasurable experience for parents, what did we need to consider when designing the tour; think of speed, usability and cost.
·        Time
·        Internet Connection Speed
·        Uploading images
·        Reasonable downloading times
·        Limit the file size
·        Compressed file format
·        Limit the resolution of the images
·        No cost to the user
·        Freely available web hosting and creation




3.     Your role(s) in the group.
·        Made the websites for BM to Technology and BM to Visual Arts
·        Created the QR code of the websites I made
·        Find the photos that related to my tour
·        Draw arrows on the photos for my tour to give directions

4.     Problems you encountered and solutions you created.
·        Being able to find the photos that were needed
Copying and pasting the images that you needed into a separate folder

·        Not knowing what had or hadn’t been completed and on what tours
Used a shared document to keep track of the status on all the websites

·        Internet speed
Finish the work at home

·        Not being able to edit the sites of people that hadn’t completed them
The teachers were given shared permissions to edit them