SN Pro Tips

View Original

How to Learn ServiceNow

Hello, future ServiceNow developer! - I'm Tim Woodruff; founder of The SN Guys. I write most of the articles on this site (SN Pro Tips), and I’m the author of a few books on ServiceNow development, architecture, and administration, including Learning ServiceNow, and The ServiceNow Development Handbook.
I've put together this quick-start guide to learning ServiceNow development, as a sort of map or check-list for going “from zero to credible” when you’re starting out your career as a ServiceNow developer.

Speaking of careers, don’t forget to check out my article on ServiceNow development as a career, which will help you get a sense of what to expect, how to build your resume, and how to market yourself as a ServiceNow developer (among other things).

This article is not meant to actually teach you to be a ServiceNow developer (it’s far too short for that). Instead, it's meant to be something you can reference when you find yourself thinking "Okay, what next?" on your journey to becoming a credible expert. In each section, I outline a few key points that you should look for, and pay special attention to. These are tidbits of knowledge that will help you out in your ServiceNow development career, or help you understand some concept about how SN works more deeply and intuitively. I don't recommend skipping around to learn those specific topics, but once you've done a bit of research (such as reading a book) on one of the topics mentioned, go back and review the list of concepts for anything you may have missed, and then research those points specifically.

Note: If you want to keep up-to-date on my articles and books, you can subscribe to SN Pro Tips.
You can also follow me on Twitter at
@TheTimWoodruff, and connect with me on LinkedIn


See this content in the original post

Relational databases

