Notes from DevRelCon SF 2019

I attended DevRelCon in San Francisco on June 6-7. It was a superb event, with great speakers and awesome community. The following are my notes (not complete sentences) and pictures from the event.

Being Better At Developer Relations with Kathy Sierra’s ‘The Kick Ass Curve’

Steve Pousty (CrunchyData)

  • Steve’s talk focused on how to be better at Developer Relations. Steve demonstrated this concept using Kathy Sierra’s “The Kick Ass Curve”
  • You can find his slides here
  • DevRel goal
    • Make users happy and successful with your product/service
  • Get users to be awesome in the least possible time

    Developer Relations success curve
  • Different companies can have different curves
    • Background knowledge and experience of users (don’t control)
    • Quality of documentation and teaching material (control)
    • The actual design of the product/API (control)
    • The size and helpfulness of your community
  • We often disagree with Product Managers and Engineers because PMs and Engineers think they are at a different place on the curve. PM and Engineers are familiar with the service/product and usually don’t experience “learning” about the service/product like outside developers
  • Summary
    • Think about the audience (who you are targeting and how to get the pas the suck zone ASAP)
    • If we can’t get people out o the suck zone before they give up – we will never get them to experience power
    • Remember, when “talking” to others, to think about where they are on the curve
    • Use the curve when it helps, ignore it when it is doesn’t

Continue reading “Notes from DevRelCon SF 2019”

How to Invoke an External REST API from a Cloud Function

