JSJ 429: Learning about Postman with Joyce Lin
Join us as we talk to Joyce Lin, a developer relations advocate with Postman, and we talk about this amazing tool for interacting with APIs. We discuss it’s more well-known features, and also learn about other less well known, but very powerful features that allow users to greatly increase the usefulness of the tool, both for front end and back end developers.
Special Guests:
Joyce Lin
Show Notes
Join us as we talk to Joyce Lin, a developer relations advocate with Postman, and we talk about this amazing tool for interacting with APIs. We discuss it’s more well-known features, and also learn about other less well known, but very powerful features that allow users to greatly increase the usefulness of the tool, both for front end and back end developers.
Panel
- Aimee Knight
- Steve Edwards
Guest
- Joyce Lin
Sponsors
- G2i | Enjoy the luxuries of freelancing
- Educative.io | Click here for 10% discount
____________________________________________________________
"The MaxCoders Guide to Finding Your Dream Developer Job" by Charles Max Wood is now available on Amazon. Get Your Copy Today!
____________________________________________________________
Links
- Postman Roadmap on Trello
- Follow Postman on Twitter >
- Postman | The Collaboration Platform for API Development
Picks
Steve Edwards:
Joyce Lin:
- Follow Joyce on Twitter > @petuniaGray
- The Science of Well-Being by Yale University | Coursera
Follow JavaScript Jabber on Twitter > @JSJabber
Special Guest: Joyce Lin.
Transcript
STEVE_EDWARDS: Hello everybody and welcome to another episode of JavaScript Jabber. I am Steve Edwards, podcasting from Portland, Oregon, and here with me on my panel is Amy Knight.
AIMEE_KNIGHT: Hello from rainy Nashville.
STEVE_EDWARDS: Rainy. Yeah. It's supposed to be raining here, but it's actually not so rainy anymore, which is quite nice. And with us today as our victim, I mean, excuse me, guest is Joyce Lin from Postman. So Joyce, you want to say hi?
JOYCE_LIN: Hi there, I'm calling in from gloomy old San Francisco.
STEVE_EDWARDS: So Joyce, why don't you tell us a little bit about yourself, what you do, why you're famous, and all the things about JavaScript you do.
JOYCE_LIN: Well, I wouldn't call myself famous. I'm a developer advocate, but I work for Postman, which is famous. So I work for Postman as a developer advocate. I go around talking at conferences when we're not in quarantine, writing blog posts, and essentially just talking with people like you that use Postman and have questions.
If you're a front-end developer looking for remote work, then I recommend G2i, a React and React Native focused hiring platform that will connect you directly with their clients that need your skill set. What makes G2i a unique hiring experience is that they spend the time marketing you to their clients of your choice. G2i is a team of engineers that technically vets you upfront. If you pass their vetting, their clients have agreed to skip their initial interview process, saving you time and energy getting your next gig. They take care of all the hard work for you so you can get focused on development. To join G2i.
STEVE_EDWARDS: For starters, why don't we talk a little bit about what Postman is? And we know it's not a man walking around delivering mail. So what is Postman and why is it useful?
JOYCE_LIN: A lot of people use Postman differently, but it's an API development platform. Most people use Postman for exploratory testing or as a REST client or an HTTP client. But since its early days, the toolchain has grown in breadth and depth. So folks are using it for all sorts of things during the API development lifecycle.
STEVE_EDWARDS: Yeah, now I can remember using Postman way back when it first started, at least I don't know how soon after it first started when it was a browser plugin. And so now it's obviously grown into a full-fledged app with a company supporting it. Can you talk a little bit about the timeline and how that exploded and took off?
JOYCE_LIN: Yeah, so our CEO Abhinav Vesvanah. This was his side project. He had a full-time job and he was working with APIs and he had a pain point. So he developed the Chrome extension Postman. Back then the logo was blue. Today it's aggressively orange. So you might not even recognize the logo. But it started off as a side project. I think the origin story is that he answered a Stack Overflow question. Somebody had a question, how do you fire HTTP requests? And he just answered and it got marked as a solution and people loved Postman. It took off from there and about a year or two later, they actually quit their full-time jobs and started a company.
STEVE_EDWARDS: So one of the things I'm always curious about with companies that are founded and based on open-source projects is the business model behind the company. So you're a developer advocate, so this may or may not. Yep, you're Alex. I'm sorry for that. But is this like a freemium thing? Because I know it's obviously free for anybody to use and to a certain extent, and then you just pay for extra features. Is that how it works? Or is it different?
JOYCE_LIN: We've switched our business model a few times. I've been with the company about three years, and so we've been experimenting with some different things. But yeah, I would characterize it as freemium. We still are at our core open source. So we're open core. Our runtime is open source. We have a number of accessories. Like you might have used Newman, our command line runner. It's open source. So there's a lot of stuff that's open source. A lot of the stuff is available for free. And then once you hit certain limits, that's when we actually start making money. Because especially if you're an aggressive user, that's incurring costs on our platform. So we just start charging for it.
AIMEE_KNIGHT: It might be helpful to talk about some of the features of Postman because I know when I first started using it, I just used it as a front-ender, testing out what a backend is going to give me and just playing around with it more easily. But there are also so many options that you can save. Different collections, I know. I've used that in the past at different companies and people can pass those around, provide those to customers in the form of with your documentation and stuff like that. So maybe if you want to talk about some of those features that people might not be aware of.
JOYCE_LIN: Sure, yeah. So the canonical use case is as a front end developer, you're using Postman as a client to see what you're getting from the backend. So now we have backend developers or middle layer developers, API engineers that are in charge of setting up APIs that are using Postman to potentially give to the front end to say, here's what you could be getting. So they're setting up mock servers. So what I meant by the API development lifecycle is that if you have an architect that's designing and planning what your API is going to look like, now we have capabilities for the designing part of the API, housing your specifications, and then using that to generate Postman objects like a collection. And the collection, Amy, as you mentioned, is a grouping of requests, HTTP requests. And so you can persist your data in these little folders or collections. So the API development lifecycle from designing to building and debugging to testing, testers are actually a huge segment that use Postman to either manually explore what they're getting from the servers or to build automated testing like user flows, full test suites. And then we have like, say you're going to deploy your endpoints, you're going to deploy your API. And then you can essentially hook up those tests to do automated monitoring. So ongoing monitoring for, are you still alive? Are you still behaving like I expect you to? Through to alerting and not resolution, but alerting that something's not functioning as you would expect it. And then on the very tail end, you have an API that's fully baked. Now you have your collection. You have all this metadata about your APIs and how you expect it to behave. Now you can generate documentation from it. So that's what I mean by the complete API lifecycle. That's a lot of stuff. I know.
STEVE_EDWARDS: There's one other feature I know that we use extensively is environments and variables. And I find that pretty useful. You want to talk about those?
JOYCE_LIN: Sure. So variables in Postman are like variables in programming. You can use a bunch of different variables at different scopes to accomplish different things. And what you're talking about environments is one scope of a variable. So if you have an environment, like a server environment, and you want to set up a configuration for that server environment you might parameterize or variabilize certain aspects like your root domain or certain user key-value pairs like your username and password or different user profile information. So the environment is just a portable set of variables that you can then apply to different collections that execute a certain workflow. Yeah, environments are super powerful for sharing with other people the key configuration to set up a certain test scenario, you can actually just send them an environment.
STEVE_EDWARDS: Oh, you send it, okay, like email it separately or send it to them through Postman?
JOYCE_LIN: Steve, if I'm not mistaken, you're actually on a team plan. So we actually do, there is a paid tier that allows you to collaborate in the Postman app. So if you're on one of those paid plans and you have a Postman team, then you can share the collection, or you can share the collection and the environment in the Postman app. But otherwise, yeah, you're emailing somebody like a JSON file representation of the environment.
STEVE_EDWARDS: Right. So just to give a real-life example of the environments, we have like a dev stack and then we'll have like a QA testing stack, containerized environments. And so we have different environments set up in Postman for each of those with a different set of variables. And so depending on where I want to connect to, I just switch environments and I'm using a separate you know, location server server set.
JOYCE_LIN: And you're using environments today to kind of toggle between server sets, but you can also use environments or other variable types to set up more sophisticated testing. So a lot of times people will use Postman for a unit tests or what I call unit tests. They're not like API tests. You hit an endpoint and then you write some sort of test to assert that you're getting some sort of expected response, but you can also emulate user flows. So if you have, if you want to take a user, log them in, create a user, log them in, have them actually take some actions, and then maybe delete the user, you can chain them all together using variables.
STEVE_EDWARDS: Yeah, one of the features that we use that I know some one of our back-end guys set up and it's really useful in addition to what you were talking about, we have like, you know, tests with 150 different requests in a full test suite. So if you want to be able to For authentication, you have to have a token coming back from the server and you got to have it saved because you want to send it with a request. So we have, for instance, a get token that makes a request, but then it takes the token stashes it in a variable and you have it in your variable for all your following requests, as long as you just put in that token variable in your API request, wherever it goes. That makes things very easy there.
JOYCE_LIN: Yeah, and if you have a separate request that gets your token and then you stash it in a variable and you can use it, say you have like a collection of like 300 requests and say your token's very short lived, you can actually retrieve that token before every single request that you make. If you have a pre-request script or something like that.
STEVE_EDWARDS: Yeah, we use the test portion of it, but yeah there's a whole pre-request set here as well. Now another thing that we use and again I suspect this might be of a team or how somebody can create a suite of tests or collections, I think, as what you have them called here, and then branch them off onto their own, you know, and take it and tweak it and do it in such a way. I know there's ways you can do it where you just branch off and create your own thing and it doesn't modify the parent test at all, or you can do it in such a way in your own collection that it does modify the parent test. Am I correct?
JOYCE_LIN: eah, it's just basically Git, except you're inside Postman. Create a fork off of a master if you will, and then keep it completely separate and then merge it back if you're the original author or if you're not the original author, then you can open up a pull request. So it's exactly like Git. Okay. That sounds familiar. Yeah. And that one's not... I think anyone can do that. It's not on the paid or enterprise plan. But clearly if you're on a paid plan if you have team members. So otherwise you're just forking and merging with yourself.
STEVE_EDWARDS: Right. Now you also mentioned this Newman, I think all that Newman test runner.
JOYCE_LIN: Yeah, Newman's our open source command line runner. It's a node package. So say you just hate our user interface. You don't like to use graphical user interfaces. You can actually run your collection or your test suite from your command line. So you just install Newman, NPM install Newman. And then you say Newman run the collection. So you can run it from your command line, but you can also build it into your CI CD pipeline if you have one and it's a package, it's a library. So you can actually pull it in to your node scripts too, if you wanted to build a custom solution.
STEVE_EDWARDS: Okay, so it's just a way to automate everything without having the UI and just have it as part of another workflow.
JOYCE_LIN: Yeah, Steve, do you guys have, not to put you on the spot or anything, but do you guys have tests and test suites that you run? regularly?
STEVE_EDWARDS: Yeah, yeah, we have one guy that runs. That's one of the big things is running all our tests through Postman on the server side.
JOYCE_LIN: And do you guys have a CI pipeline?
STEVE_EDWARDS: Continuous Integration, I don't know, to be honest.
JOYCE_LIN: OK, so that one guy that's tasked with running all the tests, perhaps when you guys are merging code, they're opening up Postman and running the tests. Maybe they're using Newman to run the test from command line. But if you guys had a continuous integration pipeline, then you would just use Newman. You would install Newman in your continuous integration environment and run the tests so that at the time that you're ready to merge your code, at the time that you're ready to deploy your code rather, you just run those tests. And then it's just another part of your CI pipeline.
STEVE_EDWARDS: OK. Yeah. I'm pretty much the only friend in Vellore we have right now. So I don't really have too many people to integrate in terms of code together, but I know our backend group is a lot larger. So I suspect they have something like that. Another one thing I've noticed before that I've seen people use is really slick is the documentation and how someone can use Postman to document their whole API. There's one particular platform I've worked with, Form.io, where they just have a link on their pages here, see the whole API, and it opens up in Postman. You can open it up in Postman. Can you talk about how that works?
JOYCE_LIN: Yeah, that's actually been one of our more popular features. We launched documentation maybe a little over a year ago. And it's just like we didn't even put a lot of marketing behind it. And people just understood the benefit of it right away. So if you're tinkering around in Postman day in and day out, and you already have the metadata for your requests, you have the URL, the verb, all the parameters, you have everything already set up. Postman will auto-generate the documentation. And the documentation that we're talking about is in the web. So you're able to browse the metadata about the collection. And then from like, you know, if you did nothing, you just hit the button to auto-generate the documentation, you would already have all the metadata and you would be able to get something to work, assuming that you have, it was working while it was in Postman when you generated it. And then people have been layering on on top of that. So now we actually have technical writers using postman day in and day out They've always been using postman, but now they're using it to generate documentation. So they're actually going in and writing English to say here's Okay, this request needs to be authenticated in this way and you can see that by the metadata But if you didn't know where to get your access token or your credentials to get your access token. Here's a screenshot of that page. Here's what you do. So they're going in and adding human language, natural language rather, and telling people how to use and consume these endpoints. So that's the documentation that is actually pretty popular. And something that we launched more recently after we did documentation and found that people were really keen on it is that we launched the API network. So inside Postman, you can pull in public APIs and examples of people using public APIs, and then just import it into Postman and then just start clicking around interacting with it and that closeness to interaction I think is what people find very appealing about the API network.
STEVE_EDWARDS: So these APIs that get pulled in, they're connecting to an actual server somewhere? These demo APIs that have been set up?
JOYCE_LIN: It depends. So if I'm pulling down Stripe's API, I can pull in their API documentation or their reference. I still need to get my Stripe API key, poke it in potentially as an environment variable and before I can get an actual server response.
STEVE_EDWARDS: OK, that would make sense. I know there's a lot of demo APIs out there. I've seen GitHub repos with lists of demo APIs for pictures of cats and dogs or all kinds of dummy stuff.
JOYCE_LIN: Well, some of the most important stuff. Actually, with this COVID crisis going on right now, we've had some people just creating. I'm not quite clear if they're owning that data set. I think in some cases, they're just public data sets and then setting up these collections in the API network so that you can pull it in and explore the data a little bit more closely. So it's kind of like a public repo in GitHub, if you will. Just you're searching around for something that's useful or can teach you something.
AIMEE_KNIGHT: I didn't realize that existed. That's pretty cool.
JOYCE_LIN: Yeah. No, I mean, that's been one of a... It's kind of a hidden feature in the UI, unfortunately, but it's very powerful once people know it's there.
STEVE_EDWARDS: Is this, you're talking about the import button that's top left up here?
JOYCE_LIN: See, you would think it would be under import, but no. If you go to new, the one right next to it and then tab over to API network, that's the public APIs and then the second tab there templates. Yeah, in fact, I just listed some COVID collections as featured this morning. So if you scroll down like four or six COVID-19 API, there's a few in there. Clearly, depending on the time that you're listening to this, it might be outdated. But I just came across these really cool collections that community members had published. And then now I'm trying to build, I'm actually trying to build a visualized data set. So that's another one of our recent features. So the COVID-19 API template, for example, it's two endpoints, one gets global stats and one gets stats by country. I'm trying to build a data visualization inside Postman to just essentially look pretty, but also help me see a little bit better than reading a JSON response.
In JavaScript, there's always something new to learn. Frameworks, technologies, tools, updates. It's a lot of work to stay up on JavaScript. Educative.io helps with that. Their platform is made from the ground up with software engineers in mind. Instead of making you scrub back and forth through videos and spend hours on setup, their courses are text-based and feature live coding environments so you can skim back and forth like a book and practice in browser as you learn. One course that I recommend is Learn TypeScript, the complete course. It'll walk you through learning TypeScript from top to bottom, front to back. TypeScript seems to being adopted by all of the major frameworks and is a great way to make sure that your JavaScript is doing what you expect it to do. The tooling is awesome and it's just a terrific way to learn what modern JavaScript is heading toward. Check it out today.
AIMEE_KNIGHT: So you talked about some of this being open source. I'd love to talk about some of the technology itself, like what Postman is built on. If people, do people have the option to submit features or look at things?
JOYCE_LIN: Yeah, absolutely. So if you go to our GitHub organization, it's called Postman Labs, that should have a list of all of our open source projects. So the runtime for Postman is open source. It's a node runtime. It's the same underlying runtime for Newman as well. We have all sorts of accessory projects, like code generation is something that a lot of people don't know about. If you have your request working a certain way inside Postman, and you can export a code snippet, the code generation is an open-source project. Our documentation, we have so many people using the Postman platform now, I think we're at 10 million around the world. So, you know, if so many new people learning about Postman, if you want to contribute to the docs, that's open source.
AIMEE_KNIGHT: I imagine that'd probably be a pretty good thing because there's a lot of like newbies that use this and I always encourage like newer developers to, you know, start with documentation and stuff like that.
JOYCE_LIN: I love contributing documentation because if I'm learning new technology, I'm the perfect audience for...
AIMEE_KNIGHT: Exactly.
JOYCE_LIN: Oh, I don't understand that. Let me make that a little bit more clear.
AIMEE_KNIGHT: Exactly.
JOYCE_LIN: Yeah, they're starting to teach Postman now in coding boot camps and in CS programs and stuff. It's actually really kind of cool. I've done a couple talks at colleges. It's just really neat to be able to empower people that are getting into the field. And actually Postman, like I talked about tech writers or people who may not identify as being like engineers. There's a ton of people that I interact with that don't even know what an API is. But somebody at their company set them up with Postman so that they can...
AIMEE_KNIGHT: Yeah, I've seen that too. ..
JOYCE_LIN: generate their own reports.
AIMEE_KNIGHT: Yeah, like even using like if you have a QA department, having them do it, if they're QA'ing a backend API, or I've even seen like PMs use it who are a little bit more technical to kind of understand what the API already provides and things like that. So I just, I don't know, especially for teams that are, it's not full stack and you have like a front end and backend, I think that having Postman is really, really, really great to serve as like your you have an easy way to see what your contract is that you're working with.
JOYCE_LIN: Yeah. And I know PMs, even very technical PMs, if they have a setup to do user acceptance testing, they might still use Postman because hitting the API is usually going to be what comes first. So they can just validate, yep, this is what I wanted to happen.
AIMEE_KNIGHT: Yeah. And I guess I would encourage people to, especially newer people, they can I think especially as Postman has grown, there's more and more features. It can feel slightly daunting. I mean, obviously, it's probably less daunting than in Curl or something like that. And there's so many other options that make it better than just using Curl. But I definitely recommend doing this, because especially when you're building things, it just minimizes the surface area of things that can go wrong. So you're literally just calling the API and making sure that you're passing in all your parameters correctly. And or if you're even building a back-end API, testing out all the different edge cases for different responses and stuff like that. And just minimizes the surface area of what can go wrong because if you're actually testing it through the code, then there could be things wrong with the code. But this way, on the front end, you know that because you're just testing out the URL, you know that nothing is wrong with your front-end code. But yeah, especially even when I did back end, it was really, really helpful for me just to hammer the API that I was building with a bunch of different edge cases and make sure that it worked.
JOYCE_LIN: Yeah. If you're just getting started with Postman, I work for the company and I'm still slightly overwhelmed at all the new stuff that's coming out from our engineering team. If you're just getting started, just use Postman like a client and use it to explore and learn. I'm the same way with my IDE. I could do 6 things really well. But there are so many buttons, there are so many options. Once you're ready to start learning a little bit more, some people can plow through the docks. I'm not one of those people. We did launch a new learning kind of like. It holds your hands a little bit so that you can learn bit by bit. But in the very bottom part of the app, there's something called Boot Camp. It's right next to a graduation cap icon. But that's if you just downloaded Postman, you'll see it front and center. But if you've been in Postman for a while and you're like ready to take the next step, click the boot camp. And then you can say I'm interested in automated testing. I'm good with exploratory testing, manual testing. But now I want to learn automated testing. There's little bits and blurbs. They've done a really good job of kind of highlighting and just abstracting a little bit of what monitoring is or what API documentation is.
STEVE_EDWARDS: Oh, this is cool.
JOYCE_LIN: Yeah, it's so helpful.
AIMEE_KNIGHT: I didn't even know this existed either.
STEVE_EDWARDS: I know it is
AIMEE_KNIGHT: is that the best way to learn? Are there other resources like on YouTube or on your website for learning things or is that the best way?
JOYCE_LIN: It depends. If you're an interactive kind of person, like you want to see it exactly in the app that you're going to be working in, bootcamp is the best way. We do have a lot of tutorials that we publish and a lot of YouTube videos that we publish. But we have such a huge user base. I'm really fortunate. This is one of the best developer relations jobs you could possibly get. We have so many people creating content. We have a monthly newsletter and every month we just have a stack of really cool content that we have to curate and review and say, okay, we can only fit so many items in our newsletter people that have whole like YouTube channels dedicated to teaching other people about Postman.
AIMEE_KNIGHT: I'm amazed. I saw I clicked on all the different public APIs and that you were talking about earlier. This is awesome. I didn't even know this existed.
JOYCE_LIN: Yeah,
STEVE_EDWARDS: I'm still not seeing those public APIs. I must have missed something you'll have to show me later.
JOYCE_LIN: If you go to that new orange button next to the import, right, tab over to API network.
STEVE_EDWARDS: See, all I see is a list under new. I don't see it API network, but that's okay. You can show it to me later. Oh, I know the issue.
JOYCE_LIN: This is a UI. This is a usability thing. Don't click the dropdown, click the plus part of the new.
STEVE_EDWARDS: Ah, there we go.
JOYCE_LIN: That's good feedback.
AIMEE_KNIGHT: What would be the, what would be the process if I had an open API and I wanted to get it added to this?
JOYCE_LIN: Pretty much you just submit it. You publish it. I don't know if we should talk through it, but if you have a collection in your sidebar and then you go ahead and view in web. So you're clicking the collection fly out details. You click view and web. Now you're in a browser. This is the private documentation. In the top right corner, there's a button that says publish. And then that just means that it's public. It's available on a URL for you to pass your coworker or to, you know, your, your mom, and then they can access that documentation. And alongside that flow. Yeah.
AIMEE_KNIGHT: I think my mom thinks I just like punch keys on a keyboard all day.
JOYCE_LIN: You work on computers.
STEVE_EDWARDS: Yeah, he works on computers all day.
AIMEE_KNIGHT: Yeah, this is great.
STEVE_EDWARDS: So what is Postman itself built in? What's the tool set that's used to build the Postman client?
JOYCE_LIN: So it's a node runtime. And if you have the app downloaded for Mac, Windows or Linux, it's an elect. So that's how we've been able to scale across platforms. Again, we talked about it starting as a Chrome plugin. So you might have the Chrome app, but there were some limitations with that setup. And so we went over to the Electron app. Now we have apps for Mac, Windows, and Linux. And we're actually going to be building out some more. Like right now, if you were trying to publish your open or public API, you're in the browser. So there is some functionality that's in the browser and more and more of the functionality that you see in your Electron app will be seen in the browser.
STEVE_EDWARDS: Okay, you lost me there for a minute. So we have, you've got the Electron app, which is what I'm running. And go back to how we're seeing it in the browser.
JOYCE_LIN: Well, you're just logged in. So you see, I assume you're logged in otherwise. So it's just a little part, a little blurb of Postman that you can see in the browser. But we're working on building more and more of that functionality out in the browser.
STEVE_EDWARDS: Gotcha. Okay. Anything else that we haven't talked about that you want to talk about postman, maybe future stuff. What new features does postman have coming down the pike for the client?
JOYCE_LIN: Let me pull up a, we have a public roadmap.
STEVE_EDWARDS: Oh, okay.
JOYCE_LIN: Here, I'll message it to you. I don't know. I don't know the best way to do this, but I'll go ahead and message it to you. Yeah, so we have a public roadmap of everything that's in planning just for the sake of transparency, there's a few different ways you can see what's going on. We have a GitHub issues feature requests and issues area, but this is the, you know, somebody at the top has approved it, that we're going to start working on it. So I haven't talked about a lot of the advanced features. I briefly touched on mock servers. We have some additional enhancements coming there reporting. So we have so many users of Postman and we have these public APIs. Being able to see how public people or external people are consuming your APIs, maybe where they're getting stuck, finding some insights there, I think, is going to be really exciting for people that have public or even private APIs. So say, Steve, you at your company, you guys have X amount of collections, and then you're onboarding new people, showing them collections so that they can learn your technology, seeing how people are consuming, which endpoints are the ones that are getting hit the most you're about to deprecate an endpoint, like take a look at the previous history for that endpoint before you deprecate it so that you can build it into your plan. So this public roadmap has a bunch of the stuff that's coming. A number of these you can see with the labels are for some of the paid plans. So people are not using Postman in isolation. Well, physically they're in isolation hopefully now but they're working with their team members and collaborating with other functions. And so a lot of the functionality that we're building out right now is related to collaborating. So we talked about the forking and merging and pull requests and all that kind of stuff. Just being able to work a little bit more seamless with your team members. Yeah, there's a lot of stuff here.
STEVE_EDWARDS: Yeah, the collaboration was sort of what got me to bring this to our management just because we had so many people. Using Postman, it was all our own things. You know, everybody's got their own little environment and we couldn't share things. And what I put in, somebody else would have to put in menus. But that was the big impetus for us to get to go on this. The team license was just the ability to collaborate across multiple people and share things and be a lot more efficient in your time instead of having to reinvent the wheel every time you wanted to do something, mock something that somebody else was doing.
JOYCE_LIN: I've definitely talked to people that are emailing a JSON file back and forth or sending a slacking JSON file. It's pretty painful. And my analogy for that is like, I don't want to use brand names, but it's like using a Word document that is static versus a Word document where you can collaborate in real-time. It's like using Microsoft Word versus Google Docs.
STEVE_EDWARDS: Oh, exactly. Yeah. I totally get what you're saying.
JOYCE_LIN: Yeah.
STEVE_EDWARDS: One thing I want to go back to one thing you mentioned was a mock server. And I know that from a JavaScript standpoint, we're starting to see tools come out for front-end developers to be able to mock up an API as part of their app. I think Mirage.js is one that's recently came out. So can you talk about mock servers and how you would use them or create them inside of Postman?
JOYCE_LIN: Yeah, and I think it's really great that people are learning about mocks because I think when we first launched the mock server product or feature, like a little over a year ago, my conversation was all about like, what is a mock server and what is it good for? And now people are pointing out other tools that they're familiar with. So a mock in Postman is essentially a static response that is hosted on Postman Cloud. So if you're a front-end developer and say you want to give to the backend developer, here's what I expect. Here's how I'm building my clients. And here's what I would expect from the backend. You can actually mock those responses and then pass it off to a team member. Or say you're the developer and you have a tester. The tester can actually get started writing tests against that mock response instead of waiting for the developer to release something to a certain server environment before they can touch it. And so being able to prototype is that use case for a mock server. There's also another use case that involves testing where you're isolating your dependencies. But the prototyping, I think, is very exciting.
STEVE_EDWARDS: Yeah, as a frontend developer, that makes perfect sense because if you're cruising along and building your UI and you need some data to fill into your UI, lorem ipsum text only works so much, even with all the variations of lorem ipsum text, like bacon ipsum and gangster ipsum. But I'm sorry, I'm diverging. So that allows you to just keep going forward with actual data while you're back and people are actually getting their APIs built. Now you said that it stores it in Postman Cloud. What if I'm like, just a one-off, I'm working on my own little side project here and it's just me, myself and I. Can you build a mock just inside the client locally here or is it always something that's gonna be stored out on Postman Cloud?
JOYCE_LIN: No, our mock servers are stored on Postman Cloud so you would still need to have outside access or be able to, yeah, hit the internet.
STEVE_EDWARDS: Okay. But is that something that anybody could do? Or do you need some sort of minimal team or enterprise licensed...
JOYCE_LIN: No. ..
STEVE_EDWARDS: Mock Serving?
JOYCE_LIN: The mock servers are free unless you're hitting astronomical amounts. But what you're asking about doing something locally, one of the environments is local hosts. So if you had a local server running, you could theoretically... This is not our mock server feature, by the way. But you can actually hit your local host and then set up your responses to be returned. But that's I think that defeats the purpose of the mock servers being a quick way to prototype something.
STEVE_EDWARDS: Sure.
JOYCE_LIN: I did have one other thing I wanted to talk about before I forget. I briefly talked about this, the visualizer, especially front-end developers, I think, will be able to understand the benefit right away. Remember when I was talking about the COVID examples in the templates? Something I'm working on now is to visualize those results. So right now you're getting back a JSON object and you're you know, finding China and then you're like drilling down on China to see like how many confirmed cases they have. So something that launched relatively recently is called the Visualizer. And that is something that we had a webinar and I think like 10,000 people registered for that. It was by far one of our biggest webinars. And the Visualizer, Steve, you said you're familiar with the tests scripts. So there's two areas that you're writing vanilla JavaScript in Postman. That's the prerequest scripts tab and the tests tab. And it's just occurring before your request and after your request. And so tests, it makes sense. You have the response from the server, so you can write your test against it. But you can also write vanilla JavaScript. So there is a feature that you can take that response and then stuff it into a template. And the template is just stringified HTML, CSS, and JavaScript. And you can render a visualized example of your response in Postman.
STEVE_EDWARDS: OK, yeah. I'm looking at it now. It's the Visualize option there for your response. We're next to Pretty, Raw, and Preview.
JOYCE_LIN: Yeah. So you have the Preview. You have the Raw from the Server view. And then if you click Visualize, you're not going to see anything unless you have that stringified template and you've actually written some JavaScript under the Tests tab.
STEVE_EDWARDS: Right, yeah, there's a Learn How tab that goes out to your help page that shows how to do that. So what kind of, is it some sort of charting library that's built-in to do that kind of stuff? Or what's the tools and what's how many different types of visualizations can you do with this feature inside the client?
JOYCE_LIN: The types of visualizations are limited by what is accessible on the internet. So there is no inbuilt charting library, but you can bring in, you can stringify a script to bring in via CDN like Chart.js or D3 or whatever your favorite templating library is, you can stringify that under test template, sorry, under test script.
STEVE_EDWARDS: Oh, okay, I see. Yeah, here's the help docs about using your own libraries and accessing data inside the template. That's cool. That's cool for someone like me who's really visual, who likes to see things. Yeah, that's neat.
JOYCE_LIN: Yeah, and if you're, I mean, like right now, I'm trying to build this beautiful map of COVID and it's very glamorous and very like exciting. But say you're working on something that's less exciting, like, you know, here's the inventory that we currently have in a JSON object. And JSON is not terribly hard to read, but it's not super fun to read either. Even putting it in a table or some sort of like conditional highlighting or something will make it easier for you to consume what I call more boring data.
STEVE_EDWARDS: Yes, I don't know. JSON can be exciting to read. Well, no, maybe not. Anyway. Cool. Anything else you wanted to talk about? Any other features that we might have missed? Because as I'm finding out, there's a lot of features I didn't know about.
JOYCE_LIN: I would say specifically for this audience, something that is not new, and it hasn't been new for many, many moons, but it's just knowing about the scripting tabs. I just talked about them, the prerequest and the test tab. You can do so much just knowing that those tabs are there and that you can write JavaScript to execute. Like you can do setup in your prerequest. See, we were talking about getting an access token. You can do that in a prerequest. You can generate dynamic variables. There's so much that you can do if you know how to write JavaScript, the prerequest and test scripts tabs are your friends. So it's not a new feature, but like if you learn one, if you hear about one new thing to learn, check that out.
STEVE_EDWARDS: Well, yeah, it makes sense when you can script and do all kinds of things that the UI doesn't allow you to do, then you certainly have a lot more flexibility and power with the tool. We, interesting enough, we have it as a test, not a pre-request script, but a test to get the token and fill it in a variable. But it works. Awesome.
Are you stuck at home climbing the walls when you should be hanging out with the community at the latest conference to get cancelled? Are you wondering where to hear your JavaScript heroes like Amy Knight and Douglas Crockford and Chris Heilman? After the cancellations, I decided to put on a JavaScript conference for you. Online. I invited my favorite folks from around the web and got them to come speak at an online event just for you. Go to jsremoteconf.com and check out our speakers and schedule. The conference is on May 14th and 15th. The call for proposals is open until March 31st. Come join us at an online conference that we guarantee will keep you safe and keep you informed. jsremoteconf.com.
STEVE_EDWARDS: All right. I think we've covered everything, so let's move to picks. Looks like we lost Amy, not sure what happened there. So I will jump in with my pick. And it is a little more of a, it's a little novelty item that I've had for years. I was inspired by my boss who had it and it's called the no button. It's just a big red button that has the word no on it, and if you hit it, it gives various versions of somebody saying no, like No, no, no, no, no, no, no. It's great. A lot of times if my kids come into my office and they want something, I can just hit it and say, oh! And they get the picture. Actually, my eight-year-old comes in and hits it about 20 times, and I eventually have to tell him to stop because he loves it so much. But it was like 10 bucks, and if you just search for the no button online, you can find it. Joyce, do you have anything for us? Any picks?
JOYCE_LIN: Picks for anything?
STEVE_EDWARDS: Anything you want it to be. It could be tech-related, non-tech-related, books, movies, you name it.
JOYCE_LIN: So I was on Reddit. This came from a, this might've been a life pro tip from Reddit, but I just started it, spending a lot of time at home. So I decided to do some e-learning courses. The Science of Wellbeing from Yale, I think it's a Coursera class, the Science of Wellbeing, it's about like improving your happiness. Just started that, but rather happy with it, well, rather happy with it for now. So that's my pick for now.
STEVE_EDWARDS: Well, Coursera, awesome. That sounds pretty useful, especially in what we're going through right now with the whole virus and everybody quarantining. Great, well, thank you for coming on, Joyce. We appreciate learning about Postman, especially something that as front-end developers, we use, is very useful in our line of work. Thanks everybody for listening and we will see you next time here on JavaScript Javer.
Bandwidth for this segment is provided by Cashfly, the world's fastest CDN.Deliver your content fast with Cashfly. Visit C-A-C-H-E-F-L-Y dot com to learn more.
JSJ 429: Learning about Postman with Joyce Lin
0:00
Playback Speed: