chapter 3(is245)
DESCRIPTION
Semo is 245TRANSCRIPT
![Page 1: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/1.jpg)
Modern JavaScriptDevelop And Design
Instructor’s NotesChapter 3 – Tools of the Trade
Modern JavaScript Design And DevelopCopyright © 2012 by Larry Ullman
![Page 2: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/2.jpg)
Objectives• Understand what the key features
are of development software• Describe the pros and cons of text
editors vs. Integrated Development Environments (IDEs)
• Know what to look for in a browser as a development tool
![Page 3: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/3.jpg)
More Objectives• Name the five most popular browsers• Recall the common debugging tools
available to the most popular browsers
• Write and test JavaScript code using online services
• Identify the general types of JavaScript errors
![Page 4: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/4.jpg)
More Objectives• Name many common causes of
errors• Utilize a wealth of debugging steps
and tools• Use JavaScript code to debug
problems• Use Firebug for advanced debugging
![Page 5: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/5.jpg)
Development Software• Coding• Executing• Debugging
![Page 6: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/6.jpg)
Choosing Software• Operating System• Language(s) supported• Specific Features
![Page 7: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/7.jpg)
Syntax Highlighting
![Page 8: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/8.jpg)
Code Intelligence• Auto-balancing of characters and
tags• Code completion• Tracking of variables and functions
![Page 9: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/9.jpg)
Other Features• Inline execution of code• Page templates• FTP support• Built-in debugger• Network monitor• WYSIWYG• Help system, manual, and documentation
![Page 10: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/10.jpg)
Coding SoftwareText Editors• Cheaper• Simpler• Easier to master• Faster to begin using• Less demanding of the
computer• Can be used for many
tasks
IDEs• More expensive• More complicated• Requires more computer
resources• Tend to be more specific• Better code intelligence• Better debugging• Faster development
once mastered
![Page 11: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/11.jpg)
Coding SoftwareText Editors• Komodo Edit• UltraEdit• Notepad++• EditPlus• TextMate• TextWrangler• BBEdit• Emacs• Vim
IDEs• Adobe Dreamweaver• Komodo IDE• Aptana Studio• Eclipse• NetBeans• WebStorm
![Page 12: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/12.jpg)
Executing Software
![Page 13: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/13.jpg)
What to Look For• DOM Inspector• JavaScript source viewer• Advanced JavaScript debugger• Network monitor• Error console
![Page 14: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/14.jpg)
Chrome• Web Developer• Pendule• Firebug Lite• JavaScript Tester• Validity
![Page 15: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/15.jpg)
Firefox• Firebug• Web Developer• YSlow!• Greasemonkey• View Source Chart• JS View
![Page 16: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/16.jpg)
Internet Explorer• IE Developer Toolbar• Web Accessibility Toolbar
![Page 17: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/17.jpg)
Opera
![Page 18: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/18.jpg)
Safari
![Page 19: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/19.jpg)
Complete Testing• Browsershots• Adobe BrowserLab• Virtualization Software• Spoon• Commercial Online Services
– CrossBrowserTesting– BrowserCam– Sauce Labs
![Page 20: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/20.jpg)
JS Bin
![Page 21: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/21.jpg)
General Error Types• Syntactical• Run-time• Logical
![Page 22: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/22.jpg)
Common Causes• Case Sensitivity• Improper Syntax• Misuse of = and ==• Referencing objects that don’t yet
exist• Treating objects as the wrong type
![Page 23: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/23.jpg)
Debugging Techniques• Get a good text editor or IDE.• Get a good development browser.• Keep the error console open!• Validate your JavaScript code.• Rubber duck debugging.
![Page 24: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/24.jpg)
Debugging Techniques• Use external JavaScript files• Save the file and refresh the
browser.• Try a different browser.• Take a break!
![Page 25: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/25.jpg)
Bad Debugging Techniques
• Panicking!• Ignoring error messages• Trying random solutions• Sending emails to teachers and
writers out of frustration
![Page 26: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/26.jpg)
Debugging with alert()
alert('Now in the XXX function!');
![Page 27: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/27.jpg)
Debugging with console()
console.log('Now in the XXX function!');console.log('myVar is ' + myVar);
![Page 28: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/28.jpg)
Debugging with Firebug
![Page 29: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/29.jpg)
Debugging with Firebug
![Page 30: Chapter 3(IS245)](https://reader036.vdocuments.net/reader036/viewer/2022062315/55cf8645550346484b95f3fe/html5/thumbnails/30.jpg)
Debugging with Firebug