Internet Based Programming
Internet Based Programming
DIPLOMA IN
INFORMATION
COMMUNICATION
TECHNOLOGY
STUDY NOTES
Page 1 of 161
Contents
Page 2 of 161
TOPIC 4: WEB AUTHORING AND DESIGN TOOLS ............................................. 40
Page 4 of 161
TOPIC 1: INTRODUCTION TO
INTERNETBASED PROGRAMMING
T1.1) Internet-based programming
What is Internet programming
Internet programming it a process of web development. It is where _ programming
procedures are designed and added into the internet _ websites.
Collection of internet resources (such as FTP, telnet, Usenet), hyperlinked text, audio,
and video files, and remote sites that can be accessed and searched by browsers based
on standards such as HTTP and TCP/IP. Also called the web, it was created in 1989 by the
UK physicist Tim Berners-Lee while working at the European Particle Physics Laboratory
(called CERN after its French initials Conseil Europeen de Reserches Nucleaires) in
Switzerland, as an easier way to access information scattered across the internet.
Website
A location connected to the Internet that maintains one or more pages on the World Wide
Web.
A set of interconnected webpages, usually including a homepage, generally located on the
same server, and prepared and maintained as a collection of related information by a
person, group, or organization. (The website content is stored under a common name, the
website name)
Virtual location on WWW, containing several subject or company related webpages and
data files accessible through a browser. Each website has its own unique web address (see
uniform resource locator) which can be reached through an internet connection. The
opening page of a website is usually called homepage which contains hyperlinks to other
Page 5 of 161
pages on the same or other site(s). A single web server may support multiple websites and
a single website may reside on multiple web servers, sometimes thousands of miles apart.
URL
Computers
2. An address that identifies a particular file on the Internet, usually consisting of the
protocol, as http, followed by the domain name.
A domain name is a unique name that identifies a website. For example, the domain name
of the Tech Terms Computer Dictionary is "techterms.com." Each website has a domain
name that serves as an address, which is used to access the website.
Note: All domain names have a domain suffix, such as .com, .net, or .org. The domain
suffix helps identify the type of website the domain name represents. For example,
".com" domain names are typically used by commercial website, while ".org" websites
are often used by non-profit organizations. Some domain names end with a country code,
such as ".dk" (Denmark) or ".se" (Sweden), which helps identify the location and
audience of the website.
When you access a website, the domain name is actually translated to an IP address,
which defines the server where the website located. This translation is performed
dynamically by a service called DNS.
"Domain Name System." Domain names serve as memorizable names for websites and
other services on the Internet. However, computers access Internet devices by their IP
addresses. DNS translates domain names into IP addresses, allowing you to access an
Internet location by its domain name.
Thanks to DNS, you can visit a website by typing in the domain name rather than the IP
address. For example, to visit the Tech Terms Computer Dictionary, you can simply type
"techterms.com" in the address bar of your web browser rather than the IP address
(67.43.14.98). It also simplifies email addresses, since DNS translates the domain name
(following the "@" symbol) to the appropriate IP address.
Page 6 of 161
To understand how DNS works, you can think of it like the contacts app on your
smartphone. When you call a friend, you simply select his or her name from a list. The
phone does not actually call the person by name, it calls the person's phone number. DNS
works the same way by associating a unique IP address with each domain name.
Unlike your address book, the DNS translation table is not stored in a single location.
Instead, the data is stored on millions of servers around the world. When a domain name
is registered, it must be assigned at least two nameservers (which can be edited through
the domain name registrar at any time). The name-server addresses point to a server that
has a directory of domain names and their associated IP addresses. When a computer
accesses a website over the Internet, it locates the corresponding name-server and gets the
correct IP address for the website.
Http
Hypertext transfer protocol: the standard protocol for transferring hypertext documents on
the World Wide Web.
Webpage
A document on the World Wide Web, consisting of an HTML file and any related files
for scripts and graphics, and often hyperlinked to other documents on the Web. The
content of webpages is normally accessed by using a browser.
Electronic (digital) document created with HTML and, therefore, accessible with a
browser. In addition to text and graphics, webpages may also contain downloadable data
files, audio and video files, and hyperlinks to other pages or sites. A website is usually a
collection of webpages.
Browser
A browser is an application program that provides a way to look at and interact with all
the information on the World Wide Web. The word "browser" seems to have originated
prior to the Web as a generic term for user interfaces that let you browse (navigate
through and read) text files online.
Page 7 of 161
A web browser (commonly referred to as a browser) is a software application for
retrieving, presenting and traversing information resources on the World Wide
Computer program (The two most popular browsers are Microsoft Internet Explorer and Firefox.
Other major browsers include Google Chrome, Apple Safari and Opera) that enables internet
users to access, navigate, and search World Wide Web sites. Browsers interpret hypertext links
('hotlinks') and allow documents formatted in hypertext markup language (HTML) to be viewed
on the computer screen, and provide many other services including email and downloading and
uploading of data, audio, and video files. Also called web browser.
Advertising
One of the things that highlight the importance of having a website is advertising. A
website allows a user to quickly update addresses, phone numbers, products, services,
events and any other relevant details. These changes are far less expensive and less time
consuming than physically reprinting all sorts of different paper marketing materials.
Online advertising on websites also has no limits on size – there can be a huge amount of
information included in full detail and color without worrying about added costs of
printed materials.
Market Expansion
Having a website allows the market to increase substantially. In fact, the internet knows
no limits! People all over the world can view information about the company, group or
organization being represented on a website. There will be no limits on the market that
can be reached because of time zones, countries, borders or even languages. Many web
browsers will translate websites to the language of the user‘s choice at the click of a
button. All of this market expansion is possible at a cost much less than other forms of
advertising such as print mailers, newspaper ads or television commercials.
Client Expectations
We are living in an ever increasingly digital world. People expect automatic answers to
questions and honestly assume that nearly everyone has their own website. In fact, the
internet has largely taken over directory assistance, yellow pages or even local phone
books for contact information. If your information cannot be found online, it is almost as
Page 8 of 161
though you don‘t exist. It is also important that a website is fully functional from mobile
devices such as smart phones for clients who are constantly on the go.
24/7 Availability
Most businesses and groups simply cannot run as consistently as a website can. A website
can offer information to interested parties 24 hours a day, 7 days a week with no regard to
vacation time or even statutory holidays. People often visit websites outside of normal
working hours and this may even be the only time that they have available to find out
about your organization. Information simply must be available at all times when people
live in such a busy world and a website is the most cost effective way to provide an
unlimited amount of information at all times.
Client Relations
Part of the importance of having a website is to strengthen client relations. The website
itself helps to develop and strengthen relations with current and prospective customers.
The website can proactively target marketing efforts to specific people at certain times. It
can let customers become familiar with a company‘s brand, marketing materials,
products, core beliefs, philosophies, history and even employees. It opens up an entirely
different venue for communication and dialogue between a group and the people which it
serves.
Additional Sales
Lastly, and perhaps most importantly, a website provides a venue for additional sales.
Websites can be set up to sell products and accept payments with the help of e-commerce
technologies. Even if the group seeking a website is not a physical product, potential
clients can research what the group does have to offer and develop more avenues to
increase the group‘s size and reach.
Whether a website is being sought for a public organization, community or business, it is
imperative to establish an online presence as soon as possible. Without a website, the
group is losing out on a variety of opportunities that other organizations are not just
letting slip through their fingers. Jump onboard the internet bandwagon and see what it
can do for you.
Page 9 of 161
Cost Effective
You know exactly how much your website is going to cost you and it‘s ongoings – a
brick and mortar store, on the other hand, is susceptible to many out of the ordinary
occurrences which could blow out the costs such as leaving the lights on, theft, damage,
extra staff etc.
Since your website is operational around the clock, from the convenience of the local
coffee shop, their couch or their bed, your customers and clients can easily access your
website and services.
Convenient
What is more convenient: driving outside to look for different stores that are available to
shop in, or sitting in the comfort of your own home and shopping for the products you‘re
looking for? Pretty obvious answer, unless you like aimlessly driving around. Smart
businesses realise this and thus have their own website housing their products and
services so that potential customers can browse online for the products they want to
purchase.
Credibility
By building a website you are giving your business the opportunity to tell consumers why
they should trust you and the testimonials and facts to back up those opportunities.
Believe it or not, most people will search the internet for a product or service before the
purchase to check the credibility first. When you provide good service or
product, positive word-of-mouth about your business is likely to spread. Which in turn,
delivers more repeat and new business.
People tend to trust a business after they have done business with it. Using your website,
you can continuously serve consumers online and increase your credibility as a business
owner.
Sales
Without sales, or selling more than you spend, your business is doomed. By having an
online presence you allow for the sale of your products or services around the clock to
whoever whenever with no or hardly any limitations; Unless you run out of stock or
overworked, but that‘s a good problem to have right! Giving your business the online
presence it deserves is crucial to your brand and accountants smile.
Page 10 of 161
In short, being visible worldwide means you are very likely to gain more customers. The
more customers and visitors you have, the more sales you will generate. The more sales
you generate the happier you and your shareholders will be!
Marketing
Having a website and online presence strategy allows you to market your business online.
There are lots of marketing strategies you can use to advertise and market your business.
All online marketing strategies have been proven to be effective. Which ones you choose
depends on the type of business you are in. Speak to us to see which are best for your
business.
Page 11 of 161
TOPIC 2: WEB PROGRAMMING
T2.1) Explanation of Web programming
Web programming refers to the writing, markup and coding involved in Web
development, which includes Web content, Web client and server scripting and network
security. Or Writing the necessary source code to create a website
Web development is all about communication. In this case, communication between two
(2) parties, over the HTTP protocol:
Each side's programming, refers to code which runs at the specific machine, the server's
or the client's.
Basic Example
1. The User opens his web browser (the Client).
2. The User browses to http://google.com.
3. The Client (on the behalf of the User), sends a request to http://google.com (the
Server), for their home page.
4. The Server then acknowledges the request, and replies the client with some
meta-data (called headers), followed by the page's source.
5. The Client then receives the page's source, and renders it into a human viewable
website.
6. The User types Stack Overflow into the search bar, and presses Enter
7. The Client submits that data to the Server.
8. The Server processes that data, and replies with a page matching the search
results.
9. The Client, once again, renders that page for the User to view.
Page 12 of 161
Client Response Client Server
User Request
Client
Server
Program
Program
Server-side Programming
Server-side programming, is the general name for the kinds of programs which are run on
the Server.
Uses
Process user input.
Display pages.
Structure web applications.
Interact with permanent storage (SQL, files).
Example Languages
PHP
ASP.Net in C#, C++, or Visual Basic.
Nearly any language (C++, C#, Java). These were not designed specifically for the
task, but are now often used for application-level web services.
Client-side programming
Much like the server-side, Client-side programming is the name for all of the programs
which are run on the Client.
Uses
Make interactive webpages.
Make stuff happen dynamically on the web page.
Interact with temporary storage, and local storage (Cookies, localStorage).
Send requests to the server, and retrieve data from it.
Provide a remote service for client-side applications, such as software
registration, content delivery, or remote multi-player gaming.
Example languages
JavaScript (primarily)
HTML*
Page 13 of 161
CSS*
Any language running on a client device that interacts with a remote service is a
client-side language.
PHP
ASP.NET (C# OR Visual Basic)
C++
Java and JSP
Python
Ruby on Rails and so on.
JavaScript
VBScript
HTML (Structure)
CSS (Designing)
AJAX
jQuery etc.
(Some other languages also can be used on the basis of the modeling/designing
/graphics/animations and for extra functionalities.)
Criteria
First, you should consider the following criteria:
Page 14 of 161
How difficult the language is to learn. Mind you, if the language syntax and rules
are complex, you’ll get more capable developers as only the best ones can get
through. On the other hand, there might be the scarcity of developers, which we
see with the languages like Scala, Erlang, Lisp, Prolog, Golang and others.
Strategic issues: which tech stack your potential acquisition company is using, or
which technology stack they would prefer to have.
1. Popularity. This is a very important one. A good place to start is the Tiobe index.
You are more likely to find people to collaborate with if you use a popular
language. You are also more likely to find reference material and other help.
Unfortunately, the most popular language globally may not be a good match for
your problem domain.
2. Language-domain match. Choose one that matches your problem domain. You
can do this by looking at what other people in your field are using (after adjusting
for popularity, so don't think the match with Java is good simply because a lot of
people are using Java) or by looking at some code that solves problems you are
likely to have and seeing how natural the mapping is.
3. Availability of libraries. Some would argue that this is the same as the point
above, but I don't think so. If there's a library that solves your problem well,
you'll put up with some ugly calling conventions or hassle in the language.
4. Efficiency. Languages aren't fast - compilers are efficient. Look at the efficiency
of compilers or interpreters for your language. Be aware that interpreted code
will run an order of magnitude slower than compiled code as a rule of thumb.
5. Expressiveness. The number of lines of code you create per hour is not a strong
function of language, so favour languages that are expressive or powerful
6. Project-size. Do you want to be programming in the large or programming in the
small? Choose a language that supports your use case.
7. Tool support. Popularity usually buys tool support (and some languages are
easier to write tools for). If you are a tool-oriented user, choose a language with
good tool support. Just read this article on tool mavens vs language mavens
before you make a choice.
PHP
It‘s hard to argue against the popularity of PHP, the scripting language which is used by
many and has a vibrant developer community. It is used not only for WordPress
development but also for complex systems so even Facebook utilizes PHP, which says a
lot about its level of credibility.
Since PHP does not use too much of a system‘s resources in order to run, it operates quite
well compared with other scripting languages. Hosting it is also very easy as lots of hosts
provide support for PHP.
Pros of PHP:
Page 15 of 161
It is highly accessible, there are a lot of frameworks written in it like Symfony, Yii,
Laravel, CakePHP, Kohana, Zend Framework, PhalconPHP, to name a few.
It enables fast implementation of complex solutions. And the faster a new
application enters the market, the higher is your cost-efficiency and the greater is
your competitive advantage.
Thanks to the popularity of PHP, it offers great flexibility during and after the initial
project, as the number of resources is continuously growing.
It has sound host support.
PHP can be embedded in HTML.
PHP7 was released in December 2015 ahead of deadlines and its performance has
grown substantially. Totally different architecture sits in its kernel, so it changes the
way how the interpreted code is being processed on operation system level, and this
actually causes this increase in performance.
There are performance accelerators available for PHP. For example, Facebook came
up with HipHop, a compiler of PHP into C which then turned into executable files.
Eventually, HipHop project came up with a virtual machine transforming PHP script
into bytecode and doing its own internal performance optimization. There are also
such solutions as APC, ionCube, Turck MMCache, Zend Opcache, XCache etc.
Websites powered by PHP: Facebook, WordPress, Wikipedia, Mailchimp, Flickr,
Yahoo!, Tumblr etc.
Cons of PHP
When someone claims that they know PHP, it’s hard to assess their level of
development skill, so you’ll need to dig deeper. PHP is so easy to learn on the basic
level that people without proper computer science background could go and start
developing, not knowing much about algorithms, time complexity, application
performance optimization, advanced database querying, systems scalability and
other important aspects.
It’s not as cross-platform as some of its competitors. The language is compatible
with UNIX based OS and Windows OS.
Python
Pros of Python
It requires less time to develop than, for instance, in Java, as programs are shorter.
So faster development and also deeper prototyping would give you a competitive
advantage.
Python has a quite simple syntax and easy-to-use data structures.
It performs well across different platforms.
The language has good scalability.
Apps powered or supported by Python include Instagram, Pinterest, Django, Google,
NASA, Yahoo, etc. You can also check out more organizations using Python.
Cons of Python
Page 16 of 161
Performance could be better. Programs in Python are slower than in Java, for
example. This is obviously because it is one of the interpreted languages, which are
normally slower than compiled languages.
Ruby
According to Stack Overflow 2015 Developer Survey, Ruby is the technology which pays
best in Western Europe, which says a lot about its adoption scale.
Pros of Ruby
Ruby prefers convention over configuration which makes applications easier to
develop and understand. Clear syntax makes the programming process much faster
and more efficient.
RoR framework has very simple structure, it’s easy for developers.
Don’t Repeat Yourself, or DRY Principle. By not writing the same information over
and over again, the code is more maintainable, more extensible, and less buggy.
You can develop MVP very fast on Ruby, it takes less time than on other languages.
It has big development community.
Testing plays a big role in development. Minitest library goes together with Ruby, so
when you develop something, it’s ready for testing. As a result, you get a neat secure
product. There’s also a very powerful testing framework for ROR called RSpec.
Platforms that are supported by Ruby include Hulu, Shopify, Twitter, Scribd,
Crunchbase, Groupon, etc.
There are many libraries, gems for any case, so when you are writing the code, you
can use a ready-made solution, so you don’t need to write it from scratch. The main
repository contains over 100,000 gems. https://rubygems.org/stats
Cons of Ruby
The performance is not as fast as on PHP or JavaScript.
As it’s the technology that pays really well, development might turn out to be more
expensive than in other languages.
Java
Java Pros
The core value proposition of the Java platform says “Write once, run anywhere”. So
the most important promise of Java technology is that you only have to write your
application once and then you’ll be able to run it anywhere. JVM is a universal
engine, you can use it for anything, it will work everywhere. It’s the most cross-
platform language.
It was arguably built with security in mind, so security features are one of Java’s
advantages.
It has a big and dedicated development community.
Outstanding performance.
Java Cons
Bigger projects can be difficult to compile and build.
Page 17 of 161
Development is more expensive than in PHP or Python.
If you are still sitting on the fence with your choice, go through this fun flowchart and
find out which language is better for your product And remember, you just need to find a
good team with talented developers. Then no matter which programming language you go
for, you can be confident in the final result.
A web API is an application programming interface (API) for either a web server or a
web browser. It is a web development concept, usually limited to a web application's
client-side (including any web frameworks being used), and thus usually does not include
web server or browser implementation details such as SAPIs or web browser engine APIs
unless publicly accessible by a remote web application.
CGI Programs
Page 18 of 161
CGI programs are the most common way for Web servers to interact dynamically with
users. Many HTML pages that contain forms, for example, use a CGI program to process
the form's data once it's submitted. Another increasingly common way to provide
dynamic feedback for Web users is to include scripts or programs that run on the user's
machine rather than the Web server. These programs can be Java applets, Java scripts, or
ActiveX controls. These technologies are known collectively as client-side solutions,
while the use of CGI is a server-side solution because the processing occurs on the Web
server.
One problem with CGI is that each time a CGI script is executed, a new process is started.
For busy websites, this can slow down the server noticeably. A more efficient solution,
but one that it is also more difficult to implement, is to use the server's API, such as
ISAPI or NSAPI. Another increasingly popular solution is to use Java servlets.
Web Browsing
To understand the concept of CGI, let's see what happens when we click a hyperlink to
browse a particular web page or URL.
Your browser contacts the HTTP web server and demand for the URL ie.
filename.
Web Server will parse the URL and will look for the filename. If it finds
requested file then web server sends that file back to the browser otherwise sends
an error message indicating that you have requested a wrong file.
Web browser takes response from web server and displays either the received file
or error message based on the received response.
However, it is possible to set up the HTTP server in such a way that whenever a file in a
certain directory is requested, that file is not sent back; instead it is executed as a
program, and produced output from the program is sent back to your browser to display.
The Common Gateway Interface (CGI) is a standard protocol for enabling applications
(called CGI programs or CGI scripts) to interact with Web servers and with clients. These
CGI programs can be a written in Python, PERL, Shell, C or C++ etc.
Page 19 of 161
Web Server Configuration
Before you proceed with CGI Programming, make sure that your Web Server supports
CGI and it is configured to handle CGI Programs. All the CGI Programs to be executed
by the HTTP server are kept in a pre-configured directory. This directory is called CGI
directory and by convention it is named as /var/www/cgi-bin. By convention CGI files
will have extension as .cgi, though they are C++ executable.
<Directory "/var/www/cgi-bin">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "/var/www/cgi-bin">
Options All
</Directory>
Page 20 of 161
Here, I assume that you have Web Server up and running successfully and you are able to
run any other CGI program like Perl or Shell etc.
Page 21 of 161
TOPIC 3: HTML CODING
T3.1) Introduction to HTML
What is HTML?
HTML is a language for describing web pages.
It is the standard protocol for formatting and displaying documents on the World Wide Web.
Note
HTML (Hypertext Markup Language) is the set of markup symbols or codes inserted in a
file intended for display on a World Wide Web browser page. The markup tells the Web
browser how to display a Web page's words and images for the user. Each individual
markup code is referred to as an element (but many people also refer to it as a tag). Some
elements come in pairs that indicate when some display effect is to begin and when it is to
end.
HTML is a formal Recommendation by the World Wide Web Consortium (W3C) and is
generally adhered to by the major browsers, Microsoft's Internet Explorer and Netscape's
Navigator, which also provide some additional non-standard codes.
Markup refers to the sequence of characters or other symbols that you insert at certain places in
a text or word processing file to indicate how the file should look when it is printed or displayed
or to describe the document's logical structure. The markup indicators are often called "tags."
For example, this particular paragraph is preceded by a:
A tag is a generic term for a language element descriptor. The set of tags for a document or
other unit of information is sometimes referred to as markup
Example Explained
What you just made is a skeleton html document. This is the minimum required
information for a web document and all web documents should contain these basic
components. The first tag in your html document is <html>. This tag tells your
browser that this is the start of an html document. The last tag in your document is
</html>. This tag tells your browser that this is the end of the html document.
The text between the <head> tag and the </head> tag is header information. Header
information is not displayed in the browser window.
The text between the <title> tags is the title of your document. The <title> tag is
used to uniquely identify each document and is also displayed in the title bar of the
browser window.
The text between the <body> tags is the text that will be displayed in your browser.
The text between the <b> and </b> tags will be displayed in a bold font.
HTML tags are the hidden keywords within a web page that define how your web
browser must format and display the content.
HTML Elements
"HTML tags" and "HTML elements" are often used to describe the same thing.
But strictly speaking, an HTML element is everything between the start tag and the end
tag, including the tags:
HTML Element:
<p>This is a paragraph.</p>
HTML Attributes
Attributes provide additional information about HTML elements.
HTML Attributes
HTML elements can have attributes
Attributes provide additional information about an element
Attributes are always specified in the start tag
Attributes come in name/value pairs like: name="value"
Attribute Example
HTML links are defined with the <a> tag. The link address is specified in the href
attribute:
Example
<a href="http://www.w3schools.com">This is a link</a>
Attributes allow you to customise a tag, and are defined within the opening tag, for
example:
<img src="image1.jpg"> or <p align="center"> ... </p>
Attributes are often assigned a value using the equals sign, such as border="0" or
width="50%", but there are some that only need to be declared in the tag like this: <hr
noshade>.
Most attributes are optional for most tags, and are only used when you want to change
something about the default way a tag is displayed by the browser. However, some tags
Page 24 of 161
such as the <img> tag has required attributes such as src and alt which are needed in
order for the browser to display the web page properly.
1. Paired Tags
2. Unpaired Tags
Paired Tags:
A tag is said to be a paired tag if the text is placed between a tag and its companion tag.
In paired tags, the first tag is referred to as Opening Tag and the second tag is referred
to as Closing Tag.
Example
<i>This text is in italics. </i>
Note: Here <i> is called opening tag. and </i> is called closing tag.
Unpaired Tags:
An unpaired tag does not have a companion tag. Unpaired tags are also known as
Singular or Stand-Alone Tags.
Example
<br> , <hr>
etc. These tags does not require any companion tag.
We can differentiate tags based on the purpose they used. Basically we have three types here
Formatting tags
We manage the size of the font, underline part of the text, make the text bold etc by using tags
like <font>, <u>,<b> etc.
Control tags
Form tags, Script tags, Radio buttons etc are part of the control tags
Page 25 of 161
1. Essential HTML Tags
There are four sets of HTML tags that are needed to form the basic structure for every
HTML file:
<html></html>
<head></head>
<title></title>
<body></body>
The header contains information about the document that will not appear on the actual
page, such as the title of the document, the author, which stylesheet to use and also
meta tags.
The title tag defines the title that will appear in the title bar of your web browser.
The title must appear between the head tags.
The body tags contain all the information and other visible content on the page. All
your images, links and plain text must go between the <body> and </body> tags.
These four tags are special. There must only be one set of each and they must be in the
correct order like in the example below. The fun and creative part comes when using the
basic tags for adding content and headings.
Example:
Below is a basic html document. Notice that everything falls between the html tags, the
title appears within the head of the document, and that the body comes after the head.
<html>
<head>
<title>My Page Title</title>
</head>
<body>
</body>
</html>
Page 26 of 161
2. HTML Basics
Once you have the essential tags sorted out, there are a number of basic tags you will use
a lot in order to add content such as:
All of these must appear between the <body> and </body> tags, and you can learn more
about them by following the links shown.
Headings
Use headings for titles and subtitles, and make some text stand out from others. See text
formatting tags.
Paragraphs
Most content on a simple web page will appear in paragraphs or sections. See division
tags.
Links
Links are necessary for users to jump from one page to another. See linking tags.
Images
<img src="photo.jpg">
Adding your holiday photos or other images to your web page is fairly simple. See image
tags.
Example:
<html>
<head>
<title>this is the title</title>
</head>
Page 27 of 161
<body>
<h1>My Heading</h1>
<p>This is the first paragraph of text.</p>
<p>This is the second paragraph of text.</p>
<p>An image: <img src="photo.jpg"> </p>
<p>A link: <a href="http://www.simplehtmlguide.com"> html guide
</a></p>
</body>
</html>
The div tag defines a section or division within a HTML file. It typically contains
headings, paragraphs, tables or other elements that need to be grouped together.
Commonly used with css by setting the <div class="?"> attribute to set the look
and feel of a section of your web page.
Used to define paragraphs of text, much like you would see in a book. A lot of text can
appear within the <p> and </p> tags, and browsers will automatically wrap the text
onto the next line once it reaches the edge of the screen. When another <p> tag is used
to start the next paragraph, the browser will add some blank space between the
paragraphs. It has the following attributes:
width="?" - Paragraph will occupy a fixed width or percentage of the page, default
100%
Used to group inline elements together, such as a few words within a sentence, in order
to apply a css style to those words only. The span tag can be used within div and p
tags as it does not create a new horizontal block boundary.
Equivalent to one carriage return, it is used to start text on a new line. Multiple <br>
tags in a row will create a large vertical space on a web page.
Page 28 of 161
Horizontal Line - <hr>
The horizontal rule, often referred to as the HTML line separator tag, creates a
horizontal line commonly used to visually separate sections on a page. It has the
following attributes:
width="??%" - The line will occupy a fixed width or percentage of the default 100%
width.
noshade - Prevent the 3D 'etched' look and create a flat, solid line separator.
If for some reason you want text to continue in one straight line, and not to wrap at the
edge of the screen screen, you can use the nobr. Note: this will force a user to scroll to
the right to see the rest of the line, which is considered bad design.
Example:
<html>
<body>
<p align="right">The first paragraph of text, aligned to the
right.</p>
<p>This text is now in the second paragraph.
<br>A new line, but still part of the second paragraph.</p>
<p>A third paragraph, and then a horizontal line</p>
<hr>
<p>Some modified horizontal lines:</p>
<hr width="50%" size="8" align="center">
<hr noshade>
</body>
</html>
There are 6 levels of headings available, from h1 for the largest and most important
heading, down to h6 for the smallest heading.
Also working the same way as a word processor, italics displays the text at a slight angle.
Again, the same as underline in a word processor. Note that html links are already
underlined and don't need the extra tag.
Puts a line right through the centre of the text, crossing it out. Often used to show that
text is old and no longer relevant. Also works by using <s> </s> instead.
Any text between the pre tags, including spaces, carriage returns and punctuation, will
appear in the browser as it would in a text editor (normally browsers ignore multiple
spaces)
Text is displayed in a fixed-width font, commonly used when showing source code. I
have used it on this site, along with stylesheets, to show all tags.
The text appears to have been typed by a typewriter, in a fixed-width font. (*)
Defines a long quotation, and the quote is displayed with an extra wide margin on the
left hand side of the block quote.
Instead of having to set a font size, you can use the small tag to render text slightly
smaller than the text around it. Useful for displaying the 'fine-print'.
Change the colour of a few words or a section of text. The 6 question marks represent
the hex color code, see this list of colours and codes for some samples. (*)
Page 30 of 161
Font Size - <font size="?"> </font>
Replace the ? with a number from 1 to 7 to change the size of the font. One being the
smallest and seven the largest. (*)
For an immediate change of font size with respect to the font size preceding it, this tag
increase or decreases the size of the font by the number you specify. Eg: <font
size="-1">Some Text</font> (*)
To show text in a particular font, use the font name such "Helvetica" or "Arial" or
"Courier". Be aware that using some fancy font from your computer means that the
person viewing that page must also have that font installed on their computer too,
otherwise it will look totally different to them. (*)
A useful tag, as it says, it makes everything in between the tags centred (in the middle of
the page). (*)
Used to emphasize text, which usually appears in italics, but can vary according to your
browser.
Used to emphasize text more, which usually appears in bold, but can vary according to
your browser.
5. Images
Images are used in HTML documents to one: make the page visually effective and two:
display information. Images can also be used as links, but this is discussed in the topic on
linking.
Although images are good for a number of things, a page with too many images often
looks too cluttered and can take too long to load, which can be frustrating, and as a
business aspect it could lose clients.
Page 31 of 161
To display an image you need to specify the URL of the image using the src attribute,
replacing url with the filename of your image. There are several ways this can be done:
src="picture.jpg" - the filename if the image is in the same directory as the html
file.
src="http://www.simplehtmlguide.com/images/photo.jpg" - a full
URL can also be used.
The alt attribute defines the text shown in place of an image when the image cannot
load. This is actually a required attribute for valid html, and should briefly describe what
the image normally would.
An image will normally be shown actual size, but by using the width and height
attributes you can change the displayed size. You can specify the size in pixels or as a
percentage. Tip: specify the size using the actual size of the image in pixels to force
browsers to allocate space for the image before it is even loaded, ensuring you page
layout remains the same with or without images displayed.
Add a border by specifying the thickness in pixels. You can also set border="0" to
remove the border added when images are used as links. (*)
By default an image appears at the place specified in the html code(as with any other
tag). However, you can align an image with the surrounding text or paragraph by setting
any of align="left | right | top | bottom | middle". (*)
Adjust the whitespace (or runaround space) around an image, in pixels. Use vspace to
adjust the vertical spacing above and below, or hspace for the left and right sides. (*)
Example:
Show an image using html
Page 32 of 161
<html>
<body>
<p><img src="photo.jpg" alt="parakeet"></p>
</body>
</html>
There are two main parts to a link tag: the text a user can click, and the web address
they go to if they click it. The bit between the <a> and </a> tags is the link text, and is
generally displayed in blue and underlined by web browsers. The href="url" part is
the web address, where url can be set in several ways:
It is often usefull to link to other places on the same webpage, such as other sections or
chapters further down the page. The technical term for this is linking to a Fragment,
where browsers will automatically try and scroll to that part of the page.
Fragments first need to be defined somewhere in a webpage by giving them a name, for
example <a name="fragment_name">, then links to this fragment are created by
using the hash (#) character: <a href="#fragment_name">Link</a>. To link to
a fragment on another page you would simply append the fragment name to the
address, for example: href="example.html#fragment_name".
You may not always want to link to a page and have it load up over the one you are
currently viewing. Thats where the target attribute comes in handy. By setting the
target="_BLANK" the page you link to will load up in a new window (or new tab in
some newer browsers). Similary, "_self", "_parent", or "_top" will open
the link in the current window, the parent window (used with frames) or the top level
window, respectively.
Page 33 of 161
By placing an image tag between the <a> and </a> tags, you can turn an image into a
link, and clicking on that image will then load the referenced page. You may notice that
the image gets a blue border just as link text became underlined. This can be resolved by
setting the border="0" attribute of the image, or using css.
A special kind of link, the mailto notation link instructs the browser to compose and
email to the specified address using the default email program. It but does not actually
send any emails automatically. You can also set a subject for the email by using <a
href="mailto:htmlguide@drgrog.com?Subject=Linking">email
me</a>. You may notice that I have used this type of link over on the contact me page.
7. HTML Lists
Learn how to create lists on a web page. Lists are the preferred way to display items one
after the other, instead of using <br> tags. Lists have a tag to start and end the list itself,
as well as a tag for each item in the list.
There are three types of lists, ordered, unordered and definition lists.
Unordered Lists
An unordered list is a bulleted list, similar to the menu on the right (although the menu
has been altered using stylesheets to use images instead of the standard bullets.)
Define Unordered List - <ul> ... </ul>
Use the <ul> tags to define the start and end of an unordered list. A number of list
items (li elements) will go within the ul tags.
Add the text for each item in between some <li> and </li> tags. Each list item must
have its own li tags.
By default a browser will show a round bullet. This can be changed by using the type
attribute of the ul tag, which will change the bullet type for the entire list.
You can set the type of bullet for an item in the middle of the list by setting the type
attribute of an li tag.
Example:
Page 34 of 161
<html>
<body>
<ul>
<li>An item</li>
<li>Another item</li>
</ul>
</body>
</html>
Ordered Lists
This list is used to create and indexed list, such as a numbered or alphabetical list.
Define Ordered List - <ol> ... </ol>
Use the <ol> tags to set the start and end of the list. A number of list items will then go
between the ordered list tags.
Each item must use the <li> tags the same as with an unordered list. But this time the
browser will number each item automatically, instead of showing bullets.
Set the type of list index by using the type="?" attribute. The default style is numeric,
and you can also choose from upper or lowercase, alphabetic or roman numerals.
Set the starting number (or letter) if you dont want the list to start at 1 or A.
You can set the value of an item in the middle of the list manually, if you do not want it
to follow the previous letter or number. Simply set the value attribute of the item you
wish to change. Note: subsequent items will follow the new value.
Example:
<html>
<body>
<h3> Ordered List </h3>
<ol>
<li>Item one</li>
<li>Item two</li>
</ol>
<h3> Modified Ordered List </h3>
Page 35 of 161
<ol type="A" start="6">
<li>List item 1</li>
<li>List item 2</li>
<li value="12">List item 3</li>
<li>List item 4</li>
</ol>
</body>
</html>
Definition Lists
This type of list is used to define and describe terms, much like a dictionary. Typically an
entry in the list consists of a term, and a definition of that term. A browser will usually
bold the term, and indent the definition.
Define a Definition List - <dl> </dl>
Set the start and end of a definition list. All entries go within the dl tags. Each entry will
usually consist of one dt and one dd element.
The title of a term being defined. Note: you may have a term with no definition, or
multiple terms with the same definition.
The definition of a term. Note: you can have multiple definitions for a single term.
Example:
<html>
<body>
<dl>
<dt>Term 1</dt>
<dd>Definition of term 1</dd>
<dt>Term 2</dt>
<dd>Definition of term 2</dd>
</dl>
</body>
</html>
8. HTML Tables
Table tags are used for displaying spreadhseet-like data neatly formatted in rows and
columns. They can also be used to design page layouts by placing content into invisible
rows and columns of a 'table'.
Table - <table> ... </table>
Page 36 of 161
Used to define a table, it contains all row and column tags along with their content.
Think of it like the body tag, although there must always be at least one row in a table.
It has some attributes to define the table layout.
border="?" - The size of the border (in pixels) surrounding the table
cellspacing="?" - The space (in pixels) between each cell, eg. between rows or
columns
cellpadding="?" - The space, or margin, between the content of a cell and its
border
To start a table row, the tr tags must appear within the table tags.
A table cell is where the content goes. Cells must exist within rows, where the number
of cells in a row determines the number of columns in the table. Cell properties can be
set using the attributes:
width="?" - Specify a fixed with of a cell, by default they will only take up as much
space as they need.
colspan="?" - Column spanning allows a cell to take up more than one column, in
order to match layouts of other rows. Replace ? with the number of columns to span.
nowrap - No text in the cell will be wrapped onto the next line. Similar to the nobr tag
for paragraphs
Similar to a table cell, a header cell must appear within a table row. Normally found in
the first row, header cells are usually shown in bold and centered by the browser.
Example:
Page 37 of 161
A simple table with three rows and two columns.
<html>
<body>
<table border="1">
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>Cell A1</td>
<td>Cell B1</td>
</tr>
<tr>
<td>Cell A2</td>
<td>Cell B2</td>
</tr>
</table>
</body>
</html>
9. HTML Frames
Frames allow you to have multiple sections of the browser window, called frames, each
showing their own .html file within the frame. This used to be common practice when
trying to show separate sections of a site in separate sections of the browser window, such
as a header at the top, navigation at the side, and the rest was page content that someone
could scroll down without making the header and navigation disappear.
Frame sets are rarely used these days, as the introduction of server side scriping
languages such as php and asp allow you to create content pages dynamically. The
introduction of HTML5 has also provided new methods of doing page layouts without
having to use frames.
Used instead of the body tag, the frameset tag defines a group of frames. Setting the
rows and cols attribute allow you to create the number of frames needed for your
layout.
rows="??,??" - To set up multiple frames in rows, replace the question marks by the
size of each row, either in pixels or as a percentage. A * can be used as a wild card, for
instance: rows="100,*" would give you a top frame of 100 pixels high, and a bottom
frame using the rest of the screen.
Page 38 of 161
border="?" - Frame border thickness in pixels.
Frame - <frame>
Each frame within a set will need a frame tag to tell it which web page to load in the
frame. It uses the attribute:
scrolling="auto" - Each frame will have vertical and horizontal scroll bars appear
automatically when needed. You can change this by setting the scrolling attribute
to yes, no, or auto.
Very old browsers are unable to display frames, and in this case we need to specify what
these browsers should display instead of the frames. Even though this is not much of a
problem anymore, it is still suggested that you specify unframed content when using
frames. Anything between the noframes tags will not be shown in modern browsers
that show framed content.
Example:
A frame example with one header row, a left & right side column, and the content in the
center.
<html>
<head>
<title>Example - Frames</title>
</head>
<frameset rows="100,*">
<frame name="top" src="frames_top.html">
<frameset cols="50,*,50">
<frame name="left" src="frames_left.html">
<frame name="mid" src="frames_middle.html">
<frame name="right" src="frames_right.html">
</frameset>
<noframes>
<i>error to display to those who cannot see frames</i>
</noframes>
</frameset>
</html>
Page 39 of 161
TOPIC 4: WEB AUTHORING AND DESIGN
TOOLS
T4.1) Description of web design tool
Web design is the process of creating websites. It encompasses several different
aspects, including webpage layout, content production, and graphic design. While the
terms web design and web development are often used interchangeably, web design is
technically a subset of the broader category of web development.
Websites are created using a markup language called HTML. Web designers build
webpages using HTML tags that define the content and metadata of each page. The
layout and appearance of the elements within a webpage are typically defined using CSS,
or cascading style sheets. Therefore, most websites include a combination of HTML and
CSS that defines how each page will appear in a browser.
Tools of web-design
Some web designers prefer to hand code pages (typing HTML and CSS from scratch),
while others use a "WYSIWYG" editor like Adobe Dreamweaver. This type of editor
provides a visual interface for designing the webpage layout and the software
automatically generates the corresponding HTML and CSS code.
Another popular way to design websites is with a content management system like
WordPress or Joomla. These services provide different website templates that can be used
as a starting point for a new website. Webmasters can then add content and customize the
layout using a web-based interface.
While HTML and CSS are used to design the look and feel of a website, images must be
created separately. Therefore, graphic design may overlap with web design, since graphic
designers often create images for use on the Web. Some graphics programs like Adobe
Photoshop even include a "Save for Web…" option that provides an easy way to export
images in a format optimized for web publishing.
Freedom to create. I need a tool where I don't feel crippled, where I can realize
my own vision. Templates are great, but I also need to tweak and change things
the way I want.
Responsive design for any screen. Phones, tablets, watches, 4K monitors -
screens are becoming more fragmented every day. Many tools seem to ignore this
completely, others do it very hard to use.
Page 40 of 161
SEO support. Very important, and needs to be updated as best practices change.
E.g. keywords are no longer relevant to Google.
Rich content. Video, animations, interactive widgets. The web is an interactive
medium and should be treated as such.
Standard, normal, or design view - This is typically the default view, which is a blank
screen on which you type, paste, or insert content. This is very similar to a word
processor screen.
Code view - Allows you to view and work directly with the HTML code.
Split - Both of the above views are displayed simultenously in separate windows.
Activity
Find how to switch between views in your web authoring software. Does the software
provide more than one way to do this? Try typing something on the screen in Normal or
Design View, then switch to Code View to see the HTML that was generated by the web
authoring tool.
Ask your instructor for instructions on how to open and save files with your web
authoring software in your school's computing environment.
Now open your portfolio file unit6.htm in your web authoring software. At this point the
page should have a banner, a navigation menu, and a pair of W3C icons. Practice
switching between views and exploring your page using your web authoring tool.
Page 41 of 161
Example #2
The following is a sample toolbar from Microsoft FrontPage. To create an <h1> heading
in FrontPage, use the dropdown menu to select Heading 1, type your heading text, then
press Enter.
Activity
Add a main heading "Unit 6: Web Authoring Software" to your web page, just beneath
the menu. Since you already know how to do this with source code, try doing it using the
graphic view, then check your source code to see what code was inserted by the
software.
Now add a subheading "My Web Authoring Software" beneath this.
As in previous lessons, add a named anchor to this heading with name="software". In
some web authoring tools, this feature may be called a bookmark. See if you can figure
out how to add it using your software's menu system or graphic interface.
Beneath this subheading, write a short paragraph identifying what web authoring
software you're using, including the version number.
After you've added this content to your web page, switch to Code View to see the HTML
that was generated by the web authoring tool. Does it differ at all from the HTML you
would have used if you were coding this page manually?
Page 42 of 161
Activity
Explore your software, and find out how many ways there are to add a link to your web
page.
Create a new section in your web page with subheading "List of Links", and a named
anchor "links"
In this new section, use your software's graphic interface to add an unordered list of
links to a few of your favorite websites.
Now switch to Code View to see the HTML that was generated by the web authoring
tool.
Open your portfolio home page (index.htm) in your web authoring software. See if you
can figure out how to link to a specific named anchor within a document. In the
appropriate places on your home page, convert items to links to the new sections in
your Unit 6 document.
Page 43 of 161
Activity
Explore your software, and find out how to insert a picture.
Create a new section in your web page with heading "Inserting an Image" and named
anchor "image".
In the new section, insert the 3D Box image that you created in the lesson on Basic
Image Manipulation.
Explore the various options that are available for image properties. Try chang some of
these properties to see what happens. Be sure to add alternate text to the image for the
benefit of those who can't see it.
After changing image properties, switch to Code View to see the HTML that was
generated by your changes.
When you browse a web page, the URL might be preceded by http://. This is telling
the web browser to use HTTP to transfer the data. Most browsers will default to HTTP if
you don't specify it. You can test this by typing in say... www.quackit.com (instead of
http://www.quackit.com).
HTTPS
HTTPS stands for Hypertext Transfer Protocol over Secure Socket Layer. Think of it as a
secure version of HTTP. HTTPS is used primarily on web pages that ask you to provide
personal or sensitive information (such as a password or your credit card details).
When you browse a web page using HTTPS, you are using SSL (Secure Sockets Layer).
For a website to use HTTPS it needs to have an SSL certificate installed on the server.
These are usually issued by a trusted 3rd party, referred to as a Certificate Authority
(CA).
When you browse a web page using HTTPS, you can check the details of the SSL
certificate. For example, you could check the validity of it. You could also check that the
website does actually belong to the organization you think it does. You can usually do
this by double clicking on the browser's padlock icon. The padlock icon only appears
when you view a secure site.
Firefox also displays a padlock at the bottom right of the browser window, along with the
common name of the organization that the certificate was issued to:
FTP
FTP stands for File Transfer Protocol. It is used to transfer files across the Internet. FTP
is commonly used by web developers to publish updates to a website (i.e. to upload a new
version of the website).
Where HTTP is used for displaying the file in your browser, FTP is used simply to
transfer the file from one computer to a specified location on another computer. You can
use FTP to transfer the files from your computer to a remote computer (such as a web
server), or to transfer from the remote computer to your local computer.
Page 45 of 161
Internet Service Provider (ISP):
Is a business or organization that offers users access to the Internet and related services ,
examples being BT, Virgin Media, Talk Talk.
Domain Name:
The name that identifies a website. For example, Facebook.com.
Doctype:
The doctype declaration specifies which version of HTML is used in a document. It has a
direct effect on whether your HTML will validate , an example of this would be:
1. Quality Web Content. There‘s one primary reason people use search engines and
browse websites, and that is to search for information. People desire information every
day, and want if delivered in a fast and reliable fashion. Whether to entertain, entice or
educate, superior content is a must in every frequently visited website, especially if search
engine optimization is part of the website's overarching marketing strategy.
For business websites, content should include important information and come in the
forms that are pertinent to the business. Retail sites for example, need high quality
pictures of their products, while consulting firms are more apt to highlight client
testimonials. A best practice for most search engine optimization gurus is also ensuring
the most relevant content is prominent on the webpages.
Page 46 of 161
3. Simple and Professional Web Design. Bells and whistles may seem nice in concept,
but they rarely add much value to an effectively constructed and sensible web design.
Typically, the websites best at effectively converting site visitors into buying customers,
maintain an attractive layout, but keep it clean and simple. Google is an excellent
example of such a site. Actually, users found Google‘s initial design over simplified
during the initial testing phases. Thus in order to keep a simple interface, but prevent the
appearance of site constructed without much thought, Google added the ‗I‘m Feeling
Lucky‘ button underneath the search box. Despite the fact that hardly anyone clicks on
this button, its addition balances the layout in such a way that delivers a better user
experience.
To keep websites simple, without making them look bland such as in Google‘s case, a
balanced distribution of content and graphics is required and the use of slightly
contrasting colours and clear fonts is key. Colours that are scream, are overtly
contrasting, and font sizes that are difficult to read will put a strain on visitors‘ eyes. Also,
one should break up sizeable blocks of text with either spacing or images as appropriate.
4. Webpage Speed. People inherently lose patience quickly, and that holds true when
visiting a website. The longer a website takes to load, the more likely a person will leave
before it fully renders. Beautiful graphics and substantial content become useless if a
site‘s speed hampers its ability to deliver content quickly.
Several factors affect site speed, including server speed, the number of graphics, website
traffic, etc. A web design company must make sure to minimize all controllable factors
slowing down site speed by using reliable site hosting, proper website code, and
optimized graphics.
6. Web Compatibility. The variety of browser and platforms which one can now be view
web design can present a challenge to developers, but talented ones are accustomed to
handling such factors. A site should easily render on various resolutions, screen sizes, and
browsers; and with the increasing popularity of mobile devices, websites should function
properly on the plethora of these types of devices.
When it comes to web design, remember that not all that glitters is gold. Know what truly
makes a well-built site and you‘ll soon find your website quickly on its way to attracting
and retaining customers
Page 47 of 161
T4.5) Description of authoring tools
Web development can range from developing the simplest static single page of plain text
to the most complex web-based internet applications,
A platform is the underlying programming language that the site will utilize. The most
popular development platforms are HTML, PHP, .NET, and JSP.
Dream weaver is one of the applications that help manage webpages developed in the
above platforms… and so are synonymously regarded as web platforms too though are
only web development tools
What is Dreamweaver? Dreamweaver helps you to create web pages while it codes
html (and more) for you. It is located on the bottom tray or in the start menu, under
Macromedia.
Page 48 of 161
Creating a new page:
Under ―File‖, select ―New‖. Make sure it is set on ―Basic Page‖ and ―HTML‖.
The Site Panel allows you to easily access, view and manage the files and folders that
make up your site. This is optional, but useful.
From the top menu, select SiteNew Siteclick the ―Advanced‖ tab. Fill in the Site
Name (―bob‘s site‖), the Local Root Folder (the folder where all pages of your website
are contained), and the http address (the exact online location of your site—
http://www.mtholyoke.edu/~bob/main_folder_name).
The two commonly used tool bars are the Insert bar and the Properties inspector. If
they are not visible on your screen, pull down these options under Windows (Insert
and Properties) at the top, or press F4 on your keyboard.
Page 49 of 161
The Property Inspector allows you to view and change properties of selected objects or
texts.
The Insert bar contains buttons for inserting various types of objects, e.g. images,
tables and text into your page.
The Document toolbar contains buttons and pop -up menus that provide different views
of the Document window (e.g. Design view, Code view) and gives you access to
references and a preview of your page in the browser of your choice. If the document
toolbar is not already visible, go to View Toolbars Document in the top menu.
To preview your page in a browser click on the Browser Preview on the Document
toolbar or choose File Preview in Browser. You must save the page first to see
changes.
Page 50 of 161
Page Title and Page Properties
Page Title: It is important to title new web pages. A good habit to adopt is to title your
page before you do anything else. The page title appears in the top title bar of the browser
window and if bookmarked, the title of the bookmark. Without a title, ―Untitled
document‖ will appear. You can yype in the page title in the Title box located in the
Document toolbar.
Page Properties
The default appearance of text, background color, page margins, color of links, and
other properties can be changed in the Page Properties window. Go to Modify
Page Properties or press Control + J on your keyboard to open the Page Properties
dialog box. It is important to establish defaults on text as different browsers may
have different defaults.
Page 51 of 161
In this section, to cover the basic functions, we will create a simple personal home page
with the following elements:
Text
Table
Image
Hyperlink
Mailto: link
Background color
Note: SAVE YOUR PAGE NOW. Saving a page before inserting elements helps avoid
prompts for defining full web sites and will help keep the code references calling for
links and images relative to the document.
Backgrounds:
You can set your background color here. It is important to consider readability—good
contrast between the text and background color. Neons are bad!
If you have an image to use as background on your page, select ‗Browse‘ and click on
the image you want to use as your background. The image will tile (repeat the image)
over the entire page.
Text - Inserting
As with most web authoring programs, the essential method of inserting text with
Dreamweaver is this
To insert text:
You can also copy and paste from most any other text-based document but the result is a
pretty boring chunk-o-text. Text must be formatted to achieve a more interesting look and
easy-to-read layout.
Page 52 of 161
For the home page exercise and use the table we created to contain the 'header'
information. Type the following text (substitute your personal information if desired) in
the far right cell of the 2nd row:
Note on Line Breaks: Pressing Enter will give you a double-space between lines.
Shift-enter will single-space.
Professor of Webology
Room 1234
Phone x5678
Email: jsmith@oakton.edu
Your page should now look something like this (don't worry if the cell widths don't
match... yet).
As it is with word processing, what you type will appear to be in Dreamweaver's default
font-- generally Times Roman or Arial. This does not impact how the text will ultimately
look in a web browser. If text is left unformatted, a web browser will apply its own
default. (Even after formatting, it is still possible for a browser to override.)
Text - Formatting
Text formatting (e.g., size, typeface, color, etc.) can be accomplished in a number of
ways. More sophisticated web sites will use Style Sheets for much of this. Style Sheets
are a set of commands that control the look and layout of web pages. Depending on how
they are used, they can be applied to multiple pages or a portion of a single page. Though
Style Sheets are beyond the scope of this introductory document, they are becoming
standard and are worth learning as your skills and interest progress.
Page 53 of 161
The most common way to format text in simple web pages is to apply formatting
commands to individual words, phrases or lines of text. This is done by selecting the text
and using the Properties palette to make changes.
To format text:
2. Use the Properties Palette to change the text appearance. If you are formatting text in
a table cell, the Properties palette will show text commands on the upper half of the
palette and table/cell commands in the lower half.
Page 54 of 161
Alignment. Selected text can be left-justified, centered or right-
justified.
Bullets and numbers. Select multiple lines of text then click one of
these to make the list bulleted or numbered. To add to the list later,
place the cursor at the end of a line and press the Enter key. Note
that if you wish to format numbers and bullets, you may do so by
going to the Text Menu and clicking on "List."
Indent/Outdent. Selected text will be moved left or right.
Text size. Drop menu of relative text sizes.
Alignment within a cell. Click in the desired cell and use the
Horizontal and Vertical Alignment drop menus on the Properties
panel to set how everything in the cell aligns. Commonly, text will
be aligned ‗top‘ and ‗left.‘
(You can also drag the mouse from one corner cell to the opposite
corner, selecting all cells, and THEN set the alignments for all the
cells at the same time.
Page 55 of 161
Tables
Tables are great for organizing and giving structure to the page.
Cell Padding – specifies the amount of spacing between the content and the cell edge
(wall) Cell Spacing – specifies the amount of spacing between each table cell, not
including the border
Table Width – specifies the width of the table in pixels or as a percentage of the
browser window. For precise layout of text and images, it is recommended that you
specify tables in pixels.
Nested tables: When creating nested tables, i.e. table(s) within table(s),
designate specific pixels on the outside table. 700 is one standard. Another option
is to the outside table at 100%.
Page 56 of 161
For tables inside main table percentages are generally used rather than pixels.
Border thickness: specifies the width of the table border. A border of ―0‖ means the
lines will appear invisible.
Select the entire table or a cell and click the Background color or Border button in the
Property Inspector.
Split/Merge Cells: You can split (divide the selected cell) or merge (unify selected
cells) by selecting the appropriate cell(s) and clicking either the split or merge icon
in the properties inspector.
Inserting Images
It is recommended that your image be the size you want it to appear on your Web page,
rather than enlarging or shrinking the image in your HTML editor. You should set the
image resolution to 72 dpi (close to standard computer display resolution) to hold down
image file size. Photoshop can help you do this (use the ―Save Images for the Web‖
option).
To insert an image:
Place the cursor where you want the image to appear on the page and then click the
Image icon on the Insert bar, or go to Insert Image on the top menu.
In the dialog box that appears, click Browse to choose a file. It must be in your website
folder.
Click ‘OK’
A rollover is an image that changes when the mouse cursor moves across it. A rollover
consists of two images: the primary image (the image displayed when the page first
loads) and the rollover image (the image that appears when the cursor rolls over the
primary image).
Page 57 of 161
To create a rollover:
It is essential that both images are exactly the same size or the images will not appear
correctly. You can do this in a drawing program.
In Dreamweaver, place the cursor in the Document window where you want the rollover
to appear.
On the Insert bar, click the Rollover icon or go to Insert Image Objects Rollover
Image.
The Insert Rollover Image dialog box will appear. Browse to select an image file for
the original and rollover image.
4. Make sure the Preload Rollover Image option is checked so that the
rollover image loads when the page opens in a browser. This ensures a
quick transition between the images.
5. To create link, in the ‗When clicked go to URL‘ box, browse to select a file.
6. Click OK.
Creating Links
Links are used to navigate between pages in your site and to introduce material from
other web sites.
Page 58 of 161
To create a link
An email link opens a new message window (using the mail program associated
with the user's browser) when clicked. In the email message window, the To: field
is automatically filled with the address specified in the email link.
o In the Document window, position the insertion point where you want the
email link to appear, or select the text you want to appear as the email link.
o On the Insert bar, select the Email icon (looks like an addressed envelope). Or
you can go to Insert Email Link in the top menu.
o In the Text field of the Email Link dialog box, type or edit the text to appear
in the document as an email link.
o In the Email field, type the email address that will appear in the To: field.
o Click OK.
Page 59 of 161
Inserting a Last Updated Date
Inserting Anchors
Anchors mark specific positions in a page(s). Use named anchors to jump to a marked
position in the current document or to link to a marked position in a different
document.
In the Document window, place the cursor where you want the named anchor.
Click on the Named Anchor icon on the Insert bar or go to Insert Named Anchor from
the top menu.
Enter a name (no spaces) for the anchor in the dialog box that appears. (If the
anchor marker doesn't appear at the cursor location, choose View Visual Aids
Invisible Elements.)
To link to an anchor named "two" in a different file in the same folder, type
filename.html#two.
Page 60 of 161
Saving
It is good practice to save web pages without capitals, spaces, or funny characters.
This will ensure that the page will appear on all browsers, as well as make it easier to
type in the address correctly.
The homepage of your website should be saved as ―index‖. This means that instead of
getting a file directory (where everyone can see ALL the files in your folder) your
homepage automatically loads. In any folder, the file named ―index‖ is the homepage.
You can tell if a page hasn‘t been saved or not if the tag selector has an asterisk.
―index.html‖*
A quick and dirty way to use a page as a template is to either create a copy with a
different name or copy and paste the code.
NOTES:
Photoshop and Illustrator are great for creating banners and images. We have
workshops for that!
Resources: Don‘t forget the Dreamweaver Help and tutorials. There are also
numerous websites for html. Using a search engine to find a solution to a specific
problem works pretty well. Consultants hold hours in the Info Commons. Come
bother us.
Introduction
Layers are squares that can be placed wherever you want in the Page, we can insert
HTML content in them. Those layers can be hidden and overlapped between them. This
gives you a great variety to design.
You can insert text, tables, images, and flash animations inside the layer's square, and
also all the elements that an HTML file can contain.
Page 61 of 161
This icon is used to select the layer when you click on it, and when you clear it, you are
also clearing the layer.
Inserting a layer
Layers can be inserted in a Page through the Insert menu, and then selecting the Design
object option, and Layer.
Once the layer is inserted, you can edit its attributes by selecting it.
You can select layers through many different ways. One of them is clicking on the
icon. This is not useful when there are many layers in the same file because all layers
have an image like this one associated, and it's very easy to select the wrong one.
Layer format
Layer's properties are shown through its properties inspector
Layer ID is the layer's name. You can change it through the Layers panel, and double-
clicking it.
L and T indicate the pixels distance between left and top limits of the document and the
layer.
Page 62 of 161
W and H indicate the layer's width and the height.
Z-Index is the depth order of the layer. This value can be changed through the Layers
panel. A layer will be overlapped by others which greater Z-index.
Vis indicates the inital view of the layer. Visibility can accept four types.
Visible (It shows the layer although the Page isn't being seen)
You can also change the view through the Layers panel by clicking on the eye image.
The open eye indicates Visible, and the closed eye indicates Hidden.
Through Bg Image and Color you can indicate an image or a background color for the
layer.
Overflow controls how the layers appear in a browser when the content exceeds the
specified size of the layer.
Visible indicates that the layer would be amplified to make its content fit.
Hidden specifies the additional content will not be shown in the browser.
Scroll specifies that the browser should add scrolling bars to the layer although they are
or not needed.
Auto makes the browser show the scrolling bar when they are needed (when the layer
content is bigger than its limit).
Using Frames
We are going to see what Frames are and when they must be used. We will also see how
to insert a simple frame into a website and how to work with it.
Page 63 of 161
Introduction
This is something that you cannot do if you edit each framed file individualy.
Working with frames can be a bit complicated, and even more so in the begining. We are
not going to go too much into the theme, and we will only look at some of the basic
concepts with a few easy examples.
Page 64 of 161
Creating frames
There are many ways of creating a frame. We
will only learn one.
Page 65 of 161
In case of inserting a right frame instead of a
left frame, the empty frame will be shown to
the right of the original file.
Selecting frames
Page 66 of 161
Saving Frames
All documents that have frames must have a Page inside each one of them. This is why
when you create a frame, new pages are loaded by default in each one of them (apart
from the frame that has the original page).
These new pages can be replaced later by other existing pages as we'll soon see.
If you save the page that has the set of frames, each one of the pages included in their
frames we'll be saved too.
It is not recommendable to save the frames for the first time using the Save all
option, because we can make mistakes when naming the new files.
It's preferible saving each file (one by one) unless all the frames had an already existing
page, because in this case the unique file that will have to be named will be the one that
has the set of frames.
To save a file that has a set of frames, you have to previously select it.
To save each one of the documents, you just have to place the cursor on one of them and
click on the Save button.
Setting up Frames
After selecting a frame through the Frames panel, its properties can be established
through the properties inspector.
Each frame has a name assigned that can be changed through the Frame name option.
The name cannot have blank spaces.
In Borders you can select a line that splits the frame from the rest of the frames. In case
of showing the border, a color for this can be specified through Border color. You can
also establish a width for the border through the Width option.
Scroll will indicate whether scrolling bars will be shown or not when the frame file
cannot be completely seen.
Page 67 of 161
If the No resize option is activated, it indicates that users won't be able to change the
frame size in the browser.
The Margin width and Margin height set the separation between the content of the
frame and its right-left and top-bottom borders.
If all the sets of frames are selected, then the Properties inspector will display the
following options:
In Borders you can add a line to split the frame from the rest of the frames. In case of
showing the border, a color for this can be specified through Border color. You can also
establish a width for the border through the Width option.
The Column field (or Row) is used to set the frame size, and it can be introduced as
Pixels, in Percent (of the window) or Relative (proportional to the rest of the frames).
You will usually use two frames, one of them with size in Pixels, which will contain the
browser bar, and the other frame with a Relative size, to adjust it to the rest of the
browser window.
Frame content
As you have seen, the frame content can be established through the Src field of the
properties inspector.
When we work with frames, our aim is to load different files in at least one of them.
Through the Src field of the properties inspector, it's only possible to specify the file
that will be loaded in the frame in first time, but we can change this later using links.
Page 68 of 161
As you remember, in the hyperlinks unit we learnt the possible links destinies. Those
destinies could be _blank, _parent, _self, and _top. Let's see again what are they used
for. You now know how to work with frames and they will be easier to understand.
_parent: Opens the linked file in the frame window that has the link or the set of main
frames. As you know, the main frame is the frame where the initial file is and where the
rest of the frames have been inserted.
_self: Is the predetermined option. It opens the linked file in the same frame or window
as the link.
Opening the linked file in the whole browser window means that the window frames will
disappear when you open the link in it.
teacherClick courses can be seen on the net using a top frame with pull-down panels
Using behaviors
In this unit we're going to learn the basic characteristics of the behaviors, and also look
at a pair of examples of possible applications.
Introduction
behaviors are actions that happen when the userdoes something over an object, for
example moving the mouse over an image, clicking on a text, double-clicking on an
image map, etc.
Page 69 of 161
behaviors don't exist as HTML code, they are programmed with JavaScript.
Dreamweaver allows you to insert them through the Behaviors panel, so it is not
necessary to write a JavaScript code line to program them.
The image below has a behavior associated. Place the mouse over it to see what happen.
The image has two behaviors associated to show and hide the layer. We'll look at this
kind of behavior later.
Other behaviors you have seen are the ones applied to sustitution bars and browser bars,
they are predefined, and for this reason it isn't necessary to introduce the set of behaviors
through Behavior panel.
To validate forms you saw some of the caracteristics of Behavior panel. Let's remember
which we need to insert behaviors later.
The Behavior panel can be opened through the Window menu, and then the Behaviors
option, also by pressing Shift+F3.
Page 70 of 161
Inserting a behavior
To clear any behavior, you need to select it in the Behaviors panel and click on the
button. You can also change the order of the behaviors applied to an object, by selecting
them and arranging their order through the buttons.
One of the most habitual and interesting behaviors is Show and Hide layers. It is
obvious that when you want to apply this behavior there need to be layers present in the
document.
Page 71 of 161
In the previous Page you had an example of this type.
Let's see which events and actions you need to
establish in order to produce the behavior.
It's not necessary to apply a different view to all the layers of the page, only the ones you
want to change at the moment of producing the event. For example, in this case the
"catmonth" layer has not been applied a different view, because we don't want it to
change when the event plays out.
If you want to clear an established view for any of the layers, you only need to click again
on the button of the applied view. For example, to clear the view applied to the "catweek"
layer, we would have to click again on the Show button.
You need to be careful about what you want - in this case it is that when you place the
mouse on the image the layer is shown, and when the mouse is out of the image the layer
Page 72 of 161
is hidden again. For this you need to insert two Show-Hide layers behaviors with the
action. One of them will show the layer for the event onMouseOver (when the mouse is
over), while the other will hide it for the event onMouseOut (when the mouse is out).
Another behavior that can be applied on any object is Call JavaScript. This behavior
allows us to insert JavaScript code inside the file.
For example, it's possible to make the browser window close when you click on an object.
To do this you need to insert a "window.close();" JavaScript line.
The same as the layers example, the first thing to do is to select the object on which the
behavior is going to be applied. After this you need to select the Call JavaScript action
through the button.
Then a new window shows up and you now need to introduce the JavaScript line.
Once the behavior is inserted in the Behavior panel, you need to establish an onclick
event to produce the call to JavaScript when clicking on the object.
By clicking twice on the action the previous window is opened again, and it's possible to
modify the line code.
Page 73 of 161
Introduction to Adobe Flash
Adobe Flash (formerly called Shockwave Flash, often just called Flash) is a multimedia
software platform used for production of animations, rich Internet applications, desktop
applications, mobile applications and mobile games. Flash displays text, vector graphics
and raster graphics to provide animations, video games and applications. It allows
streaming of audio and video, and can capture mouse, keyboard, microphone and camera
input.
Flash creates vector-based graphics rather than bitmap graphics. Vector graphics are
created using lines and curves, whereas bitmap graphics are described by pixels of color.
Bitmap images are resolution dependent; therefore, resizing a bitmap image can lead to
distortion. Vector-based graphics, on the other hand, are drawn using mathematical
formulas. Resizing a vector-based image means the formula is recalculated, resulting in a
scaled version of the original image and no distortion.
Flash MX supports the importing of bitmap graphics. This feature gives the Web
developer a great deal of flexibility. The addition of a Flash movie to a Web site invites
interactivity and provides an opportunity for visitors to have a more engaging experience.
Name layers with short meaningful names that you will be able to identify at a glance.
Such as "red ball bounce," or "button home." These aren't read by Flash, so they just have
to have meaning to you.
Page 74 of 161
NOTE: You can have as many layers as you want (or as your system can handle). Layers
do not add to file size.
Create a guide layer by choosing Modify > Layer and selecting the "guide" option. A
guide layer is used to help in drawing. Any layer can be made into a guide layer. The
artwork appears in your work area, but not in the published movie. When you see this
icon next to the layer name, then it is a guide layer.
Layer Attributes
You can change the order of the layers by dragging them up or down in the Timeline.
The icons across the top of the Timeline control different attributes of the layers.
The first changes the visibility of the layer to Off or On. This is helpful if you
don't need to see that layer to work on a different layer. Even if you have the
visibility of the layer turned Off, it will still show up in the published movie. If
you want the layer to be visible, but not show up in the published movie, change
the layer to a guide layer. The page icon on the layer will then change to a ―t-
square shape‖
The Lock icon locks the layer so that you can't make changes on it.
The Box will change whatever artwork is on the layer into an outline. It will show
up as the artwork, not as an outline in the movie.
You can also change the height of the layer. This may be necessary if you have a sound
file on a frame and you want to see the whole sound wave representation. To change the
height, Control+Click on the layer (Macintosh) or right-click (Windows) and choose
Properties. Adjust the layer height in the Layer Height box at the bottom of the menu box.
Page 75 of 161
Exercise:
1. Create an object on a layer, click on the eye and test movie. You should
see that even though the layer is invisible, the object shows up. (In order
to test a movie, it must be saved first.)
2. Change the object to an outline, and do the same thing. It should look the
same.
Change the layer type to a guide and test. Even though the object is visible, it
won't show up in the test movie.
When working with colors in Flash, you may want to organize the Swatches, Mixer and
Fill panels into one window. These three panels are used together very often with colors,
and you can save and recall this panel layout.
Click on the Mixer panel tab. Select the color swatch next to the bucket symbol.
This is the Fill color.
Select another color from the drop down swatches menu or by using the sliders
from the RGB sliders on the right. These sliders can be switched from RGB (Red,
Green, Blue) to HSL (Hue, Saturation, Luminance) or HEX (Hexidecimal) using
the left pointing arrow on the Mixer panel.
Adjust the transparency of the new color with the Alpha text box or slider.
Page 76 of 161
When the color and transparency is set, select Add Swatch from the right pointing
arrow on the Mixer panel.
Switch to the Swatches panel. The color you created is at the bottom of the color
swatches. Now you have a custom swatch palette that you can save and call into
other Flash sites.
From the Swatches panel, choose the green radial gradient type. (You can change
the type of gradient later.)
From the upper right arrow choose Duplicate Swatch.
To alter a portion of the gradient, select one of the color boxes under the bar that
defines the gradient.
Next, use the "color fill" box above to choose another color.
Now select the other color and choose a new one. You can change the gradient
type from the pull-down menu to create various types of gradients.
Change the gradient type to Linear.
Now look at your swatches and you'll see the new gradient you made at the end of
the gradients.
Gradient color swatches can only be used in fills. Transparent fills can only be
applied to new objects. They will not replace a fill already there. You will have to
select and delete the fill before refilling with the transparent color. This might
have to be a two-step process. If there is no stroke on your object, add a temporary
one with the inkwell tool. Use that to define the area to be filled, then you can
delete the stroke again.
Page 77 of 161
Modifying the gradient's size, position and rotation inside of a filled object.
A center point appears in the center of the shape and with a Radial fill a circular
transform modifier surrounds the shape. The square handle is an adjustment
handle. Linear and Bitmap fills will a display a center point and two vertical lines
on either side of the shape. On the right line, the square adjustment handle
appears.
Page 78 of 161
The Transform Fill handles allow you to change the size, position and rotation of
the gradient fill inside the object. When you drag from the center point, the
position of the fill will move. The square on the side changes the width, the circle
directly below controls scale, and the other circle below that one controls the
rotation of the fill. The mouse pointer will change when hovering over one of the
handles to indicate the function. Try this with a linear fill to see the difference. In
a linear fill, you can modify the same properties as well as skew or slant by
dragging from one of the corners.
Bitmap Fills
In the Fill panel, choose Bitmap from the Fill Menu. Click on a bitmap that appears in the
Fill panel. You can modify a Bitmap fill the same as a Linear fill.
Drawing in Flash MX
If you're familiar with Photoshop or other drawing, image manipulation and paint
programs, then Flash tools will look familiar. Let's go over some of the drawing methods
unique to Flash.
Overlapping Shapes
When one shape overlaps another and the two shapes are on the same layer and and are
not selected, these objects merge into one object. You can still select one section of the
object, but when you move it, the part of the other object that was overlapped will be
erased.
Exercise:
Draw a shape on the stage in one color. Draw an overlapping shape in another color.
Select one of the color areas and drag the shape. You see that the part of the shape that
was covered by the overlapping shape is gone. Keep this in mind when you're creating
graphics. If you don't want this to happen, put the shapes on different layers, group them
or make them symbols.
Pencil Tool
The Pencil tool works like a regular pencil tool with some cool options. The Pencil tool
draws in three modes: Straighten, Smooth and Ink. These modes appear in the Options
section of the Toolbox.
Choose Straighten and draw a box. The lines you draw have been straightened. Try this
with the other two modes. Smooth makes nice curves averaged from the curve you drew.
Ink leaves the line as you've drawn it.
Page 79 of 161
Choose the selection (Arrow) tool and deselect any shapes or lines that are on the
stage. With the selection arrow, move it over one of the shape edges. The pointer
arrow changes when you're over the edge of a shape that hasn't been grouped or
made into a symbol. If it's over a curved line or curved edge of a fill, it is a pointer
with a curve next to it and will move the curve if you press and drag. Over a
corner or endpoint, it is a pointer with a corner, and will move the point or corner
maintaining the straight lines. This will pull both stroke and fill alike.
To reshape lines and fills, select them. Use the Smooth or Straighten mode from
the Modify Menu or from the Options section of the Toolbox. (You can adjust the
amount of smoothing or straightening by choosing Preferences from the Edit
menu.)
Control-drag (Windows) or option-drag (Macintosh) a line to create a new corner
point.
Optimizing Shapes
The fewer curved sections in a shape, the lower the amount of data Flash has to maintain
on that shape. Optimizing shapes is highly recommended to reduce file size and increase
playback speed of the Flash movie. To reduce the amount of curves in an object, choose
Optimize from the Modify menu. The Optimize Curves dialog box allows you to reduce
the number of curves contained in a shape. Observe the shape as you smooth it and stop
before it changes the shape unacceptably. If it's a simple shape, the number of curves may
not change at all. Optimizing all objects in a movie, can significantly reduce the movie
file size and increase the playback speed.
Exercise:
Draw a shape. Select it and choose Optimize from the Modify menu. Use the slider to
adjust the amount of smoothing to apply to the curve. (You can always choose Undo
from the Edit menu.) The option 'Use multiple passes' will repeat the smoothing process
until no more optimizing is possible. This is the same thing as choosing Optimize from
the Modify menu over and over again.
Pen Tool
If you are familiar with Adobe Illustrator or Photoshop, Macromedia Freehand or
Fireworks, you've seen this tool before. The Pen tool allows you to place points and
create curves and lines that are repositionable.
Exercise to create a straight line:
Select the Pen tool.
Click once anywhere in the stage window.
Click again, and a straight line is created between the two points.
Page 80 of 161
Making Buttons in Flash MX
One of the most powerful features of Flash MX is the interactivity you can build into
your Web site. The button symbol is something you'll use often. Buttons can be as simple
or as complex as you want. Buttons can contain movies and actions inside.
Buttons are actually interactive movies consisting of four frames. The first three frames
define three states of the button, while the fourth frame defines the hit area, or the area
that is "hot." The four frames are:
1. Up -- what button looks like in inactive state, when the pointer is not over the button;
2. Over -- what the button looks like when the pointer is over it;
3. Down – what the button looks like when the mouse is clicked on it; and
4. Hit -- the area that is ―hot‖ that will trigger the button states.
You will see 4 labeled frames in the Layers and Timeline area. These frames
represent the 4 states for your button: Up, Over, Down, and Hit. This is where you
will create the artwork for the different states for your button.
Click in the ―Up‖ state frame.
On the stage, draw a blue filled circle. The Up state is done.
To create the "Over", "Down" and "Hit" states, select each frame (state) and from
the Insert menu choose Keyframe. This will put the last keyframe (Up state
frame) in the selected frame. Then you can go back to each new frame and change
the button.
We want the "Over" state of the button to look like the "Up" state except with a
different fill color.
Page 81 of 161
Select the "Over" state frame. If you click directly on the frame, it will select all
objects in that frame. If you click over the frame, on the state label, it will go to
the correct frame, but not select the objects in that frame. If the object is not
selected, choose the selection arrow and select the blue filled circle on the ―Over‖
state. While it is selected, choose a new color by the fill bucket to change the fill
color.
Now select the "Down" state frame. Let's make the Down state a little different.
Change the fill color to yellow the same way as in the Over state. Add some little
dashes like radiating rays from the sun around the circle.
Let's leave the "Hit" state the way it is.
Click on the Scene 1 icon in the upper left hand corner of the work area.
If the Library window is not open, select Window/Library. (The key command
will be indicated in the pull-down menu, if you'd rather use keys than the pull-
down menus all the time.)
The simple button you made shows up in the Library list.
Select the button and the "Up" state of the button will appear in the upper portion
of the Library window along with a right pointing arrow. Click this right pointing
arrow and you'll see all four states of the button played.
Drag this button onto your stage.
To see your button in action, from the Control menu, select Enable Simple
Buttons. Rollover your button and click on it. It should turn a different color
when you roll over it, and turn into a yellow sun when you click on it.
One of the most common button actions is to call up a different URL. We'll put this
action on the button we just made and placed on the stage.
From the Control menu turn off Enable Simple Buttons so you can interact with
the button on the stage without testing the movie.
(Enable Simple Buttons will not show you movies in keyframes.)
From the Window menu, choose Actions. This will open up the Object Actions
window, one of the most powerful tools in Flash MX. Check and see that it is set
on Normal mode and not Expert Mode by clicking on the arrow in the upper right
corner. (Normal mode gives you clues and blanks to fill in with the proper syntax.
Expert mode allows you to type in your own syntax.) For our purposes, we will
choose Basic Actions from the list on the left hand side. Scroll through the list and
select ―Get URL‖.Either double click on it, or drag it over to the right hand side. It
will show up with the proper syntax, and an area to fill in on the bottom of the
Object Actions window. (This action defaults to the ―on release‖ action. If you
want to change this, click on that line in the Object Actions window, and you'll
see a new set of options for that line on the bottom.) With "Get URL" selected,
Flash asks you for the URL you want this button to direct the user to. If you don't
have a URL to use, type in this one: http://www.utexas.edu/
Now you're ready to test your button. There are several ways to do this:
1. from the Control menu, choose Test Movie or
2. from the File menu, choose Publish Preview/HTML or
Page 82 of 161
3. from the File menu, choose Publish Preview/Flash.
First, let's copy the sun and rays from the Down state of the simple button.
Click on the Symbols icon in the upper right hand corner of the stage, scroll
down and choose your old button. The symbol editor opens.
Click on the Down frame, select the sun and rays, and from the Edit menu,
choose Copy.
From the Insert menu, choose New Symbol. Select Movie Clip and name it
'm,sunny'. Click OK. The symbol editor is now open.
From the Edit menu, choose Paste in Place. You should see your sun from the
―Down‖ state of the simple button.
From the Insert menu, choose Keyframes at frame 5 and frame 10.
Go to frame 5. Scale the sun up a little (i.e., make the image bigger). From the
Modify menu, choose Transform and then Scale. Grab one of the square handles
and make the image a little bigger. Now lets make a tween between keyframe 1
and 5, and 5 and 10.
Click on a frame between 1 and 5. The area on the Timeline turns black.
Now open the Frames panel. From the Window menu, choose Panels and then
Frame. Choose Shape Tweening from the pull-down menu. (Shape tweening is
for objects that have not been turned into symbols or grouped together. You can
tell if it's a raw graphic by the selection. It will select and fill the object with black
and white noise if its still raw. Grouped objects and symbols will have a bounding
box instead. The shape tween is represented by a light green background with a
solid line arrow on top. Dashed lines means something is not right.)
The tween should make a smooth upward scale between frame 1 and 5. Do the
same thing between frame 5 and 10.
Page 83 of 161
can use the arrow keys to line up the center crosshairs. It should be in registration
with the first one on the first frame.
Let's make the spiral rotate one complete revolution for 10 frames. Select the area
between frames 1 and 10 and open the Frame panel (from the Window menu,
chooose Panels and then Frame). In the Tweening box select Motion. In Motion
Tweening, you can indicate the direction of the Rotation. Select CCW for counter-
clockwise. In the "times" box, put 1 for 1 revolution. Motion tweens work on
symbols. The tween on the Timeline will look blue, with a solid line arrow.
Create a new layer and move it to the top. Call it 'actions.'
On the actions layer, select frame 10 and insert a keyframe by choosing
Keyframe from the Insert menu.
Choose Window/Actions. The Frame Actions window opens.
Select Basic Actions and ―Go To." It will be an action on this frame sending it to a
frame number or label. It defaults to frame 1 which is fine in this case. Now this
movie will loop endlessly. (The timelines in movies are independent of the
Timeline on the main stage, so frame 1 is unique to this movie.)
Symbol Types
Movie Clip - A symbol that can include animation(s), buttons, graphics, other
symbols, and operates independently of the main stage Timeline.
Button - A symbol that allows interactivity and that responds to mouse clicks or
rollovers. Buttons can also have movies placed in one of the states.
Graphic – A symbol that is used for static images or is controlled by main stage
Timeline. Interactive controls and sounds won't work in this symbol.
Sound - The Sound symbol is created automatically when you import a sound.
Page 84 of 161
Font - Create this type of symbol from the Library window options so you don't
have to embed fonts in your site.
Naming conventions
The Library stores symbols in alphabetical order. In order to keep symbol types
grouped together, name each symbol using the first letter of the type of symbol that is
it first, followed by a comma, then the name of the symbol. When you are working with
many symbols, this helps you find the particular symbol quickly and consistently.
Example:
g, balloon
m, balloon movie
s, balloon squeaky sound
b, balloon button
ac, balloon movement action script in movie
Exercise:
1. Create a simple shape on the stage, such as a red balloon.
2. Let's save this shape into the Library by making the balloon a graphic symbol.
o Using the Arrow tool, draw a selection box around the whole balloon.
o With it selected, from the Insert menu, choose Convert to Symbol.
o A Symbol Properties dialog box appears with 3 Behavior options. Flash
defaults to the Movie Clip behavior.
o Select the Graphic behavior.
o Name your symbol: g, balloon. Click OK.
3. Delete the balloon from the stage.
4. From the Window menu, choose Library. You'll see your balloon symbol in the
Library window.
5. Drag the balloon symbol (g, balloon) out of the library onto the stage.
6. Now you have an ―instance‖ of the balloon on the stage.
7. Let's change the appearance of the balloon instance.
o Using the properties menu, change the alpha to 50%, change the tint, and
change the scale and rotation.
8. You'll see the original symbol is unaffected. You can keep pulling in the same
symbol over and over again but change each instance any way you want. These
attributes can also be changed for different keyframes.
Note: If you plan on animating each instance independently, put each instance on a
separate layer. Animation requires "tweening", which will only work on one symbol on
one layer at a time.
Page 85 of 161
Choose Movie Clip as the Behavior if it's not already selected, and name your
symbol: "m, balloon movie." Click OK. Movie symbols have their own timeline.
This can get confusing.
You are now in the symbol editor, which looks just like the stage (because it has
its' own independent timeline). One way you can tell you are in symbol editing
mode is by looking at the upper left hand corner, which will have the movie
symbol you just named after the scene name.
In the Library window, drag the "g, balloon" symbol out onto the m, balloon
movie stage.
Select frame 10 on your timeline and then from the Insert menu, choosing
Keyframe from the top menu. (Keyframe will duplicate the last keyframe with
something in it.)
Move the animation scrubber to the second keyframe and select the balloon or
click on that frame (this will pick everything in that keyframe).
Modify the balloon instance by rotation, scale, alpha and/or color.
Now we need to create a "tween" between the first keyframe and the second
keyframe. To do this:
o Click in the Timeline somewhere between the first and second keyframes.
o In the property inspector, select the Motion option from the Tween
dropdown menu. You can only use the motion tween on symbols. You can
also add automatic rotation, easing, and other options at this point in the
frame window.
o There should be an arrow displayed in the Timeline area between the two
keyframes. If you select something else, the motion tween should show up
on a light blue field. (Shape tweens are green.)
o Now if you scrub through the frames, you'll see the balloon changing
smoothly from frame to frame.
o Let's make this action loop continuously. To do that, let's assign an action
to the last keyframe, telling it to return to the first frame of its Timeline
again.
o Click on the last frame and choose window>actions, the Frame Actions
dialog box appears.
Make sure you are in normal mode in the Frame window. (check
upper right pull-down arrow)
o Click on the "Actions" book display action catagories, select the "Movie
Controls" book and find GoTo. It will default to frame 1, which is fine.
Now, the movie will loop continuously.
Button Symbol
Now we will make a button using both the g, balloon and the m, balloon movie.
The button symbol has 4 default states: Up, Over, Down and Hit. These states
reflect what's happening when the button is doing nothing, when the mouse is
over it, when the mouse clicks on it, and the hit zone for the button.
Go back to the main stage.
From the Insert menu, choose New Symbol.
Page 86 of 161
Choose Button option and name it: 'b, balloon.' You are now in the symbol editing
mode again.
Select the ―Up‖ frame. Drag the g, balloon symbol from the Library onto the
stage. This is what the button will look like ―at rest.‖
For the "Over" state, we want the exact same position, but another color, so we're
going to copy the ―Up‖ frame and paste it into the ―Over‖ frame (or, click to
select the "over" frame and hit F6, or you can also just choose Keyframe from the
Insert menu, and it will copy the contents of the last keyframe).
change the color of the balloon using the property inspector.
Now when you rollover this button, it will change color.
Next, select the ―Down‖ keyframe area. From the Insert menu, choose Keyframe
and drag in m, balloon movie from the Library.
For the ―Hit‖ area, it doesn't show at all, so you can use the symbol or draw a hit
area in this state.
Go back to Scene 1 and drag your new ―b, balloon‖ out onto the stage.
Test your button by choosing Test Movie from the Control menu.
Animating in Flash
Animation in Flash is easy! Let's look at a couple of different ways to achieve animation
in Flash.
We built tweens in the ―Button and Symbols making" tutorial, but let's do a quick review.
Shape Tween
Page 87 of 161
Now, open the Frames panel and choose
Shape Tween. A light green bar with a
solid arrow will appear between the two
frames. When you scrub back and forth in
the Timeline, the heart morphs to the star,
and changes color.
Motion Tween
Create a symbol or pull one out of the Library onto a new layer on frame 1.
Insert a keyframe at frame 30. This will keep the symbol on frame 30.
Modify the symbol by changing the position, scale, rotation, and alpha. (Use the
Effects panel for the alpha). Select the area between the frames on the timeline
and it will turn black.
Open the Frames Panel and choose Motion Tween. A light blue bar with a solid
arrow will appear between the two frames. When you scrub back and forth in the
Timeline, the symbol will move, scale, rotate and the alpha will change.
Motion Tween has other options. You can choose the direction of the rotation
from the pull-down menu in the Frames Panel and have the tween automatically
rotate the object the number of times you specify.
Animations can be reused. For example, let's say you create an animation in a movie
symbol of a bouncing ball. You could pull that ball out of the Library as many times as
your computer can handle. You can put them all on independent layers, animate the
position, scale, tint, alpha, etc.
Page 88 of 161
Now select the last keyframe. Move the airplane along the curve to the end of the
curve.
Double-click the first keyframe to open the Frame panel. Choose Motion from the
Tweening menu and check Snap (snaps the registration point to the path).
Scrub along the Timeline, and the airplane will follow the curve from first to last
frame. When you publish, the plane's propellers will move. (Movie animations do
not display in Flash on the stage.)
This is the most file-size intensive method, but sometimes it's the only way to get the
effect you want.You can turn on a nifty feature called Onion Skinning to see surrounding
frames so you can more accurately draw your frame.
Exercise:
In frame one, draw a dog.
In frame seven, from the Insert menu, choose Keyframe. This copies the dog
from frame one through frame seven.
Insert a new layer above the dog layer. You can call it "feet."
Click on the Onion Skin icon from the options under the Timeline. You will see a
faded version of the first frame.
Click and move each of the dog's legs.
Page 89 of 161
If you like, you can continue to do this for another few frames for the eye lids and
the tail.
Turn off the Onion Skin button.
Now scrub through your animation. You now have a dancing, tail-wagging
winking dog.
Importing
Import sounds into Flash by choosing Import from the File menu. The following audio
file formats can be imported into Flash:
WAV
AIFF
MP3
If you have QuickTime 4 or higher, you can also import these file formats:
Flash stores audio files in the Library as a symbol along with the graphics, movies and
buttons. Sound files are indicated by a loudspeaker icon. Because the sound is a symbol,
Page 90 of 161
you only need one copy of it and you can use it in many ways in your Flash movie. In the
Library and on the Timeline, audio files are represented as sound waves.
Exercise:
Import a sound file by choosing Import from the File menu. You can download a
sample .wav file named slide_whistle_3x.wav. If you have Flash you can
download the finished sound.fla file. If you don't have Flash, a 30-day trial
version is available at Macromedia.
Page 91 of 161
Open the Library Panel, and click on the sound symbol you just imported. You
will see it in the Library window with a play arrow. You can listen to the sound
you just imported by clicking on the arrow at the top right of the Library window.
Name and select layer: Sounds
Add keyframes at frame 1 and frame 45 (or somewhere on the Timeline past the
duration of the sound). It's not necessary to do this, but it gives you a look at the
file in the Timeline.
Drag the sound onto the stage. You should see it on the layer as a waveform. You
can get a better look at this by increasing the height of your layer.
From the Modify menu, choose Layer.
At the bottom of this window, you can change the layer height. Change it to 200%
and click OK.
Page 92 of 161
Open the Sound Panel. Select the sound on the Timeline. The information about
that sound file will show up in the Sound Panel. It will also be visible in the top
pull-down menu. If you have other sounds imported, they will be in the menu
also. You can change the sound file you're editing from here. Directly under that
you will see the sound file information, MHz and file size.
The edit button opens up the same audio channel editor. Choose each effect, open the
editor and look at each effect. If you click in one of the channels, it will change to
Custom, but these effects can be used as starting points to get the effect you want or use
them as is.
The best way to get a feel for the sound editor is to apply each effect to your sound, listen
to it and try some things in the custom effect editor.
Below the effects panel is the sync menu. It has the following options:
1. Event – associated with specific actions, not tied to the timeline (like a sound
accompanying a mouse click)
2. Start – same as Event, but will create a new instance of that sound if it is already
playing.
3. Stop – stops the specified sound
4. Stream – syncs the sound with the animation, forces the animation to play at the
same rate as the sound, dropping frames if necessary.
You can loop the sound the number of times you type in the box. Don't loop streaming
sound; it will increase your file size dramatically.
Have fun!
This dialog box gives you the opportunity to create different file formats -- GIF, JPEG,
PNG, and QuickTime -- and the HTML needed to display them in the browser window.
These alternative formats enable a browser to display your movie's animation and
interactivity for users who don't have the Flash Player installed.
Pictures and image working are best handle by design programs and fireworks to be
specific is the popular for web images
These are two different things. If you adjust the image size it will change the size of your
image. If you adjust the Canvas Size it will change the size of the canvas or background
that your image is on.
Page 94 of 161
Adjust to the size you want to use the finished image at.
To adjust the Canvas Size, do as above but select Canvas Size instead of Image Size.
Cropping
Sometime there is part of an image that you don’t want included or perhaps you
just want to change the shape of your image.
Page 95 of 161
Click and drag over the area you want. You can adjust this by moving the
black square handles that appear (see below).
When you are happy with your selection, Double Click inside the area you
have selected to crop it.
Resolution
Page 96 of 161
Page 97 of 161
Page 98 of 161
Page 99 of 161
Use the Format Box to select the File Format you want
You can make other adjustments to the quality of the image by adjusting
the Quality box and the smoothing box, all of which will have an effect
on the overall file size, which is shown above the image.
When you are happy with the settings click on Export and save the image.
5. Cloning
This tool is really handy for editing out unwanted items from a picture:
Select an area of the picture that you want to clone or copy from.
In this example I want to get rid of the hand behind the head so I
have selected the plain white colour in the background here…
Use the tool like an airbrush cover up the section you don’t want.
If you want to change the area you are getting the sample from use the
ALT Key on the keyboard and left click the mouse on the area you want to
sample or select the clone tool again.
As each object is added to the original it adds a new layer. Each layer
can be changed without effecting the other layers.
You can select an object by selecting its layer in the Layers panel.
This is a nice effects and blends images into the page nicely:
This is really useful for lightening up dark images or giving your flat images
more definition.
Use the sliding bars to adjust the setting until you are happy with
the image.
3. Rotating Objects
Open the image and add the object you wish to rotate. In this example I
want to put the text down the side of the image.
Hold down Ctrl + T and use the mouse to click and drag the shape
around or…
When you are happy with it go to File – Save As and save into the correct
folder using a sensible file name.
This tool is really good for removing the backgrounds or unwanted sections
of images.
You will notice that the section has been selected. Press Delete.
To make sure it has been deleted – Got to Modify – Canvas – Canvas
JavaScript is a client-side scripting language, which means the source code is processed by
the client's web browser rather than on the web server. This means JavaScript functions can
run after a webpage has loaded without communicating with the server. For example, a
JavaScript function may check a web form before it is submitted to make sure all the required
fields have been filled out. The JavaScript code can produce an error message before any
information is actually transmitted to the server.
Like server-side scripting languages, such as PHP and ASP, JavaScript code can be inserted
anywhere within the HTML of a webpage. However, only the output of server-side code is
displayed in the HTML, while JavaScript code remains fully visible in the source of the
webpage. It can also be referenced in a separate .JS file, which may also be viewed in a
browser.
Below is an example of a basic JavaScript function that adds two numbers. The function is
called with the parameters 7 and 11. If the code below were included in the HTML of a
webpage, it would display the text "18" in an alert box.
<script>
function sum(a,b)
{
return a + b;
}
var total = sum(7,11);
alert(total);
</script>
JavaScript functions can be called within <script> tags or when specific events take place.
Examples include onClick, onMouseDown, onMouseUp, onKeyDown, onKeyUp, onFocus,
onBlur, onSubmit, and many others. While standard JavaScript is still used for performing
basic client-side functions, many web developers now prefer to use JavaScript libraries like
jQuery to add more advanced dynamic elements to websites.
ASP has two different meanings in the IT world: 1) Application Service Provider, and 2)
Active Server Page.
ASP is similar to other scripting platforms, like PHP and JSP, but supports multiple
programming languages. While the default ASP language is VBScript, ASP pages can
include other programming languages as well, such as C# and JavaScript. However,
alternative languages must be defined before the script code using the following declaration:
ASP pages are part of the ASP.NET web application framework developed by Microsoft.
Therefore, ASP pages are most often found on Windows-based web servers that run
Microsoft Internet Information Services, or IIS. You can tell if you are accessing an ASP
page in your browser if the URL has an ".asp" or ".aspx" suffix.
PHP Stands for "Hypertext Preprocessor." (It is a recursive acronym, if you can understand
what that means.) PHP is an HTML-embedded Web scripting language. This means PHP code
can be inserted into the HTML of a Web page. When a PHP page is accessed, the PHP code is
read or "parsed" by the server the page resides on. The output from the PHP functions on
the page are typically returned as HTML code, which can be read by the browser. Because
the PHP code is transformed into HTML before the page is loaded, users cannot view the
PHP code on a page. This make PHP pages secure enough to access databases and other
secure information.
To develop user-friendly interface and process for getting quality data into the information
system in a timely and accurate fashion
Objectives: generally, most work done on improving the standards of data entry covers the
entry of data for operational, financial or administrative applications. These are either
Scope of usage: generally, this would apply to data entry for operational, administrative and
financial application software. However, in some cases, there are data entry procedures that
are covered by Office Technology products.
Risks: not having proper data entry procedures would lead to the following:
Improper entry of data causing errors, rework and possibly damages with citizens and other
users of the data.
Erroneous or slow entry of data leading to loss of time and re-entry
More rigorous training of new staff
1) For each data entry form in each software application, a detailed Data Entry Procedure
is to be prepared. Generally, the software would have such procedures if it is well
documented. In such a case, the Department should check if such procedures are
sufficient, otherwise, they would be used as the basis for a redeveloped Data Entry
Procedure.
Training
Day to day entry tasks
Validation and consistency checking
Auditing purposes
Refreshing the user
2) On preparing a Data Entry Procedure, it should be tested to ensure that all data
elements are clearly explained and that the procedure is easy to understand and use.
3) Whenever the Department is developing its own systems or requesting such systems to
be developed by third parties, it is essential to follow some Data Entry standards or
Good Practices. These are presented in the Appendix of Supplementary Material.
4) Error analysis should be carried out. When errors are reported, they should be
registered and totaled. If specific forms are found to generate more errors than others,
then there is the possibility that the form is not being properly understood or that it
may have programming problems.
5) Use Audit Trails whenever possible. Audit Trails are rigorous ways of verifying
proper data entry. Throughout the years, the term got distorted to mean the following:
Page 113 of 161
a list of transactions as entered. This is not correct. Audit trails technically mean the
following. A batch of vouchers is entered. One of its fields is manually accumulated,
say the amount on the voucher. The batch is controlled as one single group of
vouchers by the system. The batch or Audit Trail is entered into the system. The batch
is not updated or posted to the database unless the computed total equals the entered
total. Along with this checking, the system must be able to produce a validation list of
all vouchers before committing the entry.
6) Data Integrity: various systems are designed without proper data integrity. For
example, there are many Inventory Management systems that allow the quantity to go
negative. There are cases where the accounting vouchers posted from an operational
module do not correspond to the totals recognized by the accounting system. For
example, purchases in the Inventory Management system do not correspond to the
total inventory in the Accounting System. Such areas should be investigated and
checked on a regular basis to ensure that there is Data Integrity.
Input design
Objectives Guidelines
Effective Input forms should be easy to fill out, purposeful, facilitate accurate
completion, and attractive
Accurate
Screens should be simple, consistent, facilitate navigation, and
Ease to use attractive
Simple
Objectives Guidelines
Effective coding Reduce data input volume
Efficient data capture Keep codes concise, stable, unique, sortable, simple,
uniform, modifiable, and meaningful (Figure 19.11)
Effective data capture
Input necessary data only
Effective input validation
Do not input data that can be computed/retrieved from
the system
Types of codes
1. Keyboards
2. Optical character recognition
3. Magnetic ink character recognition
4. Mark-sense forms
5. Bar codes
6. Intelligent terminals
Validation tests
2. Combination test – data from two or more fields are consistent or reasonable when
considered together
6. Domain test – data are of proper situation or come from set of standard values
8. Validity test – data must have certain values, e.g., referential integrity
9. Batch control test – use record count/hash totals to verify batch input
10. Check digit test – add an extra digit to a numeric field to verify its accuracy (Figure
19.19)
Objectives Guidelines
Task matching Minimize user frustration
Efficient Communicate
Minimal user action
Feedback provision Standard operation and consistency
Context-sensitive help
Productivity improvement
Provide feedback on
Acknowledgement
Error/warning
Status
Reassurance
Availability of further assistance
Database design
Objectives Guidelines
Purposeful information retrieval Use ER diagram for data modeling
Data availability
Data integrity
Entity integrity: the primary key of a table cannot have a null value
Referential integrity: all foreign keys in a child table must have a matching record in
the parent table
Domain integrity: table entries must be of the same type, limit, range and other
validation checks.
Types of relationships
Entity A table
Output design
To deliver the right information to the right people in the right format at the right time
Output design
Objectives Guidelines
Purposeful Consider usage factors before choosing an output
technology/medium
Meaningful
Avoid output bias
Adequate
Consider functional and stylistic attributes in
Appropriate distribution designing printed reports
1. Print
2. Screen
3. Audio
4. Microform
5. CD-ROM or DVD
6. Electronic
7. Web-based documents
JavaScript - Syntax
JavaScript can be implemented using JavaScript statements that are placed within the
<script>... </script> HTML tags in a web page.
You can place the <script> tags, containing your JavaScript, anywhere within your web
page, but it is normally recommended that you should keep it within the <head> tags.
The <script> tag alerts the browser program to start interpreting all the text between these
tags as a script. A simple syntax of your JavaScript will appear as follows.
<script ...>
JavaScript code
</script>
Language − This attribute specifies what scripting language you are using. Typically, its
value will be javascript. Although recent versions of HTML (and XHTML, its successor)
have phased out the use of this attribute.
Type − This attribute is what is now recommended to indicate the scripting language in
use and its value should be set to "text/javascript".
This function can be used to write text, HTML, or both. Take a look at the following code.
<html>
<body>
<script language="javascript" type="text/javascript">
<!--
document.write("Hello World!")
//-->
</script>
</body>
</html>
Hello World!
Whitespace and Line Breaks: JavaScript ignores spaces, tabs, and newlines that appear in
JavaScript programs. You can use spaces, tabs, and newlines freely in your program and you are free
to format and indent your programs in a neat and consistent way that makes the code easy to read
and understand.
Semicolons are Optional: Simple statements in JavaScript are generally followed by a semicolon
character, just as they are in C, C++, and Java. JavaScript, however, allows you to omit this semicolon
if each of your statements are placed on a separate line. For example, the following code could be
written without semicolons.
<script language="javascript" type="text/javascript">
<!--
var1 = 10
var2 = 20
//-->
</script>
But when formatted in a single line as follows, you must use semicolons −
Case Sensitivity: JavaScript is a case-sensitive language. This means that the language keywords,
variables, function names, and any other identifiers must always be typed with a consistent
capitalization of letters.
So the identifiers Time and TIME will convey different meanings in JavaScript.
NOTE − Care should be taken while writing variable and function names in JavaScript.
Comments in JavaScript: JavaScript supports both C-style and C++-style comments, Thus −
Any text between a // and the end of a line is treated as a comment and is ignored by
JavaScript.
Any text between the characters /* and */ is treated as a comment. This may span
multiple lines.
JavaScript also recognizes the HTML comment opening sequence <!--. JavaScript
treats this as a single-line comment, just as it does the // comment.
The HTML comment closing sequence --> is not recognized by JavaScript so it
should be written as //-->.
Example
The following example shows how to use comments in JavaScript.
<script language="javascript" type="text/javascript">
<!--
/*
* This is a multiline comment in JavaScript
* It is very similar to comments in C Programming
*/
//-->
</script>
You can put your JavaScript code in <head> and <body> section altogether as follows −
<html>
<head>
<script type="text/javascript">
<!--
function sayHello() {
alert("Hello World")
}
//-->
</script>
</head>
</body>
</html>
You are not restricted to be maintaining identical code in multiple HTML files. The script
tag provides a mechanism to allow you to store JavaScript in an external file and then include
it into your HTML files.
Here is an example to show how you can include an external JavaScript file in your HTML
code using script tag and its src attribute.
<html>
<head>
<script type="text/javascript" src="filename.js" ></script>
</head>
<body>
.......
</body>
</html>
To use JavaScript from an external file source, you need to write all your JavaScript source
code in a simple text file with the extension ".js" and then include that file as shown above.
For example, you can keep the following content in filename.js file and then you can use
sayHello function in your HTML file after including the filename.js file.
function sayHello() {
alert("Hello World")
}
JavaScript also defines two trivial data types, null and undefined, each of which defines only
a single value. In addition to these primitive data types, JavaScript supports a composite data
type known as object. We will cover objects in detail in a separate chapter.
Note − Java does not make a distinction between integer values and floating-point values. All
numbers in JavaScript are represented as floating-point values. JavaScript represents numbers
using the 64-bit floating-point format defined by the IEEE 754 standard.
JavaScript Variables
Like many other programming languages, JavaScript has variables. Variables can be thought
of as named containers. You can place data into these containers and then refer to the data
simply by naming the container.
Before you use a variable in a JavaScript program, you must declare it. Variables are declared
with the var keyword as follows.
<script type="text/javascript">
<!--
var money;
var name;
//-->
</script>
You can also declare multiple variables with the same var keyword as follows −
<script type="text/javascript">
<!--
var money, name;
//-->
</script>
For instance, you might create a variable named money and assign the value 2000.50 to it
later. For another variable, you can assign a value at the time of initialization as follows.
Note − Use the var keyword only for declaration or initialization, once for the life of any
variable name in a document. You should not re-declare same variable twice.
JavaScript is untyped language. This means that a JavaScript variable can hold a value of
any data type. Unlike many other languages, you don't have to tell JavaScript during variable
declaration what type of value the variable will hold. The value type of a variable can change
during the execution of a program and JavaScript takes care of it automatically.
Implementing ASP
Classic ASP
ASP.NET Web Forms
ASP.NET MVC
ASP.NET Web Pages
ASP.NET API
ASP.NET Core
When a browser requests an ASP or ASP.NET file, the ASP engine reads the file, executes
any code in the file, and returns the result to the browser.
An Active Server Page (ASP) is an HTML page that includes one or more scripts (small
embedded programs) that are processed on a Microsoft Web server before the page is sent to
the user. An ASP is somewhat similar to a server-side include or a common gateway interface
(CGI) application in that all involve programs that run on the server, usually tailoring a page
for the user. Typically, the script in the Web page at the server uses input received as the
result of the user's request for the page to access data from a database and then builds or
customizes the page on the fly before sending it to the requestor.
Important!
ASP is no longer being further developed by Microsoft - it has been replaced by ASP.NET.
But ASP is still a fully functional scripting language and you may choose to continue to learn
and use ASP (i.e., if your server only supports ASP, you need to maintain an ASP website,
etc.). If it's not necessary for you to use ASP, we recommend you learn PHP instead:
As you can see, the server simply sends an HTML file to the client. But if you instead type
http://www.mysite.com/page.asp - and thus request an ASP page - the server is put to work:
This means that if you click "view source" on an ASP page, you do not see the ASP codes -
only basic HTML tags. Therefore, you can not see how an ASP page is made by using "view
source". You have to learn ASP in other ways, for example, by reading this tutorial.
The next lesson is about how to get your computer to act as a server.
Servers
ASP is a server-side technology. Therefore, you need to have a server to run ASP. But it
doesn't need to cost you anything to make this upgrade and there are several options for doing
so.
Since you ultimately only need to choose one option this lesson is divided into different parts.
First comes a little introduction on the different options (just choose the one that suits you
best). When your server is up and running, we'll pick up with Lesson 3 to make your first
ASP page.
Page 127 of 161
If you use Windows 7: Windows 7 includes Internet Information Server 7.5 (IIS) and can
therefore run ASP.
If you use Windows XP Home Edition: Internet Information Server (IIS) is not included in
this edition of Windows XP. However, according to this Usenet post it is possible to install
IIS on Windows XP Home Edition. You may want to try this approach. But we recommend
you use Windows 7 or Windows XP Professional instead.
If you use Linux: It is possible to run ASP on Linux, but we recommend that you use PHP
on Linux instead. With PHP you can do pretty much the same as ASP.
If you have a website on a hosted server: You can choose to have a website on hosted
server which run ASP (like AspHost4Free (free host)), then you are ready to go and can just
ftp your ASP pages to the server.
By default, IIS is not installed on Windows 7. But you can easily install and configure IIS by
following the instructions below:
2. In Control Panel, click Programs and then click Turn Windows features on or off:
... and when you click return you will see a page like the one pictured below. It means that
you now have contact to your server. Now we just need to look at where you need to save
your ASP pages.
The last thing you need to know before you are ready to create your first ASP pages is where
to save them.
The root of your website is c:\inetpub\wwwroot. This means that the file
c:\inetpub\wwwroot\default.asp can be accessed in your browser at the address
http://COMPUTER/default.asp (replace "COMPUTER" with the name of your computer
(look above)).
And in the same way, the folder c:\inetpub\wwwroot\images will be available in your
browser at http://COMPUTER/images.
That's it! Now are you ready to code your first ASP page. Hurry on to Lesson 3!
By default, IIS is not installed on Windows XP Professional. But you can easily install and
configure IIS by following the instructions below:
1. Click Start, click Control Panel, and click Add or Remove Programs:
In the dialog box, you find your computer name under the tab "Network Identification". I
have here stated my computer's name in red - it's called MyComputer (but yours are probably
called something else).
... and when you click return you will see a page like the one pictured below. It means that
you now have contact to your server. Now we just need to look at where you need to save
your ASP pages.
The last thing you need to know before you are ready to create your first ASP pages is where
to save them.
The root of your website is c:\inetpub\wwwroot. This means that the file
c:\inetpub\wwwroot\default.asp can be accessed in your browser at the address
http://MyComputer/default.asp (replace "MyComputer" with the name of your computer
(look above)).
And in the same way, the folder c:\inetpub\wwwroot\images will be available in your
browser at http://MyComputer/images.
That's it! Now are you ready to code your first ASP page. Hurry on to Lesson 3!
Text
HTML tags
ASP Scripts
You already know what text and HTML tags are. So let's look a little more at ASP scripts.
ASP Scripts
ASP scripts can be written in different languages. The examples in this tutorial are written in
Microsoft Visual Basic Scripting Edition (VBScript), but could also be written in another
language - eg. JScript.
<html>
<head>
<title>My first ASP page</title>
</head>
<body>
</body>
</html>
As you probably remember from lesson 1, ASP is all about writing commands to a server.
So let's write a command to the server.
First, we need to tell the server when the ASP will start and end. In ASP you use the tags
<% and %> to mark the start and end for the ASP codes that the server must execute.
Now try to add the following simple code snippet to your HTML code:
<html>
<head>
<title>My first ASP page</title>
</head>
<body>
<%
Response.Write "<h1>Hello World!</h1>"
%>
</body>
</html>
But it gets interesting when you look at the HTML code in the browser (by selecting "view
source"):
The ASP codes are gone! As you may remember from lesson 1, it is only the server that can
see the ASP codes - the client (the browser) only sees the result!
Let's look at what happened. We asked the server to write <h1> Hello World!</h1>. In a
more technical language, one would say that we used the object Response and the method
Write to write a specified string to the client. But do not worry! In this tutorial we try to
keep the technical language at a minimum.
Example: Now!
Let's make the server write something else. We could, for example, ask it to write the current
date and time:
<html>
<head>
<title>My first ASP page</title>
</head>
<body>
<%
Response.Write Now
%>
</body>
</html>
We make the server write the date and time when the ASP page is displayed. Note that if you
refresh the page in the browser, a new time is written. The server writes the current date and
time each time the page is sent to a client.
It is also important to note that the HTML code contains only the date - not the ASP codes.
Therefore, the example is not affected by which browser is used. Actually, all functionalities
that are made with server-side technologies always work in all browsers!
In the example, we used Now - which is a function that returns the current date and time
on the server.
Let's try to extend the example by writing both a string and a function - separated by & - it's
done like this:
<html>
<head>
<title>My first ASP document</title>
</head>
<body>
<%
Response.Write "<p>Current time: " & Time & "</p>"
%>
</body>
</html>
As you can see, the function Time returns the current time. There are several functions that
relate to time and date. And that's exactly what we'll look at in the next lesson.
Web application security aims to address and fulfill the four conditions of security, also
referred to as principles of security:
Confidentiality: States that the sensitive data stored in the Web application should not
be exposed under any circumstances.
Integrity: States that the data contained in the Web application is consistent and is not
modified by an unauthorized user.
Availability: States that the Web application should be accessible to the genuine user
within a specified period of time depending on the request.
Nonrepudiation: States that the genuine user cannot deny modifying the data
contained in the Web application and that the Web application can prove its identity
to the genuine user.
The process of security analysis runs parallel with Web application development. The group
of programmers and developers who are responsible for code development are also
responsible for the execution of various strategies, post-risk analysis, mitigation and
monitoring.
What are the different types of website security issues, risks or threats, and what can make
your business and website an attractive or susceptible target? Many small businesses feel they
do not represent a worthwhile target to attackers, but as you will read, this assumption is plain
wrong. All online entities face a variety of security risks and threats that should be
understood and assessed.
For all too many companies, it‘s not until after a breach has occurred that web security
becomes a priority. An effective approach to IT security must, by definition, be proactive and
defensive. Toward that end, this discussion is aimed at sparking a security mindset, hopefully
injecting the reader with a healthy dose of paranoia.
In particular, this guide focuses on common and significant web security pitfalls to be aware
of, including recommendations on how they can be avoided.
So before we proceed, let‘s clearly the distinction between these two terms:
Authentication: Verifying that a person is (or at least appears to be) a specific user,
since he/she has correctly provided their security credentials (password, answers to
security questions, fingerprint scan, etc.).
Authorization: Confirming that a particular user has access to a specific resource or
is granted permission to perform a particular action.
Stated another way, authentication is knowing who an entity is, while authorization is
knowing what a given entity can do.
Anything that your application receives from untrusted sources must be filtered, preferably
according to a whitelist. You should almost never use a blacklist, as getting that right is very
hard and usually easy to bypass. Antivirus software products typically provide stellar
examples of failing blacklists. Pattern matching does not work.
Prevention: The good news is that protecting against injection is ―simply‖ a matter of
filtering your input properly and thinking about whether an input can be trusted. But the bad
Page 143 of 161
news is that all input needs to be properly filtered, unless it can unquestionably be trusted
(but the saying ―never say never‖ does come to mind here).
In a system with 1,000 inputs, for example, successfully filtering 999 of them is not
sufficient, as this still leaves one field that can serve as the Achilles heal to bring down your
system. And you might think that putting an SQL query result into another query is a good
idea, as the database is trusted, but if the perimeter is not, the input comes indirectly from
guys with malintent. This is called Second Order SQL Injection in case you‘re interested.
Since filtering is pretty hard to do right (like crypto), what I usually advise is to rely on your
framework‘s filtering functions: they are proven to work and are thoroughly scrutinized. If
you do not use frameworks, you really need to think hard about whether not using them really
makes sense in your environment. 99% of the time it does not.
Assuming that anyone still wants to roll their own authentication code in 2014 (what are you
thinking??), I advise against it. It is extremely hard to get right, and there are a myriad of
possible pitfalls, just to mention a few:
1. The URL might contain the session id and leak it in the referer header to someone
else.
2. The passwords might not be encrypted either in storage or transit.
3. The session ids might be predictable, thus gaining access is trivial.
4. Session fixation might be possible.
5. Session hijacking might be possible, timeouts not implemented right or using HTTP
(no SSL), etc…
Prevention: The most straightforward way to avoid this web security vulnerability is to use a
framework. You might be able to implement this correctly, but the former is much easier. In
case you do want to roll your own code, be extremely paranoid and educate yourself on what
the pitfalls are. There are quite a few.
Prevention: There‘s a simple web security solution: don‘t return HTML tags to the client.
This has the added benefit of defending against HTML injection, a similar attack whereby the
attacker injects plain HTML content (such as images or loud invisible flash players) – not
high-impact but surely annoying (―please make it stop!‖). Usually, the workaround is simply
converting all HTML entities, so that <script> is returned as <script>. The other
Page 144 of 161
often employed method of sanitization is using regular expressions to strip away HTML tags
using regular expressions on < and >, but this is dangerous as a lot of browsers will interpret
severely broken HTML just fine. Better to convert all characters to their escaped
counterparts.
For example, the code has a download.php module that reads and lets the user download
files, using a CGI parameter to specify the file name (e.g.,
download.php?file=something.txt). Either by mistake or due to laziness, the developer
omitted authorization from the code. The attacker can now use this to download any system
files that the user running PHP has access to, like the application code itself or other data left
lying around on the server, like backups. Uh-oh.
Another common vulnerability example is a password reset function that relies on user input
to determine whose password we‘re resetting. After clicking the valid URL, an attacker can
just modify the username field in the URL to say something like ―admin‖.
Incidentally, both of these examples are things I myself have seen appearing often ―in the
wild‖.
Prevention: Perform user authorization properly and consistently, and whitelist the choices.
More often than not though, the whole problem can be avoided by storing data internally and
not relying on it being passed from the client via CGI parameters. Session variables in most
frameworks are well suited for this purpose.
Prevention: Have a good (preferably automated) ―build and deploy‖ process, which can run
tests on deploy. The poor man‘s security misconfiguration solution is post-commit hooks, to
prevent the code from going out with default passwords and/or development stuff built in.
Page 145 of 161
6. Common Mistake #6: Sensitive data exposure
This web security vulnerability is about crypto and resource protection. Sensitive data should
be encrypted at all times, including in transit and at rest. No exceptions. Credit card
information and user passwords should never travel or be stored unencrypted, and passwords
should always be hashed. Obviously the crypto/hashing algorithm must not be a weak one –
when in doubt, use AES (256 bits and up) and RSA (2048 bits and up).
And while it goes without saying that session IDs and sensitive data should not be traveling
in the URLs and sensitive cookies should have the secure flag on, this is very important and
cannot be over-emphasized.
Prevention:
In transit: Use HTTPS with a proper certificate and PFS (Perfect Forward Secrecy).
Do not accept anything over non-HTTPS connections. Have the secure flag on
cookies.
In storage: This is harder. First and foremost, you need to lower your exposure. If you
don‘t need sensitive data, shred it. Data you don‘t have can‘t be stolen. Do not store
credit card information ever, as you probably don‘t want to have to deal with being
PCI compliant. Sign up with a payment processor such as Stripe or Braintree. Second,
if you have sensitive data that you actually do need, store it encrypted and make sure
all passwords are hashed. For hashing, use of bcrypt is recommended. If you don‘t use
bcrypt, educate yourself on salting and rainbow tables.
And at the risk of stating the obvious, do not store the encryption keys next to the protected
data. That‘s like storing your bike with a lock that has the key in it. Protect your backups
with encryption and keep your keys very private. And of course, don‘t lose the keys!
Prevention: On the server side, authorization must always be done. Yes, always. No
exceptions or vulnerabilities will result in serious problems.
Attacker Alice wants to lighten target Todd’s wallet by transfering some of his money to her.
Todd’s bank is vulnerable to CSRF. To send money, Todd has to access the following URL:
http://example.com/app/transferFunds?amount=1500&destinationAccount=4673243243
After this URL is opened, a success page is presented to Todd, and the transfer is done. Alice
also knows, that Todd frequently visits a site under her control at blog.aliceisawesome.com,
where she places the following snippet:
<img
src="http://example.com/app/transferFunds?amount=1500&destinationAccount=46
73243243" width="0" height="0" />
Upon visiting Alice’s website, Todd’s browser thinks that Alice links to an image, and
automatically issues an HTTP GET request to fetch the “picture”, but this actually instructs
Todd’s bank to transfer $1500 to Alice.
Fun fact: CSRF is also the method people used for cookie-stuffing in the past until affiliates
got wiser.
Prevention: Store a secret token in a hidden form field which is inaccessible from the 3rd
party site. You of course always have to verify this hidden field. Some sites ask for your
password as well when modifying sensitive settings (like your password reminder email, for
example), although I‘d suspect this is there to prevent the misuse of your abandoned sessions
(in an internet cafe for example).
The lesson here is that software development does not end when the application is deployed.
There has to be documentation, tests, and plans on how to maintain and keep it updated,
especially if it contains 3rd party or open source components.
Prevention:
Exercise caution. Beyond obviously using caution when using such components, do
not be a copy-paste coder. Carefully inspect the piece of code you are about to put
into your software, as it might be broken beyond repair (or in some cases,
intentionally malicious).
Stay up-to-date. Make sure you are using the latest versions of everything that you
trust, and have a plan to update them regularly. At least subscribe to a newsletter of
new security vulnerabilities regarding the product.
It is worth mentioning, that stuffing unsanitized user-defined input into an HTTP header
might lead to header injection which is pretty bad.
Once upon a time, organizations primarily used Web gateways to prevent employees from
wasting time surfing the Web — or worse, from visiting gambling, adult, and other
unauthorized websites.
A few decades later, Web gateways do much more than enforce regulatory compliance and
HR policies. Organizations rely on them to thwart Internet-borne threats in three ways:
However, although Web gateways have been around for decades and continue to evolve, they
aren't bulletproof, and overreliance on them is putting data, users, customers, organizations,
and reputation in harm's way. Here are five of the biggest Web gatway security challenges:
To make things worse, it's also hard to keep up when 571 new websites are created every
second, which generates a high volume of domains and increases the chance that some will
be missed by security controls. It‘s difficult for filters to detect the malicious URLs that
attackers use for three reasons: URLs may be triggered only by the target organization and
remain stealthy during categorization, they‘re short lived (less than 24 hours), and they use
dynamic domains that are harder to thwart than static ones.
A good example is "malvertizing," which injects malicious ads into legitimate online
advertising networks later served by publishers that don't know that ads are malicious. These
malicious ads may not even require any user interaction to infect unsuspecting victims. A
recent example is the large-scale malvertising attacks that occurred in June and July this year
against several Yahoo properties. To circumvent ad blockers‘ ability to separate banner and
display ads, some publishers are integrating ads into their general content. Others, including
GQ publisher Condé Nast, insist that users disable their ad blockers in order to access
content.
Then there's the fact that many seemingly safe websites use common content management
systems that are vulnerable to zero-day exploits and can therefore be compromised by
attackers to serve malicious content. In July, thousands of websites running WordPress and
Joomla — which account for about 60% of all website traffic — served ransomware to all
their visitors. And you may remember that back in early 2015, Forbes.com was breached by
Chinese hackers who served malicious code via its "Thought of the Day" Flash widget.
Leveraging sandboxes to detect malware requires time to run and analyze files. To avoid
affecting user experience, Web gateways often pass files to users while sandboxes complete
their analysis in the background — which essentially means users are exposed to attacks.
Moreover, with the proliferation of sandbox evasion techniques and as malware is often
target-specific, sandboxes are proving to be less effective.
Indeed, recent research has found that 80% of Web gateways failed to block malicious
outbound traffic. Remote access Trojans are another example of how Web gateways can't
detect and stop malicious traffic.
The best way to safeguard sensitive data is not to handle it at all, and business processes that
can be amended to reduce or eliminate dependence on restricted data should be corrected.
For example, the University ID number can often be substituted for a social security number
and poses much less risk if accidentally disclosed.
2. Mobile technologies: More people access the Internet on their mobile devices than on any
other device. We are rapidly approaching the time (if we are not already there) where designs
must be created for the mobile web first, and for the desktop second. Mobile technologies
facilitate comparison shopping; with the advent of barcode reader apps and price-comparison
databases, a consumer could snap a bar code in Walmart and quickly reference product
reviews and prices on walmart.com (or compare prices with Walmart competitors). Mobile
technologies also facilitate impulse buys – especially with the advent of micro-payments tied
to the mobile device. Just recently, Starbucks customers can not only place an order with
their Smartphone, but also make a purchase.
3. Social media: As Facebook has become the most visited site on the Web, the role of social
media, including Facebook and its local clones such as Twitter, is increasingly important.
Social media sites increasingly act as points of entry to e-commerce sites, and vice versa, as
e-commerce sites build rating, loyalty and referral systems tied to social media. Group buying
(e.g., Groupon) is also gaining mainstream ground, with many ―deal of the day‖ sites
competing for an increasingly savvy consumer base, but improvements lie ahead as the social
aspects and user experience are refined.
4. Fulfillment options: I believe that users will want to have multiple fulfillments and return
options when interacting with a vendor: ship to address, courier, pick-up in store, return to
store, etc. Having many fulfillment options is how customers view their overall customer
experience. Some companies have made a business proposition online by being exceptional
in service to the online channel (e.g., Zappos).
5. Global availability: Increasingly, consumers want the availability to buy products from
foreign sites and have them delivered locally. Thus, currency and customs will be of growing
6. Localization: While the trend is to globalize, what‘s often more important is to localize.
User Centric‘s (now GfK‘s User Experience team) research clearly shows that sites that ‗feel‘
local – with proper imagery, language, time/date, weights/measures, currency, etc. – resonate
far more than sites that seem culturally distant or sterile.
7. Customizability: Consumers want control, and want to be able to design the details of the
items they purchase.
8. Time-based availability: Some of the hottest and most successful sites are those that have
a time-critical response component. Sites like Groupon, Gilt and others capitalize on the
perception of limited-time availability. Creating a sense of urgency drives traffic and
purchase behavior.
1. Reducing the tyranny of distance, boosting trade and creating new business models
but also promoting outsourcing of work overseas.
2. Internationalizing labour markets are expanding the skilled labour pool.
3. Developing commercially functional goods and services from new technologies often
takes a lot longer than expected.
4. Leveraging clean technologies to improve sustainability.
5. Fostering entrepreneurship and addressing constraints for Kiwi companies.
6. Addressing slow uptake of new technology due to redundancy risks or ease of
sticking with the status quo and supporting workforce mobility.
7. Managing business change in a disruptive and dynamic business environment.
The ―on-demand economy‖ is the result of pairing that workforce with smartphones and other
devices, which now provide far more computing power than the desktop computers which
reshaped companies in the 1990s, and reach far more people.2
The on-demand economy is starting to revolutionize commercial behavior in cities around the
world. Fast-moving tech companies competing in this arena have developed new models –
such as Uber, Handy and Air B&B – that are transforming industries which have been
historically slow to innovate. Transportation, grocery, restaurant and personal service
industries are seeing hyper-growth in the on-demand world.3
However this means a growing gap emerging between workers and their ultimate boss.
Ensuring workers retain their voice within their company is crucial to ensuring new business
models remain responsive. Emerging technology provides more ways than ever to ensure that
this remains possible.
The on-demand economy gives consumers more choice. Consumers may be winners, as can
workers who value flexibility over security such as younger workers, those with portable
skills in demand who attract higher wages, or those who don‘t want to work fulltime. But
those who value security over flexibility, have families or have mortgages are all threatened.
In addition, there are inequities for those who work in the on-demand economy but do not
qualify for superannuation and other benefits. Care is needed to minimize the impact of
change on employment rights and health, safety and environmental protections.4
Smart policy makers can‘t stand in the way of change. We can‘t outlaw on-demand firms.
But we can improve the ways in which we measure employment and wages, and we must
stop treating contractors and freelancers as second class citizens. In effect every contractor is
a small business with the insecurities, demands and potential that goes with that title.
5. Redefining work
Increasing use of digital business models alongside automation and computerization of jobs
will see organizations shift to a smaller number of highly skilled people with scarce skills
working in very different patterns, in order to enhance their competitiveness. Risk and change
management will be crucial to ensuring success here. This has implications not just on how
we manage work but also on the quality of life for our workforce. An AUT study into mobile
technology found it contributes to irregular patterns of work, amplifies social pressures
making boundaries between work and non-work indistinguishable, brings more work into
personal time, and speeds up the way organizations function. Defining when a person is
working and when they are not will be an increasing challenge.
6. Accessibility
Cheap computing power is transforming the way consumers and workers access technology
as even more sophisticated and powerful hand-held smartphones become available. This
Page 159 of 161
eliminates some of the barriers for how work is done. Complex tasks such as programming a
computer or writing a legal brief can now be divided in component parts and subcontracted to
specialists around the world. It also gives greater flexibility – providing an opportunity for
workers and workplaces to create flexible working arrangements.
7. Big data
Big data is changing the way big business operates. Big data involves data collection and
mining to ascertain consumer preferences and behaviour trends that assist companies to
customise their offerings and specifically target their markets. Prompts on Amazon.com for
related book titles are one example of this.
Big data creates new markets and new opportunities. It also drastically increases privacy
risks and raises issues of resilience of cloud based applications and storage to hacking and
other vulnerabilities.
We are not currently training our workforce to be adaptable enough to changes in technology
or providing proper lifelong education solutions for retraining. More needs to be done to
prepare our workforce for the changes to come including looking at universal teaching
computing and coding in schools and improving how we teach technology.
9. Infrastructure
New Zealand is rolling out ultrafast broadband which is transformational. However there are
road blocks to UFB roll-out and uptake. There are huge opportunities for smaller
geographically distant countries like New world where IT has reduced the tyranny of
distance. This raises important issues around getting our infrastructure right inside New
world and reducing the digital divides that exist. We must have robust, resilient and future
proofed affordable international connectivity.