logo

NJP

Thread by @jacebenson on Thread Reader App

Import · Mar 15, 2022 · article

Jace Benson 👨‍💻⚙️ Profile picture

thread#showTweet data-screenname=jacebenson data-tweet=1503875737044062212 dir=auto> I’m going to take a new approach to writing this before I make a blog about it. Read along the good and bad of working off of ServiceNow.

https://twitter.com/Tekvoyant/status/1503216732449693698

thread#showTweet data-screenname=jacebenson data-tweet=1503875740604973059 dir=auto> I like the automation I make for work. I wanted to have that at home. I work on ServiceNow for my day job. It’s amazing.

thread#showTweet data-screenname=jacebenson data-tweet=1503875742827958274 dir=auto> ServiceNow is not something everyone can afford. It’s cost is high and so is it’s value. But when your talking about a small company or individual it’s just not viable from it’s cost.

thread#showTweet data-screenname=jacebenson data-tweet=1503875744396681218 dir=auto> Enter then the now experience and GraphQL. I had to learn it and this new JSX thing that is totally not “React”. I followed along with what was available for ServiceNow’s docs but these concepts were not sticking.

At some point @AndrewAlburyDor told me about this @redwoodjs project. I don’t recall a whole lot about it other then it is new and seemed like it was all about the JAMStack. I was interested.

It’s great. It has lots of concepts that I didn’t know were around. It has deploy targets to free places to test stuff out at. But what made this magic was the ease it was to get a GraphQL connected database up. (Thanks to @prisma ).

thread#showTweet data-screenname=jacebenson data-tweet=1503875749652086788 dir=auto> Great. So that was just getting started. Let’s get into the details. ServiceNow the platform is called many things. But at it’s most fundamental parts it’s lists, forms and automation.

thread#showTweet data-screenname=jacebenson data-tweet=1503875751229239296 dir=auto> Well with redwood I have lists and forms and automation.

thread#showTweet data-screenname=jacebenson data-tweet=1503875752533577732 dir=auto> ServiceNow gives you a database. You can add columns to it remove then. Empty the table out. Great. All that is done in GUI. With prisma you have to define your tables and columns in a file, have it generate the SQL and migrate that to your database. It sounds harder then it is.

thread#showTweet data-screenname=jacebenson data-tweet=1503875754349797377 dir=auto> Once migrated if your schema change isn’t careful prisma will ask if you want to wipe the affected table of data. (Imagine making a field required that wasn’t before). These SQL things are still unclear to me but they are not something you deal with in ServiceNow

thread#showTweet data-screenname=jacebenson data-tweet=1503875755998130182 dir=auto> Once migrated your great. You have access to this new column. Great. Now let’s make a table. So we get the data and it’s in JSON. JSON that you formed in GraphQL. Making a table that has sorting, searching, pagination is all manual.

thread#showTweet data-screenname=jacebenson data-tweet=1503875757235486727 dir=auto> I really just want full-text search and that does exist However it’s not supported on all prisma supported dbs, and it’s also not going to necessarily get related information.

thread#showTweet data-screenname=jacebenson data-tweet=1503875758594351104 dir=auto> Sorting seems simple enough but you have to tell the server to refetch the data if you exceed the current page.

thread#showTweet data-screenname=jacebenson data-tweet=1503875759668092932 dir=auto> Pagination is interesting. ServiceNow just added a feature so you don’t need to show the link record count of a table. I can see why you need to do a aggregate on the table to get that result with the same query your running. That can be expensive as in it takes time to run.

thread#showTweet data-screenname=jacebenson data-tweet=1503875760926429187 dir=auto> That all being said you can make an action to represent anything. Wanna show a list in a cell. No problem. Wanna show a count of relations in a row. No problem. It just takes time to figure out the how.

thread#showTweet data-screenname=jacebenson data-tweet=1503875762084098050 dir=auto> Forms. I’m still figuring these out. Forms are complicated. You might want to show a related records name and not the stored (sys)id of the record. This is where I am still learning. Oh yea. Then properly setting the data types on submission. Wanna know why booleans in …

thread#showTweet data-screenname=jacebenson data-tweet=1503875763493343238 dir=auto> ServiceNow are strings? Probably because nearly everything is a string. Otherwise you’d have to be more specific about your types.

thread#showTweet data-screenname=jacebenson data-tweet=1503875765087182850 dir=auto> Okay now automation. In ServiceNow you have at its core Business Rules, Event queues and flows. In other systems you have middle ware and queuing solutions. Understanding what objects are available before or after a database operation has really opened my eyes.

thread#showTweet data-screenname=jacebenson data-tweet=1503875766320349185 dir=auto> I see how ServiceNow doesn’t have CRUD rules on all operations. read != readAll. You can hide a whole columns data if you have access to that kind of data at the server.

thread#showTweet data-screenname=jacebenson data-tweet=1503875767729590276 dir=auto> In ServiceNow the closest thing to this I can find is ACLs which evaluates on every row or display rules (only applies to read)

Oh yea. Then there’s performance. Right now news.Jace.pro is slow. I know why and I know a way to make it faster but it’s at a cost of complexity.

• • •

Missing some Tweet in this thread? You can try toforce a refresh

View original source

https://threadreaderapp.com/thread/1503875737044062212.html