Java Reference
In-Depth Information
advanced text editors that provide line numbering, color coding, search and replace, and so on. Here
are just a few:
Notepad2 (Windows): www.flos‐freeware.ch/notepad2.html
WebMatrix (Windows): www.microsoft.com/web/webmatrix/
Brackets (Cross‐Platform): brackets.io
Sublime Text (Cross‐Platform): www.sublimetext.com
Sublime Text is not free software, but it does have a time‐limited evaluation. If you try it and like it,
please support the developers of that application.
You might also prefer a proper HTML editor; you'll need one that enables you to edit the HTML
source code, because that's where you need to add your JavaScript. A number of very good tools
specifically aimed at developing web‐based applications, such as Adobe's Dreamweaver, are also
available. However, this topic concentrates on JavaScript rather than any speciic development
tool. When it comes to learning the basics, it's often best to write the code by hand rather than
rely on a tool to do it for you. This helps you understand the fundamentals of the language before
you attempt the more advanced logic that is beyond a tool's capability. When you have a good
understanding of the basics, you can use tools as timesavers so that you can spend time on the more
advanced and more interesting coding.
Once you become more proficient, you may find that a web page editor makes life easier by inclusion
of features such as checking the validity of your code, color‐coding important JavaScript words, and
making it easier to view your pages before loading them into a web browser. Many other, equally
good, free web page editors are available. A Google search on web editing software will bring back
a long list of software you can use.
As you write web applications of increasing complexity, you'll find useful tools that help you spot
and solve errors. Errors in code are what programmers call bugs, though when our programs
go wrong, we prefer to call them “unexpected additional features.” Very useful in solving bugs
are development tools called debuggers. Debuggers let you monitor what is happening in your
code as it's running. In Chapter 18, you take an in‐depth look at bugs and debugger development
tools.
Web Browsers
In addition to software that lets you edit web pages, you'll also need a browser to view your web
pages. It's best to develop your JavaScript code on the sorts of browsers you expect visitors to
use to access your website. You see later in the chapter that although browsers are much more
standards based, differences exist in how they view web pages and treat JavaScript code. All the
examples provided in this topic have been tested on Chrome, IE9‐11, Firefox, Safari, and Opera.
Wherever a piece of code does not work on any of these browsers, a note to this effect is made in
the text.
If you're running Windows, you'll almost certainly have IE installed. If not, a trip to
windows.microsoft.com/en‐us/internet‐explorer/download‐ie will get you the latest version
for your version of Windows.
 
Search WWH ::




Custom Search