E-Books: Making Use of JavaScript by Shweta Bhasin
This book steers clear of the traditional content−based approach and uses a problem−based approach to deliver the concepts of JavaScript. The problems presented in the book relate to real−life scenarios. Each problem is followed by a task list that helps solve the given problem, in the process delivering the concepts and their implementation. This practical approach will help readers understand the real−life application of the language and its usage in various scenarios. Moreover, to provide appropriate learning experience, the concepts discussed will be supported adequately by case studies that will be formulated in such a way that they provide a frame of reference to the reader.
This book is organized into three parts. Part One is a detailed introduction to JavaScript; Part Two delves into developing basic applications by using JavaScript; and Part Three moves further into developing advanced applications by using browser objects, cookies, plug−ins, layers and server−side scripting.
Chapter 1 introduces the essential Internet concepts that a reader should be aware of before proceeding to other chapters. This chapter provides an introduction to frequently used Internet
terminology and also offers a brief introduction to effective cross−browser application development.
Chapter 2 is a getting−started guide that discusses the basics of JavaScript. This chapter discusses the basic syntax of embedding JavaScript in HTML documents. Then, the chapter gives a solution for executing JavaScript applications in a JavaScript−incompatible browser. Next, the chapter discusses how you can add comments to JavaScript and details a comparison between HTML and JavaScript comments. The chapter also introduces JavaScript external files. Finally, the chapter discusses how you can create HTML tags in JavaScript scripts.
Chapter 3 introduces you to the programming basics of JavaScript. The chapter covers concepts such as data types, literals, expressions, and operators that are used in JavaScript. The chapter begins by discussing how to create variables and assign values to these variables. Then, it explores the different data types, such as Number, String, Boolean, Null, Undefined, and Arrays, supported by JavaScript. Moving ahead, the chapter guides you through the process of displaying the data stored in a variable on a Web page. Finally, the chapter gives details about various types of operators and then proceeds to explain how these operators merge with variables to form different expressions.
Chapter 4 covers concepts related to the conditional and looping statements of JavaScript. The chapter discusses each of these statements in isolation to each other. Conditional statements cover the if statement, the if...else statement, the else...if statement, and the switch statement. Looping statements cover the while statement, the do...while statement, and the for statement. The chapteralso discusses the break and continue statements used in JavaScript.
Chapter 5 illustrates the use of functions and events in JavaScript. The chapter discusses the types of functions and the difference between user−defined functions and built−in functions. Next, the chapter discusses how functions help add and implement dynamism, readability, and efficiency in a program. Next, the chapter discusses the concept of events in JavaScript. The chapter introduces you to event−handling functions and informs you about the way you can associate events with user interface actions. Finally, the chapter delves into how you can merge user−defined functions, built−in functions, and events to provide dynamism to a Web page.
Chapter 6 introduces the concepts of objects and object−oriented programming languages. It begins with an introduction to the difference between object−oriented and object−based programming. Then, it discusses the JavaScript object model. The chapter gives details about various pre−defined object types, such as Array, Object, Boolean, String, Date, Global, Math, and
Number. Finally, the chapter discusses how to create custom object types in JavaScript.
Chapter 7 delves into error handling concepts. The chapter begins with an introduction on how and why errors occur in a program. It then progresses with an explanation on how the error event provides the capability of handling the errors that are generated in a document. Next, the chapter introduces you to exception handling using the Error object and the try...catch...finally block. Finally, the concept of the nested try...catch statement is discussed that is also used with the throw statement.
Chapter 8 covers the concepts of controlling the features and functions of a Web browser. The chapter discusses the six main objects of the JavaScript browser hierarchy model: window, document, history, location, form, and frames. Each of these objects is discussed in the context of a separate scenario keeping in mind the practical implementation of these in real life.
Chapter 9 introduces the important concept of cookies and how they are implemented using JavaScript. The chapter begins with an introduction on how you can maintain the state information of a Web browser. Next, the chapter discusses the modus operandi of a cookie, its common features, application areas, and its limitations. Finally, the chapter discusses the built−in functions that are used to create, set, and read the cookies saved on a client’s computer.
Chapter 10 gives an introduction to plug−ins and the methods used in JavaScript to interact with
plug−ins. The chapter provided an overview of the development process involved in creating a
plug−in.
Chapter 11 gives a detailed explanation on style sheets and the methods used in JavaScript to
interact with style sheets. Next, the chapter discusses cascade style sheets and how they help Web developers create style sheets at different levels and then use them together to generate a cascade effect. The chapter also gives a brief introduction to DHTML and the layers in JavaScript.
Chapter 12 discusses developing server−side scripts with the Microsoft IIS server. The chapter assumes that the reader has basic knowledge about server−side scripting, databases, RDBMS concepts, and their implementation. The chapter begins by comparing two technologies, ASP and
LiveWire and suggesting when each of them may be appropriate for use. The chapter discusses the various server−side objects of ASP, such as Request, Response, Application, and Session. The
various properties, collections, and methods of each of these objects are also discussed in detail.
Finally, the chapter delves into the concept of database interaction using ADO objects.
The Appendix introduces JavaScript as a server−side scripting language. Appendix is divided into three sections. The first section discusses the implementation of JavaScript as a server−side
scripting language by using LiveWire. The second section details the basic concepts of databases,
RDBMS concepts, and their implementation. The third section delves into discussing how you can use LiveWire to interact with databases.
For Download:
Click Here