SlideShare a Scribd company logo
Creating Animations, Working with
Graphics, and Accessing Data
Lesson 9
Exam Objective Matrix
Skills/Concepts

MTA Exam Objectives

Coding Animations by Using Code animations by using JavaScript. (4.3)
JavaScript
Working with Images,
Code animations by using JavaScript. (4.3)
Shapes, and Other Graphics
Sending and Receiving Data Access data access by using JavaScript. (4.4)
Loading and Saving Files

Access data access by using JavaScript. (4.4)

Using JavaScript to Validate Access data access by using JavaScript. (4.4)
User Form Input
Understanding and Using
Access data access by using JavaScript. (4.4)
Cookies
Understanding and Using
Access data access by using JavaScript. (4.4)
LocalStorage
2
Animation
• Animation is the display of a sequence of
static images at a fast enough speed to
create the illusion of movement.
• Regarding the user interface, animation
has to do with changing a display to make
it dynamic—not just a one-time change but
a seamless one.
• JavaScript can produce spectacular
animation effects.
3
Recursion
• Recursion is a programming technique in
which a function calls itself.
• Recursion is a key part of animation.
• The most effective way to introduce a
―timing element‖ into JavaScript is to use
setTimeout recursively.
– Have it invoke another execution of the
same function from which the
setTimeout() was called.
4
A Simple Animation Example

5
A Simple Animation Example (Continued)

6
A Simple Animation Example (Continued)

7
createElement Method
• You can use the JavaScript
createElement method to display an
image when a button is clicked or some
other event occurs.

8
Canvas Element
• To draw a canvas object, use:
– getElementById() function to find the

canvas element
– canvas.getContext to create the canvas

object

• Then use a variety of methods to draw
shapes, include images, and so on.

9
Canvas Example: Analog Clock

10
Canvas Example: Analog Clock (Continued)

11
Sending and Receiving Data
• One of the most essential techniques for
data transfer involves the
XMLHttpRequest API.
– Sometimes abbreviated as XHR
• XMLHttpRequest enables you to use

JavaScript to pass data in the form of text
strings between a client and a server.

12
XMLHttpRequest
• General syntax:

13
XMLHttpRequest
• The XMLHttpRequest object creates a call
to the server.
• The open method specifies the HTTP
method for contacting the server and
provides the server’s Web address.
• The callback function gets a response
from the server.
• xhr.send(data) sends the data.
14
Accessing Data Example

15
Accessing Data Example

16
Parsing
• Parsing is a term used to describe
analysis of complex information into
constituent parts.
• Use parsing for extracting information from
a data stream of stock quotes and similar
tasks.

17
Parsing Example

18
Parsing Example

19
JSON
• You can also use JSON.parse and
JSON.stringify APIs to exchange
JavaScript objects with a server.

20
Loading and Saving Files
• JavaScript can access files on a local
computer and, using HTML5, validate the
file type before loading, which greatly
reduces errors.

21
Access a Local File Example

22
Access a Local File Example (Continued)

23
Access a Local File Example (Continued)
• Application accepts image files but not other
formats

24
Access a Local File Example (Continued)
• Application accepts image files but not other
formats

25
AppCache
• AppCache saves a copy of Web site files
locally, in a structured form.
• AppCache is not the same as a browser’s
cache. Whereas a browser’s cache saves
all Web pages visited, AppCache saves
only the files listed in the cache manifest.

26
AppCache Example

27
Data Types
• A data type is JavaScript’s interpretation of the
kind of data a program can work with.
• Data types include:
– string
– Number
– Array
– Boolean
– Null
– Object
– undefined
28
User Input Form Validation
• As end users enter data in a form,
JavaScript can instantly validate entries
and suggest alternatives.

29
Client-side Validation Example

30
Client-side Validation Example (Continued)

31
Cookies
• Cookies are small text files that Web sites
save to a computer’s hard disk that
contain information about the user and his
or her browsing preferences.
• The content of cookies change as a user
revisits a site and selects different items or
changes preferences.
• In JavaScript, a cookie is a variable.
• JavaScript can create and retrieve
32
cookies.
Use Cookies Example

33
Local Storage
• HTML5’s Local Storage feature has better
security and makes programming easier
than with cookies.

34
Recap
• Animation
• Recursion
• createElement method
•
•
•
•
•
•
•
•
•

Canvas
Sending and receiving data
XMLHttpRequest API
Accessing a local file
AppCache
Data types
User input form validation/client-side validation
Cookies
Local Storage
35

