That's my JAMstack
Bryan Robinson
Podcast
Episodes
Listen, download, subscribe
Espen Hovlandsdal on mixing static and dynamic, content management and more
Quick show notes Our Guest: Espen Hovlandsdal What he'd like for you to see: Sanity.io His JAMstack Jams: Mixing Dynamic and Static together | NextJS His Musical Jam: Russian Circles | Godspeed You! Black Emporer | If These Trees Could Talk Bryan Robinson 0:03 Hello, everyone and welcome to another exciting episode of That's my JAMstack - the podcast where we ask the fun filled question "What is your jam in the Jamstack?" I'm your host, Bryan Robinson. And this week, we have the amazing Espen Hovlandsdal from Sanity.io. Bryan Robinson 0:17 Before we dive into that interview, we'll welcome back our sponsor for this week TakeShape. Stick around after the episode to find out more information about their content platform or head over to TakeShape.io/thatsmyjamstack for more information. Bryan Robinson 0:33 Well, Espen, thanks for being on the show with us today. Espen Hovlandsdal 0:35 Sure, glad to be here. Bryan Robinson 0:37 Cool. So can you tell us a little bit about yourself? What do you do for work? What do you do for fun, that sort of thing? Espen Hovlandsdal 0:41 Sure. So my name is Espen. And I work as a software engineer at a company called Sanity.io. Most people will probably call Sanity, a headless CMS. But I tend to think of Sanity more as a platform for structured content. So we have like a hosted database in the cloud. And you got like an asset pipeline and a rich set of API's to talk to that database and to all like surrounding services. And of course, it's also got the actual open source, headless CMS that's based on React, which then talks to those API. So we're kind of a headless CMS built on the Jamstack. So it's been fun. Bryan Robinson 1:23 Cool. So how would you How would you differentiate - since you said you like to think of it as a structured content or structured data platform - how would you differentiate that between that and a CMS? Espen Hovlandsdal 1:34 So our API is kind of the first piece that we built. So we put a lot of effort into making sure that the API's are really like, great to work with. They're very flexible in terms of how you can query for data, how you mutate data that's based on like a very fine grained patch system. And you also have like transaction history. So you can go in and see all the changes that have happened over time to the document. And so it's sort of building the API first and then putting a sort of CMS on top of that, that talks to those API. So we sort of dog food all the all the API is through that product. Bryan Robinson 2:15 Okay. Very cool. So so it's it's more of an API that happens to also have a product in front of it that is a CMS. Espen Hovlandsdal 2:21 Yeah, kind of. Yeah. Bryan Robinson 2:22 Very cool. So what do you do for fun? That's what you do for work. What were you doing in your free time? Espen Hovlandsdal 2:28 I moved to San Francisco from Norway in August last year. So I've been sort of getting to know the city and the country. So that's been interesting. Now with the Corona lockdown and stuff. I've had less time to explore the city, but I've been playing a lot of video games for the past few weeks and also try not to do too much coding in my spare time, but that's like, I feel like I have a valid excuse for that these days. At least. Bryan Robinson 2:58 True. Yeah, I can definitely understand that. What games are you playing right now? Espen Hovlandsdal 3:02 I've been going back to The Witcher 3, which I'm quite fond of, and playing a lot of Civilization as well. Bryan Robinson 3:10 Civilization if you if you have spare time, and you just want to get rid of that third time, that's the game for you. Espen Hovlandsdal 3:16 Eight hours fly by; your whole weekend this there. Bryan Robinson 3:21 So so obviously you're well versed and kind of in depth in the Jamstack world being part of a structured data company such as Sanity, but what was your entry point into the idea of the Jamstack or static sites? Espen Hovlandsdal 3:34 Good question. Jamstack is kind of a loose term. So it's kind of hard to know what people put into that. But I guess when I was 13, and I made a bunch of like fan pages for all my favorite video games. So does that count that's like static HTML uploaded to an FTP right? Bryan Robinson 3:52 When I was 13, I made fan sites for anime and all sorts of stuff. So hundred percent it counts. Espen Hovlandsdal 3:59 Joking aside it's, it's kind of funny how we went from all these, like, static HTML sites that were just super easy to host. And then, at some point, we, for some reason thought that everything had to be server rendered and dynamically generated. But, uh, yeah, I used to work at this. There's a newspaper company in like a large online newspaper in Norway, they had so much traffic that, uh, that they built this, they built and funded the Varnish project, which is like a cache layer in in the form of a reverse proxy. And even with that, in front front, we kind of embraced the concept of building as much as possible into static copies of pages. So I've been working in that kind of paradigm for quite a while. Espen Hovlandsdal 4:46 But with like, more increasingly dynamic and complex pages, it's got gotten harder and harder to do, right until we got these static site generators. I think I think I started looking at it. Well, what most people think of as Jamstack back when Kyle Matthews started tweeting about building Gatsby, he was a huge fan of React ever since, like 2014. Yeah, when he when he started building Gatsby, he was tweeting all the while he was creating it about, like, why he chose to use GraphQL as a data layer and all the kind of choices that went with it. So I was kind of, I was really intrigued by it. And when I finally got a chance to try it out, I was just really impressed because it's kind of always what I wanted ever since I started with React, the ability to just build this static site in React and then have that mounted on the on the client side. So you can get that like dynamic stuff as well. Bryan Robinson 5:40 Yeah. Best of Both Worlds in that. Yeah. Cool. So yeah. So you went you basically straight up static, like way back in the day with HTML, and maybe and some CSS thrown in through server side render and dealing with all the cache and then into the Gatsby from there. Espen Hovlandsdal 5:56 Yeah, I was starting to work at Sanity and And I was following the Gatsby development. And initially, one of our community members made a source plugin for Gatsby. And I was really happy to see that. And then I discovered some really cool things that Gatsby plugins did like internally. So I saw some overlap there and some potential that we can improve the plugin with some of the core features of sanity. So I kind of built a our like official Sanity, the Gatsby plugin as well. Bryan Robinson 6:28 Oh, very cool. And have you have you noticed a lot of like, community contributions in the Jamstack versus like server side world? Is it a different feeling? Are there more, fewer? Like what's that kind of feel? Like you said, like, the community actually first created that? Espen Hovlandsdal 6:46 Yeah, it's been it's been really interesting to see a lot of contributions to both the Gatsby ecosystem especially, I mean, they're really, really good on getting contributions from people and really generous interest. of recognizing the work that's been done by people and sending swag and all kinds of stuff. And also would like frameworks like Next and Gridome and you see a lot of contributions. Not sure if there's a more, but I guess it's easier to get started with contributing to those frameworks since you've got it all running locally. And it's very easy to, like, run through the build and see that it works as expected. Bryan Robinson 7:25 Yeah, that makes sense. So how are you using, obviously, at Sanity, Sanity is a is a Jamstack company. But how are you using kind of philosophies both professionally and personally of the Jamstack? Espen Hovlandsdal 7:35 Well, professionally, we're maintaining all these starter project templates and stuff. So we get to play with a lot of approaches to how you want to structure your data and how you want to pull that in and how you want to build these things. So we've got I've been playing with all sorts of stuff like Gatsby and Gridsome, Sapper, 11ty they've all got, like slightly different ways of approaching stuff. Like 11ty, For instance, has a, it's kind of one of my favorites right now, because because of this, like simple nature of it, it doesn't like lock you into anything. The only thing that I really, really appreciate you be using React just for that, because I'm so familiar with JSX. But apart from that, it's it's really refreshing to see a different take on the whole data just being whatever way you can get data from some service and then render static from that Bryan Robinson 8:32 Those JavaScript data files are pretty great. Espen Hovlandsdal 8:34 Yeah, absolutely. So yeah, it's a guess we try to build as much as possible using the static like, thought they went into, like our website is now running on next year's and I think we're trying to move as much as possible to using static statically generated things there. There are still a couple of reasons why dynamic content makes sense in terms of previewing drafts and all kinds of stuff, but for the main reason, for the main part, it's should be able to just work statically. Right. Bryan Robinson 9:09 So out of curiosity, you're you're working at kind of a big, structured data company, or maybe we can we can simplify and say a CMS for the, for the current question. That's typically been kind of the purview of a dynamically generated site and a server, you know, server rendered site. What are kind of the challenges that we that we face in kind of coming from traditional like server side stuff and moving into this static realm, like, wha
That's my JAMstack RSS Feed
