Chapter 21. JavaScript Outside the Box
21.0. Introduction
I believe JavaScript is the most important programming language a web developer should learn. Sure, you can learn Java or PHP, Python, Ruby, ASP.NET, or any other programming environment or language, but one thing all these options share is that eventually, one way or another, you’ll probably need to use JavaScript.
JavaScript is fun, too. You have to spend a considerable amount of time working on architecture issues and setup issues in many of the other environments, but all you need with JavaScript is a browser and a text-editing tool. When I say you can go from opening your text editor to your first real JavaScript application in five minutes, I’m not exaggerating. Take the following file:
<!DOCTYPE html> <head> <title>Blank</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > </head> <body> </body>
Add the following script after the title element:
<script>
alert("Wow, that was easy!");
</script>Open the page in any browser, and you’re done. The only thing simpler in application development would be direct thought transference.
In the first 20 chapters of this book, I covered how to use JavaScript primarily to build standard web applications, but that’s only part of the JavaScript story. JavaScript is an important component of major frameworks such as Microsoft’s Silverlight, as well as desktop development environments, such as Adobe AIR. JavaScript and JSON are the baseline functionality for Apache’s ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access