
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
ServiceNow is excited about the recent launch of the ServiceNow IDE, the ServiceNow SDK (Now-SDK) and the foundational Domain Specific Language (DSL) called ServiceNow Fluent in the Xanadu release.
What are Fluent, ServiceNow IDE and ServiceNow SDK (Now-SDK)?
The ServiceNow platform has seen a lot! Celebrating its 20th anniversary this year, it has expanded from a few hundred tables and a few dozen business rules serving a small handful of applications to the do-it-all powerhouse we know today.
Along the way the very simple tooling created for the early versions of the platform have fallen a bit behind the capabilities and practices that modern software developers have come to expect. ServiceNow set out to re-imagine development on the platform to hopefully be more efficient, pleasant and consistent for the next generation of developers and the innovative applications that they will build.
ServiceNow Fluent, ServiceNow SDK (Now-SDK) and ServiceNow IDE are the three technologies rolling out to accomplish that ambitious goal.
ServiceNow Fluent
(Or how I learned to stop worrying and just click “Accept remote update”)
Anyone who has done a deployment using the traditional xml-based update sets, or who has tried to merge two versions of one of these xml files from a source control branch can relate to how difficult it is to compare and merge these files. In fact, it’s not just difficult, but it is effectively impossible for a human.
To address the non-readable, difficult to merge nature of these files a new Domain Specific Language (DSL) was created called ServiceNow Fluent. It is based on the TypeScript specification, but unlike the TypeScript you may be familiar with it does not compile to JavaScript and instead compiles to the metadata files that describe the configuration of your platform instance.
Thus a a table definition and diff like this:
Is replaced with much more pleasant stuff like this:
To be clear, though—this does not replace the underlying representation of the assets on your instance, or even the xml representation, but it is a cleaner, easier to read abstraction built on top of that. Though it looks like code, it’s not actually executable—it is a typed description of those assets. Be sure to check out the directly supported asset types as we expand coverage.
Also, Fluent cannot be deployed directly on an instance (like, for example, editing a traditional business rule), instead it must be compiled (built) and deployed, which bring us to the next section.
ServiceNow SDK (Now-SDK)
The Fluent language is part of the Service Now SDK and the two go together like peas and carrots.
Now-SDK is a command line tool that compiles the Fluent code you create into the underlying xml metadata files. Just like TypeScript is compiled to JavaScript, and languages such as C# and Java compile to bytecode, ServiceNow Fluent compiles metadata that can be deployed on an instance.
This technology can be used to build from source locally and is also leveraged by the ServiceNow IDE (more on that later).
It is an NPM package (@servicenow/sdk) and can be installed to your machine to allow development locally. Check out the docs to install it and get started. You can also import other NPM packages and deploy them for use within your application’s scope. Thanks to the strongly typed Fluent definition and our own language server you even get nice auto-complete to help you along as you define and modify tables, business rules, modules and more.
What it does do
- Create new fluent-based scoped applications.
- Import and deploy NPM modules to your scope.
- Create your own JavaScript modules to be shared within your scope.
- Build and deploy your app to various instances with basic-auth credentials stored within a local profile.
What it does not do
- Modules are not accessible cross-scope (as is the case with traditional script includes—however script includes can be used to wrap and expose module functionality to other scopes).
- Imported NPM modules cannot use async or API calls and may rely on node-specific JavaScript features that could make them incompatible to run server-side.
- Add your changes to a traditional update set. To deploy your app you export the entire application as xml using the “Publish to Update Set” UI Action on the application record or using Publish to push the entire app to the App Repo.
- Authenticate with anything other than basic auth—but support for SSO authentication is coming soon.
ServiceNow IDE
Finally, like the dude’s rug, the ServiceNow IDE sorta ties the room together. It is the web version of the popular VS Code editor running directly on the instance. It allows you to edit Fluent apps and code in place, integrates your source with a git source control repo, and do builds locally.
It is a free ServiceNow store app which you can install by going to your Xanadu instance, opening Application Manager, clicking the “Sync” button and then searching for Glider to locate “ServiceNow IDE”.
There is too much within the IDE to cover right now but check out this sweet, sweet demo of ServiceNow IDE and some basics of Fluent.
NOTE: As of the writing of this article, early August 2024, there are two main “pro-dev” IDEs on the environment. The brand new ServiceNow IDE, which we are discussing here, and the classic ServiceNow Studio. From here forward I will refer to that as Legacy Studio. New products with similar names, and name adjustments to existing products, are coming soon and I will address the landscape of Studios as the rollout progresses.
What it does do
- Allows you to create and edit Fluent apps on the instance (Cmd/Ctrl-Shift-P and type “Fluent” for a list of commands).
- Run builds, which compiles the Fluent into the underlying metadata types on the instance.
- Browse the assets within your scope using the “Metadata explorer” cube icon on the left.
- Check in your fluent source using git (Cmd/Ctrl-Shift-P and type “Git” for the list of commands or use the branch icon on the left).
What it does not do
- It does not work on a Personal Developer Instance (PDI). This is due to technical limitations with the way that PDIs are hosted. We are working on this but do not have an estimate for when this will be fixed. NOTE: You can still do pretty much all of the same things with the Now-SDK from your laptop until you get access to an instance with the IDE installed.
- Convert existing applications (this capability is targeted for November of 2024).
- Deploy your application using source control in xml format from the IDE (as the which we are used to with Legacy Studio).
- The cool global code search from Legacy Studio (the search feature in IDE only searches the files within the workspace).
- It does not work on globally scoped apps or app customizations, but that is coming soon.
- It will not work on government, self-hosted or regulated market instances, but we are working on it.
NOTE: As you can see in this section there are limitations to which environments the IDE can run on. However, those limitations do not apply to Now-SDK, so if you are interested in Fluent you may use it locally and deploy your apps using the Now-SDK.
Are you a user, or thinking about becoming one?
If you personally, or someone you know, are beginning to evaluate this technology, or even considering it for use on a current or upcoming project, we want to know. Please feel free to comment here on your experience and be sure to reach out to me on LinkedIn or send me a dm @jonlind on sndevs.
- 6,957 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.