Book Image

Learning ServiceNow

By : Sylvain Hauser
Book Image

Learning ServiceNow

By: Sylvain Hauser

Overview of this book

This book shows you how to put important ServiceNow features to work in the real world. We will introduce key concepts and examples on managing and automating IT services, and help you build a solid foundation towards this new approach. We’ll demonstrate how to effectively implement various system configurations within ServiceNow. We’ll show you how to configure and administer your instance, and then move on to building strong user interfaces and creating powerful workflows. We also cover other key elements of ServiceNow, such as alerts and notifications, security, reporting, and custom development. You will learn how to improve your business’ workflow, processes, and operational efficiency. By the end of this book, you will be able to successfully configure and manage ServiceNow within your organization.
Table of Contents (21 chapters)
Learning ServiceNow
Credits
About the Author
About the Reviewer
www.packtpub.com
Customer Feedback
Preface

The structure of an API class


First, let's define a few terms. According to Mozilla's object-oriented JavaScript documentation, a class is sort of like a template for an object. It pre-defines the methods and properties of an object generated from the class.

An object therefore, is simply an instance of a class!

A method is a function or subroutine that's declared as part of a class (and any objects that are instances of that class).

A constructor is a special type of function that runs when an object is declared as a new instance of a class using the new keyword. In ServiceNow, this constructor function is usually called initialize. Any arguments passed into the class during instantiation will be passed into this function, which effectively builds the object that will be returned.

Note

Naming convention dictates that while variable names use camelCase capitalization, class names use SentenceCase capitalization.

Here is a simple example of what a very simple class might look like:

var MyClass ...