In a previous blog post I showed how to create your first cloud function (plus a video). It’s very likely that your cloud function will need to invoke an external REST API. The following tutorial will show you how to create such function (it’s very easy).

  1. Sign into an IBM Cloud account
  2. Click Catalog
  3. Remove the label:lite filter and type functions
  4. Click on Functions box
  5. Click Start Creating button
  6. Click Create Action
  7. For Action Name enter ajoke and click the Create button.  A new cloud function will be created with Hello World message
  8. Replace the function code with the following code which invokes a 3rd party REST API which returns a random joke:
    var request = require("request");
    function main(params) {
       var options = {
          url: "",
          json: true
       return new Promise(function (resolve, reject) {
          request(options, function (err, resp) {
             if (err) {
                return reject({err: err});
          return resolve({joke:resp.body.value.joke});
    • The code is simple. It uses the request Node.js package to connect to an external REST API
    • The external REST API returns a random joke
    • A JavaScript Promise is used for invoking the REST API
    • At the end the cloud function returns a response in JSON format
  9. Now click the Save button to save the code. Once the code is saved the button will change to Invoke. Click the button to invoke the function. In the right-hand panel you should see output with a random joke:
      "joke": "Project managers never ask Chuck Norris for estimations... ever."

This is how it looks inside the IBM Cloud Functions editor:

Cloud function code

Of course you can also build and test a cloud function using the CLI. I’ll cover that in another blog post.

Continue reading “How to Invoke an External REST API from a Cloud Function”

How to Send a Fax with and Twilio Fax API

Twilio launched a new API that allows sending faxes. From the very start platform made it very simple to connect to any external REST API. We love Twilio API and have an example and video on how to use the SMS API. The Fax API is as elegant and simple to use. In this blog post you will learn how to send a fax using the Twilio Fax API from a Server Code script.

Create a new Server Code script and copy the following script:

var url = "";
var accountSid = "AC3526fbeed7...............";
var token = "8703513246d3f445e............";
var to = "To number";
var from = "Your Twilio number"
var mediaUrl = "";

var XHRResponse = XHR2.send("POST", url, {
   "body": "To=" + encodeURIComponent(to) + "&From=" + encodeURIComponent(from) + "&MediaUrl="+mediaUrl,
   "headers": {
      Authorization: "Basic " + encodeBase64(accountSid + ":" + token),
      "Content-Type": "application/x-www-form-urlencoded"

Apperyio.response.success(XHRResponse.body, "application/json");

The script is simple and does a POST request to the Twilio Fax API.

Line 1 is the Twilio Fax API endpoint.

Line 2 and 3 are Twilio Account SID and Auth Token. You can get both from the console dashboard.

Line 4 is where to send the fax (number).

Line 5 is your Twilio number.

Line 6 is a link to a document you want to fax. You can set it to any PDF file accessible via a direct link (or use the sample one provided by Twilio).

Line 8 is where the POST request is invoked with all the information.

Twilio Fax API uses Basic Authentication so the Account SID and Auth Token need to be encoded as Base64. There is an out-of-the-box plug-in that you can add to your account. The plug-in has a function to encode a string as Base64.

  1. Open the dropdown list (on the left) and select Back to list.
  2. Open the Plugins tab.
  3. Find the EncodeBase64 plugin and click insert to add it to your account. The plugin will be listed in the Library section. You can now use it in any other script.
  4. One more step is to add this library as a dependency for your script. Open that script you created. Go to Dependencies tab and click on EncodeBase64_Library.

You are ready to test the script.

Go back to the Script tab and open the Run tab (on the right). Click on Save and run button to invoke the API and send the fax.

The response should look like this:

   "date_updated": "2017-04-06T13:13:40Z",
   "date_created": "2017-04-06T13:13:40Z",
   "num_pages": null,
   "api_version": "v1",
   "media_url": null,
   "sid": "FX225bab5034cb8a335c45...............",
   "quality": "fine",
   "duration": null,
   "price_unit": null,
   "price": null,
   "account_sid": "AC3526fbeed7...............",
   "from": "+1415xxxxxxx",
   "to": "+1925xxxxxxx",
   "status": "queued",
   "direction": "outbound"

You can navigate to the URL set in the url attribute – there you will be able to see the status of the sent fax (the browser will ask you to login, use the Account SID and Auth Token values).

It can take a few minutes for the fax to be delivered, keep that in mind when testing. If you fax the pre-set PDF file then yon you will the following fax:

Twilio sample fax

To learn more about Server Code check the YouTube playlist. Happy faxing.

How to Do Multi-Object Update in MongoDB From Server Code

The Database runs on MongoDB database. The following screen shot shows a sample collection (table) with employees in the database.

Screen Shot 2016-04-19 at 5.01.31 PM.png
Custom database collection

You want to update two or more objects in a single request. That’s very simple to do from Server Code. The following server script does multi-object update, it just one line of code:

var result = Collection.multiUpdateObject("367e9e77-cc1f-4c1f...",
    "People", '{"title":"Engineer"}', {"title":"Senior Engineer"});
  • The first argument is the database API key.
  • People is the collection name inside the database.
  • With {“title”:”Engineer”} you are searching for all records where the title is set to “Engineer” and update those objects to a title of “Senior Engineer“.
  • Collection is part of Server Code API that integrates with the database.

That’s it.

After you run the script, the database collection looks like this:

Screen Shot 2016-04-20 at 11.35.22 AM
Collection after the update Server Code provides a very nice integration with the Database that allows you to run and execute advanced app logic.

Learn more about Database and Server Code from many short videos on our YouTube channel.

Learn How to Build a Mobile App Without Writing a Single Line of Code

In this webinar you will learn how to build a complete mobile app without writing a single line of code. This video tutorial covers:

  • Using a plugin that provides the following:
    • Login and registration pages.
    • A page where the signed in user can add any items to the database. The records in the database are only visible to the signed in user.
  • Setting up a database with security.
  • Using Barcode scanner native API.
  • Setting up Push Notifications.
  • Testing the app on the device using the Tester app.

Liked this video and want to learn how to build apps fast? View our recent webinars.

Using Ionic/AngularJS for Rapid Mobile App Development in the Cloud

I will be in Seattle on September 2nd showing how to rapidly build enterprise mobile apps with Ionic, Angular and at the Seattle Mobile Web Apps meetup. Hope to see you there.

Screen Shot 2015-08-14 at 2.40.50 PM App Builder for Ionic


Gone are the days where you can afford to take months to build an enterprise mobile app. In today’s fast market, you need to be able to prototype the app in a few days, release the first version in a few weeks, get feedback, fix bugs, release the second version. Repeat.

In this session you will learn how to rapidly build a mobile app with AngularJS and Ionic connected to cloud APIs using cloud platform.


Wednesday, September 2, 2015, 6:30 PM


4th and Madison Building (4th floor)
925 4th Ave., Seattle, WA (map)


Yes, I want to attend. to Developers: Happy Xmas, the HTML5 vs. Native War Is Over

Great article by Adrian Bridgwater on adding support for Ionic Framework and low code platforms.

While ‘low code’ platforms are often thought to enjoy a lower level of serious interest from the hardcore developer community (yes, even in the face of a popularised visual based coding practices),’s ability to use Apache Cordova and provide access to more native device capabilities is good news, as is the firm’s total combination of software application development tools, backend services (there are plug ins too) and its ability to bring forward template (or you could say ‘predefined’) integration options with other third party services. Did we mention visual data binding too? No – ok, well that’s in there too. The SDK integration here with Ionic may not quite be the one-for-all programming panacea that it is being positioned to be, but Salesforce is a fan and this company is growing in stature. If it can reign in the big claims and keep its code base stable, things could stay interesting.

Read the entire article

What Kind of Apps Can You Build with

One of the most common questions we get asked is “Can I build an app in that does [fill in the blank]”. The answer is usually yes. To understand why it is almost always yes, we should look at the core components in the platform. is a cloud-platform that has two core components. They are:

  • Backend Services
  • App Builder

The Backend Services consist of:

  • Database for storing any app data (this database is in the cloud)
  • Push Notifications for sending push messages to the app
  • Server Code for writing app logic on the server using Javascript

Each service listed above has a console where you manage the service during development. For instance, for database, you can create a new database, create, or edit new collections, create or edit new columns in a collection and so on. This all happens during development time or design time. Backend Services:  Database (development and runtime) Backend Services: Database (development and runtime)

Because of the nature of Backend Services, when you launch your app, the backend that you created also becomes your runtime. It’s the backend that your app uses when it runs.

The App Builder is where you design, build and develop your app. You use the App Builder during development. The App Builder is an IDE (Integrated Development Environment) in the cloud. It is pretty much like your standard/traditional IDE, but now it’s running in the browser (running in the browser has a number of benefits, but that’s for another post). App Builder App Builder (development time)

What technologies are used to build the app? Today App Builder uses the following technologies to build the app:

  • HTML, Javascript, CSS
  • jQuery Mobile
  • Bootstrap, AngularJS
  • Apache Cordova (PhoneGap)
  • Any custom HTML, Javascript (or libraries), CSS

As you build the app using the visual editor, that stuff that gets created/generated is just the stuff listed above. The visual tooling makes it faster and easier to build the app – but under the hood you get pretty standard stuff.

Now, you can always write custom Javascript code if you need to customize a particular feature in your app, or you can add a 3rd party Javascript library. Or you can use CSS to customize or change the look and feel of a particular component on the page.

What kind of app you build – is entirely up to you and up to you requirements. The App Builder simply makes it easier and faster to build the app. You are really only limited by what the above technologies support, and the browser or WebView (for hybrid).

The browser or web view – that’s a key point. That’s where your app runs. It doesn’t run in It runs in the browser when you build HTML5 mobile app, or it runs on the device if it’s a hybrid app (it still inside a special browser called WebView). When it runs in the device as a hybrid app, the app also gets access to native APIs such as the camera via Apache Cordova (PhoneGap).

Can you access the local storage in app? Of course you can, but it’s not because you are using You can access the local storage because you are building an HTML/JS app that runs in the browser (or WebView when hybrid) and you have full access to all the browser built-in APIs. Need to access IndexedDB database? You can do it via the Javascript API that the database provides.

Can app connect to a REST API you just found? Yes, it can. In fact, you can connect to any REST API. App Builder helps you define and bind/map the service during development. But when your app is running, the app simply makes a standard Ajax request to the REST API.

It’s important to understand that your app runs on a device (not in and talks to some API backend. Be it Backend Services, or a 3rd party REST API, or REST API service inside your enterprise.

As you can see, you can build pretty much any app in that you can build with HTML/JS/CSS and PhoneGap. simply makes it faster and easier to build the app.

I hope this answers the question if you can build an app that does [insert feature here]. The answer is (probably) yes :).

Off To Gluecon!

I will be at Glue Conference tomorrow and Thursday.  What is Gluecon? It’s a very nice developer oriented conference (from their website):

Cloud, DevOps, Mobile, APIs, Big Data — all of the converging, important trends in technology today share one thing in common: developers. Developers are the vanguard. Developers are building in the cloud, building mobile applications, utilizing and building APIs, and working with big data. At the end of the day, developers are the core.

I like a small conference atmosphere. A small conference allows to have more conversations, discussions, and networking. If you are at the conference and would like to meet and chat about APIs, mobile development, adding your API plugin into — just ping me.

There are a number of interesting sessions and I’m planning to attend:

  • DevOps vs the Enterprise: What we Can Learn From Mainframe by Mike Baukes, ScriptRock
  • Creating Apps with Beacons, Brian Wilson, Kinvey
  • Death to Cookies, Long Live Tokens – Matias Woloski & Eugenio Pace, Auth0
  • The New Development Experience Mark VanderWiele, IBM
  • 10 Reasons Why Developers Hate Your API (And What to Do About It), John Musser
  • MobileDevOps: Mobile Apps, APIs and DevOps, Alex Gaber, Crittercism
  • Seamless Innovation: A New Cloud Reality for App Development Ramiro Berrelleza, ElasticBox
  • APIs.json and API Discovery on the Web, Steven Willmott and Kin Lane
  • Creating APIs in the Enterprise Sumit Sharma, Mulesoft
  • Flynn: Building the Ideal Developer Platform – Jeff Lindsay, Digital Ocean

View the rest of the agenda.

Hope to see you there.

Creating Mobile App With Google Maps API, Geolocation in [Webinar recording]

This webinar covers:

  • Show one’s location on map
  • Show traffic layer
  • Show route between two cities
  • Show places loaded from database

My code cheat sheet from the webinar.

Register for our next webinar: