Download presentation
Presentation is loading. Please wait.
1
IM 215 Intro to Scripting Languages
2
Objectives The core objectives of this course are as follows: Students will understand basic foundations of JavaScript, including its usage in the web and application design and development. Students will understand basic foundations of Flash/ActionScript, including its usage in the web and application design and development. Students will understand the foundations of mobile applications development.
3
Academic policies Lab use Communication about grades Academic honesty Exam and quiz policy Late work
4
Assessment criteria Assessments: Class participation - 4 Quizzes – 25 points each Javascript Assignment 1 – 40 points Javascript Assignment 2 – 40 points Javascript Assignment 3 – 50 points Actionscript Assignment 1 – 20 points Actionscript Assignment 2 – 25 points Actionscript Assignment 3 – 35 points Actionscript Assignment 4 – 50 points Final Exam – 100 points
5
Grades/Resources >= 90% A Excellent >=80% and < 90% B Above Average >=70% and < 80% C Average >=60% and <70% D Below Average < 60% F Fails Javascript, A Beginner’s Guide, 3 rd Edition by John Pollock Foundation Actionscript 3.0 by Yard, Webster and McSharry
6
Contact details Email: mtovey@bumail.bradley.edu mtovey@bumail.bradley.edu AIM: marktee07 Twitter: em_tee After lectures on Monday’s and Wednesday’s
7
Javascript Introduction
8
Javascript Adds interactivity and effects to a static HTML page Limited to client side actions Wikipedia.com – no javascript interactions Amazon.com – significant javascript enhancements
9
First steps.. Tools of the trade A text editor TextWrangler (http://www.barebones.com/products/TextWrangler/) Notepad++ (http://notepad-plus.sourceforge.net/uk/site.htm)http://www.barebones.com/products/TextWrangler/ A browser Firefox (current version 3.5.7) Internet Explorer (version 7) Edit code in your text editor When ready to try your code, open in the browser
10
Simple HTML page Simple static page IM215 rocks
11
First script Add the following to our page: document.write(‘ And so does Javascript ’); Save the page and re-open it in your browser.
12
External script Create a new file and insert the following line: document.write ( ‘ Written in from outside ’); Save it as external.js Return to our original html file and insert the following:
13
Variables Variables are containers for data datum – individual piece of data name - label that identifies the piece of datum variable – consists of a name and a piece of data A variable’s datum is called its “value”
14
Variables (cont.) 1.Simplify code and save time, giving commonly referenced values a single name 2.Acts as a placeholder for unknown values, e.g. user input 3.Clarifies code, allowing you to give meaningful names to values used in code
15
Using Variables Defining: var variableName; Giving, or “Assigning”, a value: variableName=25; Or, combined: var variableName=25;
16
Variable rules Variable names are case sensitive. Can only contain letters, numbers or underscores. Cannot begin with a number. Cannot be one of a set of Javascript reserved words. Use meaningful names.
17
Variable Data Types The current value of a variable has a “type” Javascript has 3 core data types Number – Any number including decimal numbers e.g. var numVar=25; String – any sequence of characters e.g. var stringVar=“A string of text”; Boolean – true or false
18
Using Variables To reference a variable, include the name in the context of other code. For example, var ourString=“An assigned string”; document.write(ourString);
19
Comments Lines in code that get ignored by the JavaScript engine. Provide clarity, allowing you to explain the overall purpose of your code in plain english. Valuable when collaborating on code with others, and for your own future reference.
20
Comments Single line: // This line is a comment Multi-line: /* This is a multi-line comment Everything within here is ignored */
21
Sources: “JavaScript: A Beginner’s Guide” by John Pollock
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.