JavaScript for XPages Development (9.0)
Units: 12
Duration: 3 classroom equivalent days
Discussion Access: 12 months

Summary Description
Java Script is the core programming language for XPages. Before you get started with XPages development you should have JavaScript skills. This course will teach you JavaScript using XPages in the familiar Domino Designer environment and covers:
  • The basics of the JavaScript programming language
  • How JavaScript is used in the XPages Editor
  • Core JavaScript Language and Syntax
  • The String, Array and Regular Expression Objects
  • The JavaScript Object Model
  • The differences between Client-side and Server-side JavaScript
  • How to use Client-Side JavaScript on XPages
  • The basics of Server-Side JavaScript
  • How Java and the Domino Object Model works with Server-side JavaScript

This course is designed exclusively for Domino developers who want to get started with XPages but need to learn JavaScript. After this course you will be ready for TLCC's XPages courses. There are many demonstrations and activities you do right in Domino Designer. An expert instructor is a click away if you need help.

Audience and Prerequisites
Experienced Notes and Domino application developers who want to learn JavaScript. Experience with the Domino Object Model (LotusScript or Java) is also strongly suggested. Click here to view the complete skills path for XPages development.

System Requirements
The system requirements for this course are: Course Modules

Module 1 - Introduction to JavaScript in XPage Development
This introductory module introduces the main concepts of the JavaScript language and how it is applied to XPages development. You will explore why JavaScript was created, what it can do and how it can be used to enhance your XPages and Domino applications. You will also begin using JavaScript techniques to interact with the user and data on a XPage.
  • Describe JavaScript
  • Describe the difference between JavaScript and Java
  • Demonstrate what can be done using JavaScript
  • Understand JavaScript's role in HTML
  • Explore the Domino Designer interface for coding JavaScript on an XPage
  • Describe JavaScript's role in XPages and Domino applications
  • Use Client-side JavaScript to read values, write values and send user alerts on XPages
  • Explore how to code JavaScript using the XPages JavaScript Editor
Module 2 - Core JavaScript
This module describes the Core JavaScript language, its syntax and its basic building blocks. As with any programming language, JavaScript has its own way of interpreting each piece of code. Understanding each code element and how JavaScript handles them is essential to being able to write JavaScript programs. The demonstrations in this module will primarily be using Client-side JavaScript. The syntax differences with Server-side JavaScript will be covered in a later module.
  • Describe each of the JavaScript language basic building blocks
  • Describe the data types supported by JavaScript
  • List the special characters in the JavaScript language
  • Describe functions and how to create and invoke them
  • Describe and use the various JavaScript program flow control statements
  • List the JavaScript statement and expression construction rules
Module 3 - Objects in JavaScript
This module introduces the main concepts of the JavaScript Object Model. Understanding what the JavaScript Object Model was created for and how to work with it is covered in this module. You will learn about object properties, methods and events and how to work with them. The JavaScript String, Array, RegExp, Number and Date objects are also featured.
  • Define and demonstrate object properties, methods and event handlers
  • Describe the JavaScript String object, its properties and its methods
  • Describe the JavaScript Array object, its properties and its methods
  • Describe the JavaScript RegExp object, its properties and its methods
  • Describe the JavaScript Number object, its properties and its methods
  • Describe the JavaScript Date object, its properties and its methods
Module 4 - Client-side JavaScript in XPages
This module takes what you have already learned about Core JavaScript and Client-side JavaScript objects to show how to program features into your XPages applications. The built-in Client-side JavaScript classes are used to manipulate the browser and its objects. Interacting with the input controls and user entered data is covered as well as creating and using Client-side JavaScript libraries. Debugging Client-side JavaScript using the Firefox Firebug extension and finally an introduction to the Dojo toolkit are all covered in this module.
  • Overview of Client-side versus Server-side JavaScript
  • Use Client-side JavaScript for events on XPage controls
  • Discover how HTML is rendered in the browser for a XPage
  • Learn how to write Client-side JavaScript to access XPage input control values
  • Create and use Client-side JavaScript libraries to store reusable code
  • Use the Firefox Firebug extension to debug Client-side JavaScript in XPages
  • Introduce the Dojo toolkit
Module 5 - Server-side JavaScript in XPages
The previous module covered the Client-side JavaScript classes that are used to manipulate the browser and its objects. This module explores the additional power and flexibility that Server-side JavaScript brings to XPages development. Since Server-side JavaScript is executed by the Domino server, you can access Domino data using the Domino Object Model (just like in LotusScript or Java), @Functions and even Java classes such as Vectors and Iterators. The XPage events that support Server-side JavaScript are covered, including how to take advantage of the unique Server-side features available in the Script Editor such as computing properties dynamically or on page load and having direct access to the reference libraries. The techniques for declaring variables, getting and setting component values, and using ported @Functions in Server-side JavaScript are covered in this module as well as creating and using Server-side JavaScript libraries for re-usable code. This module also covers some key Java constructs useful in working with the Domino Object Model and Server-side JavaScript, and defines the class/object/data-type mappings between JavaScript and Java. Finally the three different ways an XPages developer can express and work with dates and times using Server-side JavaScript is covered.
  • Identify the events that support Server-side JavaScript
  • Use the different ways of declaring variables in Server-side JavaScript
  • Get and set component values using Server-side JavaScript
  • Include @Functions in Server-side JavaScript
  • Create and use Server-side JavaScript libraries
  • Identify the back-end classes in the Domino Object Model accessible to Server-side JavaScript
  • Create and populate a Java Vector object
  • Use Vector methods to return information about a Java Vector
  • Use the Iterator class to access Java Vector components
  • Convert a Vector to an Array
  • Understand the importance of using the recycle() method when processing document collections in Server-side JavaScript
  • Identify the mappings between JavaScript and Java
  • Use the JavaScript Date object to work with date/time values in Server-side JavaScript
  • Use the Java Date object to work with date/time values in Server-side JavaScript
  • Use the NotesDateTime class of the Domino Object Model to work with date/time values in Server-side JavaScript