TNS
VOXPOP
Where are you using WebAssembly?
Wasm promises to let developers build once and run anywhere. Are you using it yet?
At work, for production apps
0%
At work, but not for production apps
0%
I don’t use WebAssembly but expect to when the technology matures
0%
I have no plans to use WebAssembly
0%
No plans and I get mad whenever I see the buzzword
0%
API Management / Frontend Development / Software Development

Dev Tool Creator Nylas on the 4 Pillars of Modern APIs

Nylas issued its API version 3 on Feb. 6 with a revamped approach that builds in intelligence features and a better developer experience.
Feb 13th, 2024 10:39am by
Featued image for: Dev Tool Creator Nylas on the 4 Pillars of Modern APIs
Photo by RealToughCandy.com from Pexels

APIs can seem like magic — unless you’re a developer. For developers, it turns out APIs require a lot of work to make the technology appear magical.

In a survey, Nylas, which offers APIs and development tools for building and integrating email, calendar and contact functionalities into applications and software, found that developers spend a lot of time dealing with APIs. The company surveyed 1,200 industry developers, engineering leaders and technical executives in the United States, with about 60% of the responses coming from developers. Of the respondents, 73% said they spend up to five hours a week on API maintenance and bug resolution. Only 23% of respondents said they consistently experience strong API performance.

Although APIs were supposed to make integration easy, 64% said integrating new APIs into their existing tech stack is a significant hurdle and challenge.

“This is where quick start guides, SDKs and support can be instrumental in removing friction throughout the integration process and allows developers to build faster,” the report noted.

The survey also looked at how much code they’re writing with or without APIs, the theory being that this is a good indicator of a positive developer experience. It turned out that while 80% said they expected to write at least 500 lines of code without an API, 41% predicted that they’d still write at least 500 lines of code with an API.

Nylas concluded there are four pillars that should go into a modern API:

  • Performance
  • Developer experience
  • Security
  • Intelligence

Nylas built the most recent version of its API, Nylas API version 3, with these four factors in mind, according to Isaac Nassimi, senior vice president of product at Nylas. It started with performance and latency.

Dealing with API Performance on the Frontend

“As a developer, you should consider latency very hard when you’re first using an API because switching off is hard,” Nassimi said. “Also it’s out of your control once you’ve actually decided to use the company. The big problem there is that there’s a certain threshold that users will be OK with of latency and as soon as soon as you cross that, you get some very odd behavior from users.”

That behavior is particularly problematic for the frontend, where users start to do unpredictable actions such as hit refresh, press the back button, close tabs, spam click, bang on the keyboard or abandon the site altogether. The only solution once an API is in place is to put something in the UX to help the user know what’s happening, such as loading bars. Even synthetic loading bars, where the developer is just assuming how long it will take and creates a loading bar accordingly, is better than just letting the user experience the processing time,” he said.

“As a developer, that’s even harder to code around, because you get stuck with these conditions that can put data and accounts in very odd states. Communication with the user is how you get around that. But the best remedy is to not choose an API that’s going to have a heck of a lot of latency.”

Ultimately, though, it’s better if the API functions as it ought, which drove Nylas to address latency problems in its updated API. Typically, its customer developers experience latency when connecting an email and calendar account as the API waits for the synchronization to happen with a CRM system and the user’s email.

“The developers, they do the integration but then they have to build intermediary loading states and things to be able to check if the sync has completed and interstitials they can show to the user to tell them like. ‘Hey, we’re still fetching your stuff,’” Nassimi said. “Nylas v3, which we’ve been building for a couple of years now and are launching — all of that’s gone. As a developer, I just have to integrate the endpoints, and I know the data is already there, so I don’t have to do all this work to handle those intermediate states.”

The improved latency is “nearly instantaneous,” he said. Nylas rebuilt the API to have email provider integrations as first class, he said, so the data is sent through instantaneously rather than being replicated on Nylas’ end, he said.

“You’re going to see every API move towards that within the next few years,” he said.

“We do a lot of magic secret sauce under the hood still, but overall, the most important thing to remember is that we’re just passing that request right through to the source of truth,” he added.

Smarter APIs

One addition Nylas predicted is that APIs will need to be “smarter.” Intelligence can be added on via data parsing, predictive analytics and what Nylas calls smart composing, which is giving the developers the ability to use any GPTs they want.

Intelligence can unburden developers and reduce their coding volume, Nassimi said.

“What I consider true intelligence is when you use those tools to be able to give users things that they didn’t even know they wanted,  but as soon as they see it, they go, ‘Yes, I need to put that in my platform,’” he said.

“Where we’re looking is things like parsing, so look, you’ve got a lot of email data passing through your system. Sure, we give you the emails, but what we can also give you is what’s in the emails. Someone buys something, well, we can give you the data that’s in that receipt, we can tell you what they ordered and give you the images of the things that they ordered. We can pull those out for you in a structured way.”

Security and Better Developer Experience

Modern APIs should also address security, particularly since API breaches are “extremely prevalent,” he added.

“A few things really are what determine your security,” Nassimi explained. “Obviously, there’s the code you write, but there’s also the processes that you put in place and the operations — essentially how well you keep those processes. Internally, your culture is going to really define how well you do all three of those.”

Nylas makes it a habit to treat customer data with a certain amount of “holiness,” Nassimi added.

“I’ve never, in my time here seen a customer email or any actually true customer piece of data, which, frankly, I’m surprised at,” he said. “We also have a lot of customers that have helped us make sure that we’re at that absolute top-tier level, right? We have banks, we have medical companies come in and they have the absolute highest thresholds that we have to clear.”

Security is easy to forget about — until a developer sees the effects of neglecting it, he said.

“Then for the rest of their life, it’s a pretty high priority,” Nassimi said.

Finally, Nylas prioritized developers’ experience in its modern API requirements. Since all of Nylas’ customers end up building frontend integrations, one way Nylas improved developer experience is by providing components for the frontend that provide an email view or rolled-up conversation view. They also offer a scheduler so developers can integrate a Calendly-like experience into their applications, Nassimi said.

Group Created with Sketch.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.