Understanding relational databases fully is not necessary to get started (it's not too tough to pick up along the way), but I strongly recommend that you acquire a solid understanding of the basic data-structures, types of relationships, and data-types you'll run into in relational databases. This will help you understand how ServiceNow stores and correlates data (including database records like Incident tickets or attachment files).

Having a vague, surface-level understanding of the SQL query language syntax under your belt would also be helpful in understanding some of the high-level and low-level functionality in ServiceNow, since it is - at its core - largely a big relational database with functional “sugar” on top.

What to know

Here are some basic concepts that would be helpful to be aware of: 

  • What is the difference between a field or table label, and a field/table name

  • What is a primary key (PK)

    • In ServiceNow, the PK for (almost) all records in all tables, is a column (or "field") labeled Sys ID with the column name "sys_id"

  • What is a foreign key (FK)

    • “Foreign key” fields in ServiceNow, are usually called Reference fields - though there are other "types" of fields (aside from reference fields) which can hold one or multiple FKs

  • How are records related to one another

    (hint: Using an FK is one way to relate records to one another, but not the only way!) 

    • One-to-many relationships

      (This typically uses an FK column)

      • Understand what constitutes "parent" versus "child" in these relationship types

    • Many-to-many relationships

      • Using an m2m table, versus using a FK field which supports multiple FKs on two tables (or on the same table - records can reference other records in the same table)

    • One-to-one relationships (How can these be enforced?)

      (Note: These are not easy to enforce without some kind of logical underpinning, but it's a good idea to think about them and how they could be maintained.)

      • When are one-to-one relationships necessary?

        (Hint: rarely. Often if you have a 1-to-1 relationship, data from both records in the relationship should be in a single record rather than split across two - but not always. One example of an exception would be the CMDB and Asset tables which have a one-to-one relationship enforced by multiple “Business Rules”, but you’ll learn about that much later!)

  • Queries (Don't worry too much about syntax, but think about how they work.)

    • Dot-walking - querying based on data in an FK (reference) field

    • Query efficiency - If querying a table with a few million records, what are some basic things you can do to make your queries not make the database cry? 

      • Again, think about functionality, not syntax.

    • "AND" vs "OR" and logical operators: (=, !=, IN, LIKE, etc.)

    • "Join" queries (though you can pick this up later if it seems a bit arcane for right now)

Resources


ITIL V3/V4

Note: ITIL stands for “Information Technology Infrastructure Library”

First, you’ll want to learn basic ITIL terminology. Maybe take an "ITIL Foundations" course. 
The ITIL Foundations certification isn't always necessary but it's good to be able to say that you have it. Lots of (especially entry-level) job will require it, and it's a pretty cheap cert to get.

I've worked with too many developers who, when asked to solve a problem, build really off-the-wall solutions because they don't understand the context they're working in (specifically, ITIL). It's difficult to explain how important it is to understand ITIL when you're building functionality that equates or relates to IT processes.

ITIL is very important to understand. It's also very dry, especially if you don't have a lot of context for what you're learning (such as prior IT experience). Don't let this discourage you, and don't be afraid to learn only the basics about ITIL at first - but do come back to it, and make sure you understand it early-on in your career! 

What to know

  • What is the difference between a "problem" and an "incident"?

  • What is a "CI"?

  • What is a "service catalog" and "catalog item"? 

  • What is a "Change request"? 

    • If you want to work closely with Change Management (see ServiceNow as a Career article for info on specialization), also learn about the different types of change (normal, standard, emergency).

Resources

You can find loads of ~100 to 150-page books on Amazon, but make sure you get one with more than 10 reviews and a 4-star minimum rating. 
Short + high rating = information dense and won't waste your time. 

You can even find them on audiobook, if you're able to learn that way. I personally love audiobooks, but it requires a lot of focus to learn something technical and completely new from an audiobook. 

This book is a good bet, and it has audiobook and Kindle versions. This book also looks great. 


JavaScript

JavaScript is the language you'll use to do all of your development within ServiceNow - both client-side, and server-side. This is because ServiceNow's application servers run a Java-based implementation of JavaScript, called Mozilla Rhino. This has a few minor implications but until you get fairly advanced with SN development, you won't likely have to worry about them. 

Remember: Java is to JavaScript, as Car is to Carpet. In other words, the two are effectively unrelated. Don't learn Java - I mean, unless you feel like it. But it won't help you. Instead, learn JavaScript

What to know

Next, I recommend studying JS until you understand the following concepts: 

  1. Variables, variables types (despite JS being “loosely typed” — and learn what “loosely typed” means as well)

  2. How to create and interact with arrays and objects

  3. Condition statements (boolean expressions), conditional code blocks (“if” and maybe “switch/case” blocks), and loops (aka “flow control”).

  4. Functions in JavaScript

    1. How to write functions with proper syntax (specifically in JavaScript ES5; so don’t worry about “arrow functions” if you come across those).

    2. Function parameters (AKA function “arguments”) - how to define the arguments a function accepts when writing the function, and how to call a function (with or without arguments)

      1. Pro-tip: Typically, “parameters” are what you call them when you’re writing a function, and “arguments” are what you call them when you’re calling (executing) the function. However, if you use these terms interchangeably, everyone will know what you mean. Very few people are pedantic about that term.

    3. Returning a value from a function in JavaScript

  5. JSON formatting, objects, reference types, and primitives (and the differences between them) 

  6. Pass-by-reference (and how cool and annoying it can be)

  7. Truthiness, falsiness, and strict vs. coercive/loose boolean expressions

  8. Understand JS's coercive loosely-typed nature, and how to use and avoid it
    (I recommend avoiding it using strict expressions because I think coercion leads to lazy and error-prone programming personally, but the important thing is to understand it)

  9. Asynchronicity, and higher-order/callback functions

    (You can probably move on and pick this one up later, but make sure it's in your toolkit eventually)

Without studying SPECIFICALLY those topics (as in, not just skipping over everything else to get to specifically those), once you know enough JS that you've incorporated those topics into your knowledgebase by osmosis, you'll be ready to start focusing on the ServiceNow platform.

Focus on ES5 (ES6 is unsupported on the JS implementation used by the platform back-end (which is based on this old thing called Mozilla Rhino)). Client-side code (such as Client Scripts and Catalog Client Scripts) can use ES6, but don’t worry about that. Anything you write using ES5 syntax will be just fine in client- or server-side code.

You don't need to be a JS super-pro before you jump into ServiceNow, but it's important to be able to read and write simple 10-20 line scripts in basic syntax without getting confused.

You can try using JavaScript IN your ServiceNow instance, and even using basic ServiceNow APIs at this point, but don't get frustrated if you can't figure that part out yet. You can find both the API documentation, and a way to request your own free personal developer instance, at http://developer.servicenow.com/

Resources

For learning JS, I recommend the "You Don't Know JS" book series for this; specifically Up and Going, Types and Grammar, and this & Object Prototypes. The whole series appears to be available for free as a Github repository, here

If you’re more of a visual/hands-on learner, which I know a lot of you are, check out Chuck Tomasi’s guide to JavaScript specifically in the context of ServiceNow. Go give him a thumbs-up, because this is a fantastic video series! The only caveat is that if you use this guide, it can be extremely helpful to already have learned a fair bit about the ServiceNow platform, (such as by reading Learning ServiceNow 😉).

Note: If you enjoy games, there’s a great resource for learning JavaScript called Code Combat. If you’re in the US, you can join my “class” on CodeCombat and potentially send me JavaScript questions, by clicking here!

One great resource for learning JavaScript without too much “clutter” from ES6 that you’ll have to separate out in your mind, is Learn JS.
This is a great resource if you’re the sort of person who can easily learn by the sort of “read about it, then try it” methodology, and is the first place I tell people to check out when they’re thinking about learning JS, just to get the super-basics. More advanced concepts are more difficult to learn from a resource like this, but it’s a great place to start!

If you prefer a “watch and follow along” methodology, there is a wonderful YouTube channel by a big huge dork of a guy, called The Coding Train. This channel focuses a lot on JavaScript, but it definitely covers a lot of libraries, APIs, and tools that you don’t need for ServiceNow. If you want to learn JavaScript more generally, and build a knowledgebase that’s more generally applicable than just ServiceNow development from the beginning, this is a great channel to learn with. This playlist for example, teaches you JavaScript using the “P5.js” library. This library is completely irrelevant to ServiceNow, but you learn the language pretty thoroughly along the way.

A lot of people also find codecademy to be useful as a bit more of a "hands-on", almost bootcamp-style guide to the very basics - though I’m not personally fond of their recent changes. Just remember that you should focus on ES5, not ES6 (even though codecademy will teach you some ES6 concepts, it's important to try to sort of compartmentalize them). 

My biggest bit of advice for learning JS… do not pay for a “boot camp”. Boot camps, for most people, are just not a good way to learn and retain a large amount of information long-term.

Note: Keywords like let, const and class are all unsupported in ES5, and therefore in ServiceNow's server-side scripts (with rare exceptions such as scoped apps in post-Tokyo ServiceNow instances). You can use them in client-scripts, but it's best to focus mainly on ES5, especially at first, to avoid confusion. 


ServiceNow

Once you have at least a passing understanding of relational databases, ITIL, and JavaScript, you can begin your journey into the ServiceNow ITSM platform! This is the specific learning path that I recommend for this, but in the interest of full disclosure, I wrote a couple (but not all) of the books I recommend below. 

  1. Set up your Personal Development Instance (PDI).

  2. Read Learning ServiceNow (second edition). 

  3. Brush up on and reaffirm your JavaScript knowledge.

  4. After reading LSN and following the examples therein, do you feel like you're missing anything?

    1. Now is the time to study JS in the context of ServiceNow.

  5. Use ServiceNow for a while. Read the community forums and try to answer questions yourself, even if they've already been answered. Researching these answers will help you learn, and reinforce what you've already learned. 

  6. At this point, you're ready to start looking for an entry-level “Jr. ServiceNow developer” job!
    Don't stop studying though, just cause you're looking for a job! Keep your skills sharp, and read on! 

    1. Note: You may want to get the ServiceNow Administrator certification, but having a job as a junior ServiceNow developer will help expose you to more knowledge more quickly than anything else. 

    2. Don’t forget to check out my other article on ServiceNow as a career, including choosing a career path, how to build a “ServiceNow resume”, interviewing for a ServiceNow job, negotiating your salary, and so on.

  7. Read The ServiceNow Development Handbook, and keep it around. You may want to reference it often to make sure that you're writing robust, best-practice code, building future-mindful functionality, tables, and so on. 

  8. Read Mastering ServiceNow. It contains a lot of module-specific and deeper info that can definitely be helpful as you look to move your career forward into a more lucrative salary range.

  9. Read the handbook again. 😛 

  10. Peruse Jace Benson’s news site, which aggregates some of the best sources of ServiceNow news, information, and articles.

    1. This can be a great resource for finding out what the community is asking and saying about the ServiceNow platform. The link above points directly to the most clicked resources over the last 30 days which are aggregated by news.jace.pro.

Congrats! Once you've got through all of the above, and with a couple of years of hands-on experience, you're likely to be a really solid, perhaps even senior-level developer or architect!

Never stop learning. 🙂


You made it to the end! Thanks for checking out this guide. If you've found it useful, I hope you'll subscribe to get notified when I release new articles on ServiceNow. You can also follow me on Twitter at @TheTimWoodruff, and on LinkedIn

See this form in the original post

See this content in the original post