More Related Content

PPTX
Ruby onrails overview
PPT
Distil
PDF
Cassandra data access
PDF
Cert05 70-487 - developing microsoft azure and web services
PPTX
javaScript and jQuery
PPTX
WEB TECHNOLOGY Unit-5.pptx
PPT
PPTX
Asynchronous javascript and xml
Ruby onrails overview
Distil
Cassandra data access
Cert05 70-487 - developing microsoft azure and web services
javaScript and jQuery
WEB TECHNOLOGY Unit-5.pptx
Asynchronous javascript and xml

Similar to MTA animations graphics_accessing data (20)

PPTX
Ajax:From Desktop Applications towards Ajax Web Applications
PPTX
PPT
PHP - Introduction to PHP AJAX
PPT
Web Programming using Asynchronous JavaX
PPT
PPTX
Windows 8 Metro apps and the outside world
PPT
9781305078444 ppt ch01
PPT
Building intranet applications with ASP.NET AJAX and jQuery
PPT
PPT
Building intranet applications with ASP.NET AJAX and jQuery
PPTX
Ajax
PPTX
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
PPTX
PDF
HTML5 features & JavaScript APIs
PPT
A Public Cloud Based SOA Workflow for Machine Learning Based Recommendation A...
PPTX
Asp.net mvc presentation by Nitin Sawant
PPT
WWW/Internet 2011 - A Framework for Web 2.0 Secure Widgets
PDF
AJAX the Great: The Origin and Development of the Dynamic Web (2007)
PDF
Ajax & Reverse Ajax Presenation
Ajax:From Desktop Applications towards Ajax Web Applications
PHP - Introduction to PHP AJAX
Web Programming using Asynchronous JavaX
Windows 8 Metro apps and the outside world
9781305078444 ppt ch01
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQuery
Ajax
4 Anguadasdfasdasdfasdfsdfasdfaslar (1).pptx
HTML5 features & JavaScript APIs
A Public Cloud Based SOA Workflow for Machine Learning Based Recommendation A...
Asp.net mvc presentation by Nitin Sawant
WWW/Internet 2011 - A Framework for Web 2.0 Secure Widgets
AJAX the Great: The Origin and Development of the Dynamic Web (2007)
Ajax & Reverse Ajax Presenation
Ad

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Electronic commerce courselecture one. Pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Approach and Philosophy of On baking technology
cuic standard and advanced reporting.pdf
Machine learning based COVID-19 study performance prediction
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation theory and applications.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Electronic commerce courselecture one. Pdf
A Presentation on Artificial Intelligence
Network Security Unit 5.pdf for BCA BBA.
MIND Revenue Release Quarter 2 2025 Press Release
Unlocking AI with Model Context Protocol (MCP)
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25-Week II
A comparative analysis of optical character recognition models for extracting...
20250228 LYD VKU AI Blended-Learning.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Programs and apps: productivity, graphics, security and other tools
Review of recent advances in non-invasive hemoglobin estimation
Approach and Philosophy of On baking technology
Ad

