Erin McKean explains how she used rapid API prototyping with LoopBack, a Node framework for creating APIs and connecting them with backend data sources, to build an app that would help her get a spot as a contestant on Jeopardy!

In this video:

Erin McKean’s goal was to get on the game show Jeopardy!, so she was determined to prototype an app that would help her learn how to answer the types of questions the producers ask. She wanted to win big bucks AND also beat IBM Watson’s score on the program (as Erin would say, she likes to aim high), but she needed two things – an API and data.

The way it works: Erin intended to prototype an API against a dataset. She chose LoopBack, the Node framework for creating APIs and connecting them with backend data sources, MongoDB, the open-source cross-platform document-oriented database, and IBM Bluemix as the platform.

“I like to think of the framework as cake mix for APIs … you open it, add your data, stir, and you’ve got APIs.”

Erin points out that just like box cake mixes, you can make the standard cake with the basic LoopBack program or you can make the cake of your dreams with a little customization.

LoopBack is a tool for quickly generating Node.js REST APIs. Based on Express.js, it is open source, free to use, and you can deploy it anywhere you can deploy a Node app. It consists of a library of Node.js modules; client SDKs for iOS, Android, and web clients; a command-line tool, loopback-cli, to create applications, models, data sources, etc.; and Yeoman generators for scaffolding applications. (Scaffolding is a specification-oriented technique that allows the programmer to specify how the application database may be used in order to generate the final code that the application can use to create, read, update, and delete database entries. Yeoman provides a generator ecosystem of plugins that can be run with a single command to scaffold complete projects or useful parts.)

These are the capabilities that make LoopBack perfect for rapid app development:

  • It requires little to no coding to create dynamic end-to-end REST APIs
  • It gives you access to data from Oracle, MySQL, PostgreSQL, MS SQL Server, MongoDB, SOAP, and other REST APIs
  • It lets you incorporate model relationships and access controls for complex APIs
  • You can use built-in push, geolocation, and file services for mobile apps
  • It makes it easy to create client apps using Android, iOS, and JavaScript SDKs
  • It allows you to run your application on-premises or in the cloud (deploy wherever Node can)

Erin talks at length about the process, describing her dataset (200,000-plus questions from the show, converted into a nice simple JSON format), outlines the setup for the prototyping, then takes you through the tweaking and execution of the program to end with a nice, easy-to-use demo that generated random questions that are likely to be asked on the show.

As a bonus, Erin also talks about why you might want to use a framework for this type of project since you could write it yourself in Javascript. Her most important answer – it makes the implicit, explicit. Erin says, “Everything you’re thinking in your head, the framework tells you ‘this is how you do that’.”

Thanks to Cloud Foundry Summit 2017 for promoting such a great resource.


Resources for you

Using Bluemix

Solve real problems building on the Bluemix platform.

Join The Discussion

Your email address will not be published. Required fields are marked *