MTA animations graphics_accessing data

  • 1. Creating Animations, Working with Graphics, and Accessing Data Lesson 9
  • 2. Exam Objective Matrix Skills/Concepts MTA Exam Objectives Coding Animations by Using Code animations by using JavaScript. (4.3) JavaScript Working with Images, Code animations by using JavaScript. (4.3) Shapes, and Other Graphics Sending and Receiving Data Access data access by using JavaScript. (4.4) Loading and Saving Files Access data access by using JavaScript. (4.4) Using JavaScript to Validate Access data access by using JavaScript. (4.4) User Form Input Understanding and Using Access data access by using JavaScript. (4.4) Cookies Understanding and Using Access data access by using JavaScript. (4.4) LocalStorage 2
  • 3. Animation • Animation is the display of a sequence of static images at a fast enough speed to create the illusion of movement. • Regarding the user interface, animation has to do with changing a display to make it dynamic—not just a one-time change but a seamless one. • JavaScript can produce spectacular animation effects. 3
  • 4. Recursion • Recursion is a programming technique in which a function calls itself. • Recursion is a key part of animation. • The most effective way to introduce a ―timing element‖ into JavaScript is to use setTimeout recursively. – Have it invoke another execution of the same function from which the setTimeout() was called. 4
  • 5. A Simple Animation Example 5
  • 6. A Simple Animation Example (Continued) 6
  • 7. A Simple Animation Example (Continued) 7
  • 8. createElement Method • You can use the JavaScript createElement method to display an image when a button is clicked or some other event occurs. 8
  • 9. Canvas Element • To draw a canvas object, use: – getElementById() function to find the canvas element – canvas.getContext to create the canvas object • Then use a variety of methods to draw shapes, include images, and so on. 9
  • 11. Canvas Example: Analog Clock (Continued) 11
  • 12. Sending and Receiving Data • One of the most essential techniques for data transfer involves the XMLHttpRequest API. – Sometimes abbreviated as XHR • XMLHttpRequest enables you to use JavaScript to pass data in the form of text strings between a client and a server. 12
  • 14. XMLHttpRequest • The XMLHttpRequest object creates a call to the server. • The open method specifies the HTTP method for contacting the server and provides the server’s Web address. • The callback function gets a response from the server. • xhr.send(data) sends the data. 14
  • 17. Parsing • Parsing is a term used to describe analysis of complex information into constituent parts. • Use parsing for extracting information from a data stream of stock quotes and similar tasks. 17
  • 20. JSON • You can also use JSON.parse and JSON.stringify APIs to exchange JavaScript objects with a server. 20
  • 21. Loading and Saving Files • JavaScript can access files on a local computer and, using HTML5, validate the file type before loading, which greatly reduces errors. 21
  • 22. Access a Local File Example 22
  • 23. Access a Local File Example (Continued) 23
  • 24. Access a Local File Example (Continued) • Application accepts image files but not other formats 24
  • 25. Access a Local File Example (Continued) • Application accepts image files but not other formats 25
  • 26. AppCache • AppCache saves a copy of Web site files locally, in a structured form. • AppCache is not the same as a browser’s cache. Whereas a browser’s cache saves all Web pages visited, AppCache saves only the files listed in the cache manifest. 26
  • 28. Data Types • A data type is JavaScript’s interpretation of the kind of data a program can work with. • Data types include: – string – Number – Array – Boolean – Null – Object – undefined 28
  • 29. User Input Form Validation • As end users enter data in a form, JavaScript can instantly validate entries and suggest alternatives. 29
  • 32. Cookies • Cookies are small text files that Web sites save to a computer’s hard disk that contain information about the user and his or her browsing preferences. • The content of cookies change as a user revisits a site and selects different items or changes preferences. • In JavaScript, a cookie is a variable. • JavaScript can create and retrieve 32 cookies.
  • 34. Local Storage • HTML5’s Local Storage feature has better security and makes programming easier than with cookies. 34
  • 35. Recap • Animation • Recursion • createElement method • • • • • • • • • Canvas Sending and receiving data XMLHttpRequest API Accessing a local file AppCache Data types User input form validation/client-side validation Cookies Local Storage 35

Editor's Notes

  • #3: Tip: Add your own speaker notes here.
  • #4: Tip: Add your own speaker notes here.
  • #5: Tip: Add your own speaker notes here.
  • #6: Tip: Add your own speaker notes here.
  • #7: Tip: Add your own speaker notes here.
  • #8: Tip: Add your own speaker notes here.
  • #9: Tip: Add your own speaker notes here.
  • #10: Tip: Add your own speaker notes here.
  • #11: Tip: Add your own speaker notes here.
  • #12: Tip: Add your own speaker notes here.
  • #13: Tip: Add your own speaker notes here.
  • #14: Tip: Add your own speaker notes here.
  • #15: Tip: Add your own speaker notes here.
  • #16: Tip: Add your own speaker notes here.
  • #17: Tip: Add your own speaker notes here.
  • #18: Tip: Add your own speaker notes here.
  • #19: Tip: Add your own speaker notes here.
  • #20: Tip: Add your own speaker notes here.
  • #21: Tip: Add your own speaker notes here.
  • #22: Tip: Add your own speaker notes here.
  • #23: Tip: Add your own speaker notes here.
  • #24: Tip: Add your own speaker notes here.
  • #25: Tip: Add your own speaker notes here.
  • #26: Tip: Add your own speaker notes here.
  • #27: Tip: Add your own speaker notes here.
  • #28: Tip: Add your own speaker notes here.
  • #29: Tip: Add your own speaker notes here.
  • #30: Tip: Add your own speaker notes here.
  • #31: Tip: Add your own speaker notes here.
  • #32: Tip: Add your own speaker notes here.
  • #33: Tip: Add your own speaker notes here.
  • #34: Tip: Add your own speaker notes here.
  • #35: Tip: Add your own speaker notes here.