<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LaunchAny</title>
	<atom:link href="http://launchany.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://launchany.com</link>
	<description>API Strategy and Design Consulting/Training , Cloud Native and Microservices Architecture Consulting based in Austin, TX</description>
	<lastBuildDate>Wed, 05 Oct 2016 16:07:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.1</generator>
	<item>
		<title>What Skills Do Your APIs Offer?</title>
		<link>http://launchany.com/what-skills-do-your-apis-offer/</link>
		<pubDate>Fri, 01 Apr 2016 01:19:09 +0000</pubDate>
		<dc:creator><![CDATA[James Higginbotham]]></dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[alexa]]></category>
		<category><![CDATA[api design]]></category>
		<category><![CDATA[api documentation]]></category>
		<category><![CDATA[chatbots]]></category>
		<category><![CDATA[technical communication]]></category>
		<category><![CDATA[technical writing]]></category>

		<guid isPermaLink="false">http://launchany.com/?p=1021</guid>
		<description><![CDATA[<p>Much has been written about API design techniques &#8211; from choosing the right HTTP verb to guidance on response code usage and hypermedia dos and don&#8217;ts. We get caught up in the technical details of what our API should look like under the covers, while ignoring the humans that the APIs were designed to help. [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://launchany.com/what-skills-do-your-apis-offer/">What Skills Do Your APIs Offer?</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Much has been written about API design techniques &#8211; from choosing the right HTTP verb to guidance on response code usage and hypermedia dos and don&#8217;ts. We get caught up in the technical details of what our API should look like under the covers, while ignoring the humans that the APIs were designed to help.</p>
<p>We need to remember that APIs exist to help complete a job-to-be-done. Either the job requires the use of the API to start and finish the work, it requires the API for some portion of the work, or the job is to bridge systems and organizations through machine-to-machine communication.</p>
<p>So, how do your API endpoints participate in these jobs? Even better, how do you explain the capabilities of your API endpoints to those less familiar with the technical details of HTTP, GET, and POST? It is time to start communicating about our APIs in a new way. One that supports the human side of APIs. It is time to start talking about our API endpoints as skills.</p>
<h2>What skills do your APIs offer?</h2>
<p>If I were to <a href="http://launchany.com/building-your-api-documentation-strategy-for-success/">look at your API documentation</a> &#8211; from your reference documentation in Swagger (now <a href="https://openapis.org/">OpenAPI</a>) to your getting started guides &#8211; what would I see? Would I see a bunch of content centered around your POSTs, GETs, PUTs, and DELETEs? Or, would I see the skills your API offers to get stuff done?</p>
<p>The worst offenders I have seen are API reference docs that like this:</p>
<p style="padding-left: 30px;">GET /organizations<br />
Description: Get all organizations</p>
<p>No kidding? The GET /organizations endpoint gets a list of all organizations?! Why do we allow ourselves to document our APIs this way? Instead of &#8220;Get all organizations&#8221;, <strong>we need to look for a better ways to communicate and share our API&#8217;s skills with our product team, our company, and our developer ecosystem</strong>.</p>
<h2>Meeting people where they are</h2>
<p>What skills do your APIs offer? Not the GET vs. POST. Not even hypermedia, though I find that aspect interesting for some API use cases. What does it offer to everyone involved?</p>
<p>For us to answer that, we must meet people where they are. What is interesting is that this isn&#8217;t the first time this theme has emerged in my life. For about five years, <a href="http://www.volunteercentered.com/">I wrote and coached</a> individuals on volunteer management. While the topic was related to churches, many of the principles translated to the non-profit sector in general.</p>
<p>I was always asked about how to recruit volunteers, keep them engaged, and ensure that they had a place to land once their season of involvement with the organization was done. My advice generally came down to the following: you need to meet them where they are at, examine the unique skills they bring, and find ways to help them make a difference. Everyone is designed differently. You, as the leader, are required to adapt to their gifts and passions. Not the other way around. Otherwise, volunteers will leave and never come back.</p>
<p><strong>For our APIs to be successful, we have to speak in terms that everyone on the team will understand.</strong> Help them realize their passions and what they want to do. You must adapt to the audience, not the other way around. And your documentation needs to reflect that as well.</p>
<h2>Finding new ways to communicate our API&#8217;s skills</h2>
<p>At this stage of my career, I&#8217;m an API consultant. I love helping teams understand how to align their business, product, and technology choices. My consulting focus is to help teams to think in APIs. I spend a considerable portion of the time teaching teams how to model and design APIs. I see myself as a product architect, helping teams to find what they do best (their capabilities), and find ways to build an API strategy around those capabilities.</p>
<p>Keith and I captured many of these steps in our book, <a href="http://theapidesignbook.com">&#8220;A Practical Approach to API Design&#8221;</a>. In the book and during our <a href="http://launchany.com/api-training/">hands-on workshops</a>, we teach teams how to break down the jobs-to-be-done into steps. We then map those steps into API endpoints. The result is the beginnings of your API design, documentation, and vocabulary for how your API skills will be used &#8211; all centered around the skills of your API.</p>
<p>What we seem to lack is an easy way to map these endpoints and skills into the documentation, typically Swagger. <a href="http://tools.ietf.org/html/draft-amundsen-richardson-foster-alps-01">ALPs</a> may be a solution to this approach as it separates the semantics from the API design. I hope to explore more about this soon.</p>
<p>For now, I am recommending that teams adjust their way of communicating by focusing on API skills first. Begin to orient your discussions around them, so that everyone on the team can participate and understand the conversation at hand. Allow your project managers to understand the impact of a new endpoint by discussing the new skill or capability that it brings to the business. Next, integrate the skills into your documentation to provide better clarity and spark conversations outside of HTTP design details.</p>
<p>Kin Lane has been taking this approach with his <a href="http://kinlane.github.io/university-api-workshop/apis/">university API workshop</a>. He mapped out some Zapier triggers based on the skills or jobs that they perform:</p>
<p><img class="alignnone wp-image-1022" src="http://launchany.com/wp-content/uploads/2016/03/Screenshot-from-2016-03-31-19-15-07.png" alt="Screenshot from 2016-03-31 19-15-07" width="451" height="333" srcset="http://launchany.com/wp-content/uploads/2016/03/Screenshot-from-2016-03-31-19-15-07.png 598w, http://launchany.com/wp-content/uploads/2016/03/Screenshot-from-2016-03-31-19-15-07-300x222.png 300w" sizes="(max-width: 451px) 100vw, 451px" /></p>
<p>Jeff Barr recently posted this tweet of how the AWS API is being used from Alexa to enable VoiceOps:</p>
<blockquote class="twitter-tweet" data-lang="en">
<p dir="ltr" lang="en">VoiceOps is here &#8211; &#8220;Alexa what&#8217;s the instance count?&#8221; <a href="https://t.co/0ZRnyQijyg">https://t.co/0ZRnyQijyg</a> <a href="https://t.co/AcJUcKWp1v">pic.twitter.com/AcJUcKWp1v</a></p>
<p>— Jeff Barr (@jeffbarr) <a href="https://twitter.com/jeffbarr/status/712002188004827136">March 21, 2016</a></p></blockquote>
<p><script src="//platform.twitter.com/widgets.js" async="" charset="utf-8"></script></p>
<p>The interesting thing here is the mapping between the job-to-be-done, the AWS API, and Alexa&#8217;s Skills Kit (ASK) that enables it all to work together. I hope to write more about this soon.</p>
<h2>Educating everyone on your API&#8217;s skills</h2>
<p>Call them skills. Call them activities. Call them capabilities. But let&#8217;s stop discussing our APIs in terms of endpoints made up of URLs and verbs. Instead, let&#8217;s start talking in terms of API skills and mention those URLs and verbs only when we need to be specific about the technical details. When we do this, we can start to educate everyone on the team about how APIs work, why improvements are necessary, and the reason why the product and business should care. Your product team and customers will appreciate it.</p>
<p>Thanks to <a href="http://apievangelist.com/">Kin Lane</a> and <a href="http://www.lorindabrandon.com/">Lorinda Brandon</a> for the additional inspiration on this article.</p>
<p>Photo credit: <a href="http://deaderv23.deviantart.com/art/Skills-Graffiti-doodle-575365572">Skills &#8211; Graffiti doodle by DeaDerV23</a></p>
<p>The post <a rel="nofollow" href="http://launchany.com/what-skills-do-your-apis-offer/">What Skills Do Your APIs Offer?</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Slack, Chatbots, and Voice: At the Intersection of Humans and APIs</title>
		<link>http://launchany.com/slack-chatbots-and-voice-at-the-intersection-of-humans-and-apis/</link>
		<pubDate>Wed, 09 Mar 2016 00:05:55 +0000</pubDate>
		<dc:creator><![CDATA[James Higginbotham]]></dc:creator>
				<category><![CDATA[Product Strategy]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[chatbots]]></category>
		<category><![CDATA[microservices]]></category>
		<category><![CDATA[product architecture]]></category>
		<category><![CDATA[slack]]></category>
		<category><![CDATA[SOA]]></category>

		<guid isPermaLink="false">http://launchany.com/?p=1008</guid>
		<description><![CDATA[<p>Over the last year, we have seen growth in messaging platforms for business. These platforms have changed the way we communicate within and across teams. But why have these platforms succeeded where others have failed to gain the same kind of traction? This article explores the growth of messaging platforms, how APIs and chatbots are changing the way [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://launchany.com/slack-chatbots-and-voice-at-the-intersection-of-humans-and-apis/">Slack, Chatbots, and Voice: At the Intersection of Humans and APIs</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Over the last year, we have seen growth in messaging platforms for business. These platforms have changed the way we communicate within and across teams. But why have these platforms succeeded where others have failed to gain the same kind of traction? This article explores the growth of messaging platforms, how APIs and chatbots are changing the way people interact with software, and what it means for digital transformation as well as the future of application development.</p>
<h2>Chat: Not just for humans</h2>
<p>The previous generation of messaging platforms offered very little in terms of integration solutions. Many focused on connecting humans, but didn&#8217;t extend the platform to allow for automation and integration.</p>
<p>The recent generation of messaging platforms, from <a href="https://www.hipchat.com/">HipChat</a> to <a href="https://slack.com">Slack</a>, expanded their definition of messaging and collaboration to include software outside of the platform. Combined with the abundance of open, web-based APIs, these platforms have taken on a life outside of their original design.</p>
<p>These new products demonstrate what happens when you release the choke hold of a closed software system and embrace the true definition of a software platform. By allowing it to be extended through API integrations for emitting and receiving messages, businesses can change the way they collaborate. Entire business workflows can be viewed and coordinated inside of the messaging platform. And chatbots are leading the way.</p>
<h2>Chatbots as a User Interface</h2>
<p>Chatbots, or bots for short, are agents that can interact with humans to perform a task. The interactions may be simple and follow a pattern-based approach, such as &#8216;Add milk to the shopping list&#8217;. Or, it may be more sophisticated and able to understand human speech and interact in a conversation.</p>
<p>Bots are nothing new. In fact, they have been around for quite some time and used in different settings. The explosion of chatbots is due to several reasons:</p>
<ol>
<li>The rise of messaging platforms, such as Slack and Hipchat</li>
<li>The growth of web-based APIs used for mobile and partner integration</li>
<li>Recent advances in AI, including natural language processing (NLP) and cognitive computing</li>
<li>Application fatigue from the overwhelming number of applications required to keep teams in sync and get jobs done</li>
<li>The growth of mobile devices that extend the reach of applications beyond the desktop</li>
</ol>
<p>Messaging, combined with the power of APIs and chatbots, are changing the way we interact with software. This iteraction is becoming more reactive, contextual, and automated. To fully understand where this is heading, let&#8217;s first revisit where we are today.</p>
<h2>Software Silos</h2>
<p>The traditional view of software applications is that they are built to solve one or more problems that is either common across all kinds of businesses (i.e. horizontal) or for a specific kind of business or process (i.e. vertical).</p>
<p>When we need to look something up, we start the application and perform a search. When we need to enter data or perform a task, we go to the application to get something done.</p>
<h2>The changing landscape of the user interface</h2>
<p>Over the last 30 years, the user interface has changed &#8211; both in how we interact with it and where the interaction occurs. We started in the batch world, where humans had to share the hardware. Hardware became smaller and available for personal use, resulting in command-line and graphical interfaces.</p>
<p>Most recently, mobile devices have gained significant market share. No longer do we have to sit as a computer. The computer now comes with us, and can integrate context, such as location, into application usage. However, we have continued to live in a world of the graphical interface, although applications have become more distributed.</p>
<p>Over time, the user interface has become more disconnected from the source of data, requiring a dependence on the network to do our job. We have seen a huge rise in APIs that are correlated to the rise in mobile computing. This is a result of the user interface moving away from the source of the data.</p>
<h2>Same APIs, different devices</h2>
<p>What hasn&#8217;t happened yet is a change in the way we view applications. <strong>We still go to an application that is built to solve problems for a variety of use cases, contexts, and people. </strong>The application is still pretty generic, all things considered.<strong> </strong>Designers are required to find ways to ensure that the user interface can accommodate the most number of people possible while remaining useful for the experts &#8211; no easy task. This is starting to change, however.</p>
<p>We are now seeing the desire for different interfaces that build upon our network and API-driven world: device-based IoT, voice-command (e.g. Alexa), messaging (Slack with a command-line integration), and agent-based that combines NLP + voice/chat (e.g. Siri, Google Now, and Alexa).</p>
<p>This is breaking the tradition of application interfaces, no longer requiring users to go to a web or mobile interface. Instead, these interfaces are allowing application capabilities to go to where the users are active. And APIs are making it happen.</p>
<h2>Enter: Slack</h2>
<p>Slack has become one of the most popular ways of doing this, likely due to its considerable growth as a team messaging platform. This <a href="http://www.businessinsider.com/slack-growth-after-one-year-2015-2">chart from Business Insider</a> demonstrates their amazing growth:</p>
<div style="max-width: 610px" class="wp-caption alignnone"><a href="http://www.businessinsider.com/slack-growth-after-one-year-2015-2"><img class="" src="https://static-ssl.businessinsider.com/image/54dc4ee369bedd4775ef2753/slack-1year-feb12-2015-dau.gif" alt="Slack's daily active user growth (via BusinessInsider)" width="600" height="400" /></a><p class="wp-caption-text">Slack&#8217;s daily active user growth (via BusinessInsider)</p></div>
<p>While Slack is being used to connect tribes across business boundaries, it is primarily used for  more effective team communication. Separate channels are used by product teams, marketing and sales, and development to collaborate without interrupting others. These channels may be occupied by employees as well as contractors and vendors to expedite communications outside of the organization.</p>
<h2>Chatbots: From Communications to Integrations</h2>
<p>Slash commands bridge the gap between humans and APIs, sending the required data and displaying the response (e.g. obtaining current weather conditions by postal code). Some APIs may require a token or API key to prevent abuse of their service, but often that requires a simple one-time setup. Other slash commands may require an account on an existing application (e.g. a hosted Jira account) for the API to integrate properly with Slack.</p>
<p><img class="alignnone wp-image-1011 size-full" src="http://launchany.com/wp-content/uploads/2016/03/slack-slash-command.png" alt="slack-slash-command" width="717" height="67" srcset="http://launchany.com/wp-content/uploads/2016/03/slack-slash-command.png 717w, http://launchany.com/wp-content/uploads/2016/03/slack-slash-command-300x28.png 300w" sizes="(max-width: 717px) 100vw, 717px" /><img class="alignnone wp-image-1010 size-full" src="http://launchany.com/wp-content/uploads/2016/03/slack-slash-command-result.png" alt="slack-slash-command-result" width="712" height="58" srcset="http://launchany.com/wp-content/uploads/2016/03/slack-slash-command-result.png 712w, http://launchany.com/wp-content/uploads/2016/03/slack-slash-command-result-300x24.png 300w" sizes="(max-width: 712px) 100vw, 712px" /></p>
<p>Slash commands have a specific format or syntax and are best for specific API integrations, often transactional in nature. In the example above, we are using the built-in slash command for adding a reminder. Slash commands don&#8217;t monitor conversations, they simply respond to the given command, validate the input, and take action if the request could be processed.</p>
<p>Slackbots are then used to extend the capabilities of Slack by becoming part of a conversation or discussion channel within Slack. Rather than slash commands, they can listen for specific words or patterns and then participate in the conversation. Where slash commands are proactive and require direct interaction by a human, slackbots often are more reactive by responding to the conversation as it occurs. Below is an example interaction from <a href="https://open.blockspring.com/jtokoph/weather-slack-bot">Blockspring&#8217;s Weather Slack Bot</a>:</p>
<p><a href="https://open.blockspring.com/jtokoph/weather-slack-bot"><img class="alignnone wp-image-1009 size-medium" src="http://launchany.com/wp-content/uploads/2016/03/slack-weather-slackbot-300x121.png" alt="slack-weather-slackbot" width="300" height="121" srcset="http://launchany.com/wp-content/uploads/2016/03/slack-weather-slackbot-300x121.png 300w, http://launchany.com/wp-content/uploads/2016/03/slack-weather-slackbot.png 550w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Notice that there isn&#8217;t a slash command required. Instead, the bot monitors the channel for specific keywords and then attempts to interact with an individual or a channel based on what it sees. This is a simple example, but it demonstrates what is becoming possible. Things like Slackbots are starting to transform the way we interact with software and conduct business. We are now seeing application interaction move closer to where the humans are solving problems.</p>
<h2>Where humans and APIs meet: the job-to-be-done</h2>
<p>It bears repeating:<strong> We are now seeing the early stages of a transition from users going to the application, to applications going to the user.</strong> This is a result of the convergence of several things: Internet-connected devices such as Amazon Echo, conversation platforms such as Slack, and the APIs that extend their capabilities and connect them to external systems. Together, they are allowing user interfaces to meet people where they are getting things done, rather than forcing users to go to the applications to solve their problems.</p>
<p><strong>Applications are most relevant when they meet humans to create and enhance the job-to-be-done. APIs are what make this possible. A</strong>pplications are only relevant to the job they solve. Today, we see this primarily as a web or mobile application solution. Perhaps it is a device that captures data and summarizes it via a web or mobile application (where the mobile application might even run on a smart watch or other connected device).</p>
<p>With the introduction of platforms such as Slack for team messaging, combined with API-based integration for bots and voice interfaces that support command and natural language, things are dramatically changing. We are starting to see the focus shift from building applications to building capabilities via APIs and connecting them to any number of other applications and devices.</p>
<h2>APIs deliver capabilities and context</h2>
<p><strong>If applications are most relevant when they meet humans, then the traditional application boundaries become less important.</strong> This creates a fundamental shift in the way products are viewed and constructed within an organization. Steve Willmott, CEO of <a href="http://www.3scale.net/">3scale</a>, expressed this best in a <a href="https://www.api2cart.com/blog/steven-willmott-interview/">recent interview</a>:</p>
<blockquote><p>I always feel a little conflicted about the idea of the “API as a product”. On the one hand it feel like progress that the API gets serious product management type attention. On the other, it plays into what I think is a fallacy that the API is a “separate” thing from what the company does. I would say in fact that it is not the case that your API is a product, instead that “it is part of THE product”, and specifically part of the “most important products” your company delivers.</p></blockquote>
<p>What are your most important products in your organization? They probably aren&#8217;t applications. <strong>The most important products in your organization are the business and technical capabilities your applications enable people to do that they previously couldn&#8217;t without considerable effort.</strong> These capabilities can be combined into a variety of applications and integrations based on need, resulting in a customized workflow to complete the job. <strong>Rather than viewing applications as a series of use cases and stories with points, applications become the intersection of your capabilities with the capabilities of others into a solution that best meets the needs of your customers.</strong></p>
<p><span style="font-weight: 400;">Believe it or not, your applications are <strong>not important</strong>. The single most important aspect of your organization is the problem you solve better than anyone else. Applications can be copied. APIs will be duplicated. The understanding, expertise, and insight you provide is unique and valuable.</span></p>
<p><span style="font-weight: 400;">Your applications and APIs are just the delivery mechanism. </span></p>
<p><strong>This is the most compelling reason to move toward microservices</strong>, as it extends the agility of an organization beyond application delivery. APIs will emerge from one or more microservices that offer business capabilities, that can then be combined into applications.</p>
<p>When we start to build applications with this mindset, our perception of applications will start to change. <strong>Applications stop becoming a single installable download. Applications as we view them will become the combination of devices, integrations, and bots that collaborate to produce the necessary user interface and experience to meet the need at hand or the job-to-be-done.</strong></p>
<h2>What do companies, product teams, and developers need to do to prepare?</h2>
<p>This is the real opportunity for digital transformation in today&#8217;s business, not just &#8220;going paperless&#8221; or building a few partner APIs. Companies that start to view their business and technical capabilities as part of this new wave of applications, made up of bots, devices, and third-party platforms, stand the most to gain from their digital transformation.</p>
<p>So, what can businesses and product teams do to prepare themselves? Five key things:</p>
<ol>
<li><strong>Companies need to focus on capturing their core business and technical capabilities as services, exposed as internal and external APIs.</strong> We&#8217;ve seen this happening for over 10 years with Amazon, from both their ecommerce and cloud businesses. Now it is time for small and mid-size companies to see their capabilities and unfair advantages as assets as well. Companies must move beyond IT-oriented web services and into capabilities exposed as APIs.</li>
<li><strong>Business leaders must begin a top-down API strategy to expose business and technical capabilities to internal teams, partners, and public developers.</strong> This was Twitter&#8217;s early strategy and it resulted in Twitter apps being built for a variety of mobile platforms and devices that they couldn&#8217;t reach with their limited resources. APIs have the capability to impact the business and product lines &#8211; beyond partner integration. However, it requires buy-in from the CEO-down to be the most effective.</li>
<li><strong>Product teams must reorient their thinking around constructing solutions that are multipliers of their business and technical capabilities.</strong> This means thinking beyond applications and into platform and device integrations that meet customers where they are are facing their problems, from Slackbots to Alexa Skills and beyond.</li>
<li><strong>Product teams should look for ways to extend the reach of their products through voice, bots, and other integrations.</strong> These new channels reach beyond traditional web or mobile applications, opening new opportunities for engaging with customers in a variety of situations.</li>
<li><strong>Development teams must learn to construct solutions from capabilities again, either through microservices, lightweight SOA, or modular monoliths.</strong> It is time to get back to the <a href="http://c2.com/cgi/wiki?MakeItWorkMakeItRightMakeItFast">&#8220;first make it work, then make it right, and, finally, make it fast&#8221; often attributed to Kent Beck</a>. We have no problem with the first step, but often miss the last two, short-changing our product and business agility in the goal of going fast and being agile. Teams that are able to find the balance of knowing when to simply make it work and when to make it right and make it fast will have a distinct advantage.</li>
</ol>
<h2>Where is all of this leading us?</h2>
<p>Over the long term, I believe that applications will become more situational. <strong>In the future, many of the applications we will use may only exist for a limited time, perhaps only for a few months, weeks, days, or even a few hours</strong>. Then we will dispose of them and replace them with something else that is more appropriate to our current set of jobs, workflows, or team collaboration needs. Given the right tooling, development teams would no longer bear the burden of developing situational applications, instead focusing their time and effort on services and solutions critical to the business.</p>
<p>Unfortunately, today applications cannot be discarded today without losing data. Alternatively, if APIs are the center of computing, applications become a personalized integration that combines capabilities to solve transient problems. The API owns the data and capabilities instead of the siloed applications. Product managers start to track customer and developer engagements rather than requested features on a backlog. Businesses are able to unbundle and rebundle their capabilities to innovate and engage customers in new and exciting ways. <strong>We will get there and in less time than you think &#8211; will your company be prepared, or left behind?</strong></p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="http://launchany.com/slack-chatbots-and-voice-at-the-intersection-of-humans-and-apis/">Slack, Chatbots, and Voice: At the Intersection of Humans and APIs</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Avoiding Monolithic Regret</title>
		<link>http://launchany.com/avoiding-monolithic-regret/</link>
		<pubDate>Tue, 01 Mar 2016 06:40:34 +0000</pubDate>
		<dc:creator><![CDATA[James Higginbotham]]></dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[api design]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[microservices]]></category>
		<category><![CDATA[modular software]]></category>
		<category><![CDATA[monoliths]]></category>
		<category><![CDATA[systems design]]></category>

		<guid isPermaLink="false">http://launchany.com/?p=977</guid>
		<description><![CDATA[<p>The last year has seen a considerable spike in the number of articles and discussions around microservices. Many think that a microservice-based architecture is the right answer for their organization, whether they are a startup or a large-scale enterprise. Others are opting for a wait-and-see approach to microservices by first adopting a monolithic architecture. A [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://launchany.com/avoiding-monolithic-regret/">Avoiding Monolithic Regret</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>The last year has seen a considerable spike in the number of articles and discussions around microservices. Many think that a microservice-based architecture is the right answer for their organization, whether they are a startup or a large-scale enterprise. Others are opting for a wait-and-see approach to microservices by first adopting a monolithic architecture.</p>
<p>A microservice architecture provides the opportunity to create smaller, loosely coupled services that focus on doing a small number of tasks well. The benefits to developers include the ability to focus on a smaller codebase, more isolated deployments that can occur more often, and less overall impact to the codebase when updating or replacing microservices as requirements change. The business also benefits by having a more composable business for greater flexibility and agility as new market opportunities emerge.</p>
<p>Whether you choose to build a monolith, or start with a monolith on your way to microservices, the best of intentions could still lead to problems down the road. Let&#8217;s examine how this can happen and how to prevent these kinds of monolith problems.</p>
<h2>What is so wrong about a monolithic architecture?</h2>
<p>Monolithic applications are popular because they are the easiest to construct. All of the code exists within a single codebase. Therefore, the code interacts within the same process, removing the need for network latency and failures common with distributed architectures.</p>
<p>However, teams may experience difficulties with monolithic applications as the codebase grows. Problems such as loss of agility over time, features requiring longer development time, and a fragile codebase. This is what I have termed monolithic regret.</p>
<h2>What causes monolithic regret?</h2>
<p>The majority of teams experience monolithic regret as a result of a lack of clear software architecture and boundaries. This may be the result of limited time, lack of focus, or the heavy dependence on a web framework that doesn&#8217;t encourage proper cohesion and coupling.</p>
<p>Software is the most flexible when we have a strong cohesion and loose coupling. What does this mean?</p>
<p><strong>Strong cohesion</strong> means that code related to the same functionality is grouped together. Code modules that have a strong cohesion promote reuse and prevents code changes from impacting many areas across an entire code base.</p>
<p><strong>Loose coupling</strong> means that the dependency between modules is limited, preventing modules from knowing the internal details about how they are implemented. This is typically accomplished through clear public APIs for a module.</p>
<p>There are several popular web frameworks that make building a monolithic application easy – almost trivial. These frameworks commonly offer accelerated development, code generation, open source plugins/extensions, simplified deployment and the ability to scale out by adding more instances as required to support the current load. The problem is that they encourage poor software architecture unless carefully managed. Below is an example layout of the directory structure for a Ruby on Rails application:</p>
<p><img class="alignnone wp-image-982" src="http://launchany.com/wp-content/uploads/2016/03/framework_vs_modular_source_layout.png" alt="framework_vs_modular_source_layout" width="449" height="192" srcset="http://launchany.com/wp-content/uploads/2016/03/framework_vs_modular_source_layout.png 592w, http://launchany.com/wp-content/uploads/2016/03/framework_vs_modular_source_layout-300x128.png 300w" sizes="(max-width: 449px) 100vw, 449px" /></p>
<p>The problem I have encountered is that the opinionated directory layout and associated boilerplate generators lend themselves to monolithic regret for more complex applications. These frameworks have enabled many developers to leave behind complex frameworks, sparking fun and innovation across a variety of technology and programming language communities. But it has also led to a loss of focus on strong cohesion and loose coupling in our solutions.</p>
<p>Can you get around these sorts of problems with these frameworks? Absolutely. The problem is that these frameworks don&#8217;t <em>default</em> to a modular approach. It requires an awareness of proper software design, but it isn&#8217;t built in by default. There is nothing wrong with this, as long as developers understand the tradeoffs. But for the most part, they either haven&#8217;t understood them or have chosen to ignore them for the lure of short-term development speed over long-term maintainability.</p>
<p>To be clear, I&#8217;m not picking on any of these frameworks or the decision for a monolithic architecture. There is a time and place for both. In fact, I agree with <a href="https://m.signalvnoise.com/the-majestic-monolith-29166d022228#.z8z71rksq">David Heinemeier Hansson (DDH)</a>:</p>
<blockquote><p>&#8220;Run a small team, not a tech behemoth? Embrace the monolith and make it majestic. You Deserve It!&#8221;</p></blockquote>
<p>However, I would encourage teams to be thoughtful about the micro-decisions that they make as their application grows. These small decisions can add up to one big monolithic regret over time.</p>
<p>So, how can we avoid monolithic regret? By applying systems design to the development process to help us identify our module boundaries.</p>
<h2>Designing a modular monolith</h2>
<p>No matter the architectural style you choose, my recommendation for every product company and enterprise I advise is to focus on modularizing their applications. By breaking applications into modules, teams can better minimize the low cohesion that results in fragile codebases and slower development. It will also begin the preparation for a move toward a microservice architecture as your organization grows.</p>
<p>To understand how to modularize our monolith, we must apply systems design techniques. For those not familiar, or perhaps a little rusty, here is a quick review the core concepts of systems design:</p>
<p><strong>Systems design</strong> is the process we use to identify and capture an application’s structure, behavior, and infrastructure. It involves decomposing the application into:</p>
<p><strong>Systems:</strong> This is a completely independent system that provides a solution to one or more problems</p>
<p><strong>Subsystems:</strong> Bounded concerns that help to compose the system itself. Subsystems do not offer a solution on their own, but contribute a bounded portion of it.</p>
<p><strong>Modules:</strong> These are the building blocks for composing subsystems. Modules may contain one or more components, where components are classes in object-oriented programming languages or functions in functional programming languages.</p>
<p><img class="alignnone wp-image-981" src="http://launchany.com/wp-content/uploads/2016/03/systems_design_overview.png" alt="systems_design_overview" width="450" height="174" srcset="http://launchany.com/wp-content/uploads/2016/03/systems_design_overview.png 677w, http://launchany.com/wp-content/uploads/2016/03/systems_design_overview-300x116.png 300w" sizes="(max-width: 450px) 100vw, 450px" /></p>
<p>Notice that you can also have subsystems that are decomposed into other subsystems. This is often the case in more complex solutions. Through the application of system design, we can determine the boundaries of our system and how we want those boundaries to interact.</p>
<h2>How to find subsystem boundaries</h2>
<p>One of the more difficult steps in applying systems design to software is finding the subsystem boundaries. If the boundaries are drawn incorrectly, it can lead to tight coupling between each subsystem and its modules.</p>
<p>My preferred approach is to first model the workflow that the application must support. This involves breaking down the requirements into the activities and steps necessary to accomplish the goals or tasks at hand. Those that have read <a href="http://theapidesignbook.com">the API design book</a> I wrote with Keith Casey will recognize this approach.</p>
<p>By identifying these activities and steps performed by each participant, also known as an actor, we start to see a picture of how these steps are related:</p>
<p><img class="alignnone wp-image-979" src="http://launchany.com/wp-content/uploads/2016/03/workflow_diagram.png" alt="workflow_diagram" width="451" height="338" srcset="http://launchany.com/wp-content/uploads/2016/03/workflow_diagram.png 720w, http://launchany.com/wp-content/uploads/2016/03/workflow_diagram-300x225.png 300w" sizes="(max-width: 451px) 100vw, 451px" /></p>
<p>Once the activities and steps are visualized, you can then start to find the boundaries where different participants are involved. Areas where only one particular party performs related steps form the subsystem boundaries:</p>
<p><img class="alignnone wp-image-980" src="http://launchany.com/wp-content/uploads/2016/03/activity_mapping_to_modules.png" alt="activity_mapping_to_modules" width="451" height="338" srcset="http://launchany.com/wp-content/uploads/2016/03/activity_mapping_to_modules.png 720w, http://launchany.com/wp-content/uploads/2016/03/activity_mapping_to_modules-300x225.png 300w" sizes="(max-width: 451px) 100vw, 451px" /></p>
<p>Each subsystem should then have a well-defined, well-designed API to allow the application to perform the associated activities:</p>
<p><img class="alignnone wp-image-978" src="http://launchany.com/wp-content/uploads/2016/03/systems_design_to_api.png" alt="systems_design_to_api" width="451" height="338" srcset="http://launchany.com/wp-content/uploads/2016/03/systems_design_to_api.png 720w, http://launchany.com/wp-content/uploads/2016/03/systems_design_to_api-300x225.png 300w" sizes="(max-width: 451px) 100vw, 451px" /></p>
<p>Whether you plan to implement your API within a single codebase as a monolith, or eventually decompose your APIs into microservices, this technique will help your subsystems and modules to be highly cohesive internally and loosely coupled between each other.</p>
<h2>A word of caution about module dependencies and the DRY principle</h2>
<p>If you plan on migrating to microservices, then the DRY principle must be used with caution. Dependencies on other modules will make it difficult to later migrate to microservices. Strive to be DRY within your modules and be willing to duplicate behavior across modules for easier migration to microservices in the future.</p>
<h2>Moving toward microservices</h2>
<p>Choosing to take a monolithic approach to your application architecture doesn&#8217;t have to end up in monolithic regret. By applying the proper design work as new features are implemented, your team can better modularize the application codebase. The result will be a more maintainable codebase and a team prepared for migrating to microservices in the future.</p>
<p>Want to learn more? Check out the slide deck below from my talk at the 2015 API Strategy and Practice Conference on designing long-lasting web APIs, where I covered these topics in more detail:</p>
<p><iframe style="border: 1px solid #CCC; border-width: 1px; margin-bottom: 5px; max-width: 100%;" src="//www.slideshare.net/slideshow/embed_code/key/4ywvAUsDAG06id" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen="allowfullscreen"> </iframe></p>
<div style="margin-bottom: 5px;"><strong> <a title="APIs Are Forever - How to Design Long-Lasting APIs" href="//www.slideshare.net/launchany/apis-are-forever-how-to-design-longlasting-apis" target="_blank">APIs Are Forever &#8211; How to Design Long-Lasting APIs</a> </strong> from <strong><a href="//www.slideshare.net/launchany" target="_blank">LaunchAny</a></strong></div>
<p>If you prefer to watch the talk instead, you can view it below:</p>
<p><iframe src="https://www.youtube.com/embed/iBFKMyzEAXM" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<p>The post <a rel="nofollow" href="http://launchany.com/avoiding-monolithic-regret/">Avoiding Monolithic Regret</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Resolving the Frontend/Backend API Design Conflict</title>
		<link>http://launchany.com/resolving-the-frontendbackend-api-design-conflict/</link>
		<comments>http://launchany.com/resolving-the-frontendbackend-api-design-conflict/#comments</comments>
		<pubDate>Wed, 17 Feb 2016 18:34:42 +0000</pubDate>
		<dc:creator><![CDATA[James Higginbotham]]></dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[api design]]></category>
		<category><![CDATA[backend development]]></category>
		<category><![CDATA[BFF pattern]]></category>
		<category><![CDATA[frontend development]]></category>

		<guid isPermaLink="false">http://launchany.com/?p=967</guid>
		<description><![CDATA[<p>As part of my API design consulting engagements, I&#8217;m often called in to resolve the conflict between the API design that the frontend developers would prefer to have and the backend developers want to build. These conflicts can often be a serious distraction and over time can build into bigger issues within the team. So, [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://launchany.com/resolving-the-frontendbackend-api-design-conflict/">Resolving the Frontend/Backend API Design Conflict</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>As part of my API design consulting engagements, I&#8217;m often called in to resolve the conflict between the API design that the frontend developers would prefer to have and the backend developers want to build. These conflicts can often be a serious distraction and over time can build into bigger issues within the team.</p>
<p>So, how can we resolve these conflicts so that both parties have their goals met? Let&#8217;s look at three examples of common API design frontend/backend conflicts, then look for a way to resolve them.</p>
<h2>Example conflict #1: Response payload formatting</h2>
<p>Frontend developers often require the response payload to meet a specific structure to match the screen design. While it would seem straight forward to address the payload formatting requirements in the backend API, several situations may arise:</p>
<ul>
<li>The frontend visualization requires data aggregated in a specific way to reduce the coding effort required to build screen</li>
<li>Teams are migrating existing screens to a new, API-centric architecture and don&#8217;t want to rework 10s to 100s of screens to match the new payload format</li>
</ul>
<p>Watching teams argue about response payload formats is painful. Backend developers want to implement plain JSON, JSON API, HAL, Siren, Hydra, or other formats with the goal of longevity and interoperability. Frontend developers often want formats that make it easier to marshal/unmarshal the payloads for easy rendering. I have been asked to be the tie-breaker in these sorts of conflicts. The difficulty is that no one team is right or wrong &#8211; they both have needs that are equally important.</p>
<p>Hypermedia-driven payloads are especially interesting as the backend API may be designed for mobile consumption through the embedding of related resource summaries. This can lead to a secondary issue of the n+1 query problem as clients are forced to navigate hypermedia links for related resources. Let&#8217;s examine this conflict next.</p>
<h2>Example conflict #2: Performance problems due to n+1 API calls</h2>
<p>You have probably experienced database performance problems from n+1 queries before. The n+1 query problem occurs when applications perform an initial database query, then perform a new database query for each result of the first query. For a query that results in 100 results, the application makes 101 database calls. That is not the most performant way to build a web application.</p>
<p>While the database n+1 query can impact our web application performance by a few hundred milliseconds or so, the impact on APIs is considerably higher due to the addition of network latency. Additionally, there is often considerable work for the API consumer to write the client code to fetch the initial API response, then perform tens to hundreds of follow-up API calls to fetch the additional data and build the necessary data structures to drive a single web or mobile screen.</p>
<p>Key indicators that n+1 API calls is an issue:</p>
<ul>
<li>The target device has limited network bandwidth and requires additional data to be available that isn&#8217;t supplied by the backend API</li>
<li>Developers designed response payloads without summary details for related resources, forcing the API client consumer to resolve the issue themselves</li>
</ul>
<p>Unlike example #1 above, the impact of this issue is not limited to what the frontend developer. Instead, performance issues can be exposed to the customer, resulting in a poor user experience and customer churn.</p>
<h2>Example conflict #3: Database-centric API design</h2>
<p>When teams say that they are using REST for their API, it can pretty much mean anything. From RPC-style APIs, to those building hypermedia REST and everything in between &#8211; API designs can have a variety of different approaches.</p>
<p>One popular approach is to wrap your database with an API. I don&#8217;t recommend this approach, as web-based resources often need to represent a more course-grained view of your system and include workflow affordances for the client.</p>
<p>However, there are times when taking this approach just makes sense or is necessary to meet particular business need. <a href="http://launchany.com/should-you-expose-your-database-directly-using-a-rest-api/">I wrote an article about this some time ago</a>, where I outlined the steps to take if you really need to take this approach &#8211; including how to design a better API in the process. However, a straight CRUD-over-database approach does bring its own kind of conflicts:</p>
<ul>
<li>Tight-coupling to database schema, resulting in a change to the API payload field names when a column is renamed or removed</li>
<li>Lack of higher-level workflow endpoints, forcing multiple API calls to be made to accomplish a goal (similiar to the n+1 issue above)</li>
</ul>
<p>From my experience, this seems to be the most common as APIs are often designed bottom-up from an existing database. Frontend teams must then struggle to map a solution-centric user interface to a storage-centric API design. However, backend developers tend to be unwilling or unable to make the appropriate changes to optimize the API calls required to accomplish the task at hand.</p>
<h2>Conflict resolution through layered API design</h2>
<p>The hope is that our integration between API clients and server will look like the following:</p>
<p><img class="alignnone size-full wp-image-975" src="http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-1.png" alt="BFF-pattern-1" width="395" height="296" srcset="http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-1.png 395w, http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-1-300x225.png 300w" sizes="(max-width: 395px) 100vw, 395px" /></p>
<p>As you may have noticed, this isn&#8217;t always the case. Instead, a few issues may arise that are at the root of this conflict:</p>
<ul>
<li>The frontend team want to reduce the burden of coding by requiring that payloads fit the UI design and limit API calls where appropriate</li>
<li>Backend developers want to optimize the endpoints for both reuse and rapid development</li>
</ul>
<p><img class="alignnone size-full wp-image-974" src="http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-2.png" alt="BFF-pattern-2" width="389" height="321" srcset="http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-2.png 389w, http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-2-300x248.png 300w" sizes="(max-width: 389px) 100vw, 389px" /></p>
<p>To resolve this conflict, we need to find a way to support both parties. A common approach to doing this is by using layered API design. Within the microservices space, this is commonly known as the Backend For Frontend <a href="http://samnewman.io/patterns/architectural/bff/">(BFF) pattern</a>.</p>
<p>The BFF pattern allows the backend API to remain as-is, with a new API constructed and consumed by frontend developers to meet the needs of the UI. There are two primary approaches to use the BFF pattern:</p>
<p><strong>The Application-centered Approach:</strong></p>
<ul>
<li>Driven by use cases by the end user, often workflow related</li>
<li>Traditional backend APIs are viewed as smaller composable endpoints</li>
<li>Use cases are realized by combining these smaller composable endpoints into new APIs</li>
<li>This is similar to traditional SOA or microservices</li>
</ul>
<p><img class="alignnone size-full wp-image-973" src="http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-3.png" alt="BFF-pattern-3" width="390" height="388" srcset="http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-3.png 390w, http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-3-150x150.png 150w, http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-3-300x298.png 300w" sizes="(max-width: 390px) 100vw, 390px" /></p>
<p><strong>The Device-centered Approach:</strong></p>
<ul>
<li>Driven by the device functionality (e.g. mobile app, web)</li>
<li>Encourages the repeating of code across device APIs, adapting payloads and even behavior as necessary</li>
<li>Supports reducing roundtrips for mobile applications that have to handle unreliable networks</li>
</ul>
<p><img class="alignnone size-full wp-image-972" src="http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-4.png" alt="BFF-pattern-4" width="386" height="388" srcset="http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-4.png 386w, http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-4-150x150.png 150w, http://launchany.com/wp-content/uploads/2016/02/BFF-pattern-4-298x300.png 298w" sizes="(max-width: 386px) 100vw, 386px" /></p>
<p>Both approaches support the idea of pushing the orchestration closer to the server tier where the backend APIs resides and network latency is lower. This reduces client network traffic to just one or two API calls to the BFF API, which can be significant for mobile applications.</p>
<h2>Use caution applying the Backend For Frontend (BFF) pattern</h2>
<p>The Backend For Frontend API design pattern is a useful tool for teams to resolve conflict and ensure that APIs solve real world problems. One major downside is that this creates yet another API that needs to be maintained over the life of the application. For larger organizations, this may not be an issue; however, smaller teams may struggle to keep up with the changes to the backend API and one or more frontend APIs.</p>
<p>Another hazard is that these layered APIs are not treated as well as the &#8220;flagship&#8221; platform API. At best, lapses in security, documentation, testing, and design will creep into these APIs, exposing the product to a variety of issues. Worst case, personally identifiable information (PII) may be released without proper authorization, or industry/government regulations may be compromised.</p>
<p>Don&#8217;t take shortcuts when building device or application-centered APIs to address these conflicts. Treat them as API products themselves.</p>
<p>The post <a rel="nofollow" href="http://launchany.com/resolving-the-frontendbackend-api-design-conflict/">Resolving the Frontend/Backend API Design Conflict</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://launchany.com/resolving-the-frontendbackend-api-design-conflict/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lessons From Training 1400+ People in Web API Design</title>
		<link>http://launchany.com/lessons-from-training-1400-people-in-web-api-design/</link>
		<pubDate>Tue, 02 Feb 2016 17:07:18 +0000</pubDate>
		<dc:creator><![CDATA[James Higginbotham]]></dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[api design]]></category>
		<category><![CDATA[api fundamentals]]></category>
		<category><![CDATA[api training]]></category>
		<category><![CDATA[REST APIs]]></category>

		<guid isPermaLink="false">http://launchany.com/?p=965</guid>
		<description><![CDATA[<p>For the last 2 years, Keith Casey and I have been conducted API training workshops with over 1400 participants across nearly a dozen roles. While we are still available for training engagements, we wanted to stop and take an assessment of what we have learned so far. We hope that by sharing these lessons, we will help your [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://launchany.com/lessons-from-training-1400-people-in-web-api-design/">Lessons From Training 1400+ People in Web API Design</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>For the last 2 years, <a href="http://caseysoftware.com/">Keith Casey</a> and I have been conducted <a href="http://launchany.com/api-training/">API training workshops</a> with over 1400 participants across nearly a dozen roles. While we are <a href="http://launchany.com/api-training/">still available for training engagements</a>, we wanted to stop and take an assessment of what we have learned so far. We hope that by sharing these lessons, we will help your teams to become more educated and productive around the understanding and design of APIs.</p>
<h2>Lesson #1: Involve everyone, including product and business</h2>
<p>APIs aren&#8217;t like many of the software development technologies that tend to be hidden away in the implementation details. Instead, they are an architectural concern that requires involvement from a variety of team members beyond developers. As a result, <strong>a variety of different team roles need to be included: developers, QA teams, technical writers, product managers, product marketing, and ScrumMasters</strong>.</p>
<p>While some may argue that any of these team members could attend a developer-centric API training program and learn something, there are often some critical pieces missing when we only focus on developers:</p>
<ul>
<li><strong>QA teams</strong> are often left out of standard training curriculum, leaving teams uncertain about how and when to test web APIs</li>
<li><strong>Technical writers</strong> are left out and are therefore uncertain of what to document, when, and what tools exist</li>
<li><strong>Product managers</strong> miss opportunities to build better business value and increase organization agility using web APIs</li>
<li><strong>Product marketing</strong> may lack clear understanding about developer concerns around web APIs, creating missed marketing opportunities</li>
<li><strong>ScrumMasters</strong> are unable to integrate the varying processes for designing, developing, and deploying great APIs compared to standard product development</li>
</ul>
<p>By building in each of these aspects into your API training program, each member of your product team will better understand and apply the fundamentals of web API design and development.</p>
<h2>Lesson #2: Focus on a product-based approach to APIs</h2>
<p>In the early stages of API adoption, most APIs solve a specific problem and often begin as a bolt-on solution within an existing application. As a result, the API design is specific to the application and difficult to reuse.</p>
<p>Taking a product-based design approach to APIs encourages teams to think beyond a specific application. The result is the company seeing APIs as first-class products rather than integration solutions.</p>
<p><strong>We found that training teams to think in terms of products (external or internal), rather than integration points for applications, opens up teams for those &#8220;AHA!&#8221; moments that differentiate market leaders</strong>.</p>
<h2>Lesson #3: Train for the full API development lifecycle</h2>
<p>During our workshops, <strong>we looked for opportunities to discuss how the various job roles should be involved with API planning, design, development, testing, marketing, and management</strong>. This helps prepare product teams for addressing real world problems, including missing or ambiguous requirements that could result in a poorly designed API.</p>
<p>To accomplish this, we use exercises that are outside of the team&#8217;s domain, resulting in a more focused learning process outside of company politics and problems. For our 2-day workshops, we also conduct a variety of group exercises that simulate API design from requirements, screen mockups, and existing database designs to better prepare teams to design APIs from real world circumstances.</p>
<h2>Lesson #4: Cover the API fundamentals</h2>
<p>The most important step when conducting API training is to get everyone to the same definition of an API. This may seem like an unnecessary step, but it is essential to cover the web API basics. Too many assume everyone in a product team knows what an API is and how they work.</p>
<p><strong>If a single member of your team doesn&#8217;t understand API fundamentals, it can hurt the entire team.</strong> If some of your team members misunderstand some of the concepts, it could cause miscommunication, delaying or fixing your API design and development efforts &#8211; negatively impacting the business.</p>
<p>Also included in our training is an introduction to how HTTP works. <strong>On average, 25% of a class has never seen an HTTP request/response</strong>. Without a foundation in basic HTTP, learning web APIs will be difficult at best. Once they have a solid foundation in the basics of HTTP, examples of APIs will be better understood.</p>
<h2>Lesson #5: Focus heavily on API thinking</h2>
<p>Many API training programs spend a considerable amount of time digging in to the technical details of API design. While we agree that a great API design is essential, we have found that API modeling prior to API design is critical to product-based API thinking.</p>
<p>API modeling is the process of capturing the activities, or jobs-to-be-done, that users and developers will expect from the API. Without this preparation, too much of the focus is on the “how” of the API (i.e. the resources, HTTP verbs, and response codes) and less on the “what” and “why” of the API.</p>
<p><strong>By focusing on API modeling first, everyone on the team can discuss and contribute to the core business needs.</strong> Team-based API modeling, rather than just involving dev leads and architects, is important. It helps to create team ownership of the API, rather than just developer ownership and ensures that <strong>everyone from the team becomes a stakeholder</strong> from inception to production and beyond.</p>
<h2>Lesson #6: Keep code out of training &#8211; at the start</h2>
<p>Refrain from getting too detailed too quickly on the implementation details. This is especially the case when developers build training materials, as they often want to get to the &#8220;show me the code&#8221; phase quickly.</p>
<p>However, we have found success in teaching the fundamentals, business drivers, governance guidelines, and basics of API design to all team members first. By taking this approach, <strong>we help the entire team become more effective at solving problems alongside product and business goals</strong> prior to focusing on code.</p>
<p>This doesn&#8217;t mean that those in the workshop don&#8217;t interact with APIs. Instead, we use tools such as cURL and Postman to interact with APIs. We simply skip the coding step initially.</p>
<p>If a deeper dive is desired by developers, it can be covered in a follow-up workshop tailored for more technical team members. However, leaving programming languages and frameworks out of it prevent developers from adopting bad or default design patterns from frameworks while skipping proper API design-first techniques.</p>
<h2>Lesson #7: Prepare the team for success and follow-up afterward</h2>
<p>Try to allocate a full day to the training when possible, <strong>with the attendees considered &#8220;out of the office&#8221;</strong> and unavailable for email, phone, or instant messaging. This requires scheduling the training during a time when there will be no new product releases or other projects due.</p>
<p>If necessary, <strong>split teams into separate groups to prevent an entire team from being away on the same day</strong>. This may require training across multiple days, but will keep the training on the same week to encourage better understanding as more team members attend the workshop.</p>
<p>Our workshops cover a lot of material in a short period of time, often in 1-2 days. This means that questions will arise. We <strong>make ourselves available via email for follow-up questions, as well as provide a copy of the slide deck and <a href="http://theapidesignbook.com">our book</a></strong> to reinforce the concepts and provide a reference as teams begin their API journey.</p>
<p>The post <a rel="nofollow" href="http://launchany.com/lessons-from-training-1400-people-in-web-api-design/">Lessons From Training 1400+ People in Web API Design</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Building Your API Documentation Strategy For SUCCESS</title>
		<link>http://launchany.com/building-your-api-documentation-strategy-for-success/</link>
		<pubDate>Fri, 22 Jan 2016 14:37:28 +0000</pubDate>
		<dc:creator><![CDATA[James Higginbotham]]></dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[api documentation]]></category>
		<category><![CDATA[API strategy]]></category>
		<category><![CDATA[REST APIs]]></category>
		<category><![CDATA[swagger]]></category>

		<guid isPermaLink="false">http://launchany.com/?p=962</guid>
		<description><![CDATA[<p>So far, we have put together a foundation for our API documentation: 1. We must first move beyond API reference documentation and look for other ways to communicate the value and purpose of your APIs 2. APIs are conversations between client and server. Extending these conversations is important and documentation can help surface opportunities and gaps [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://launchany.com/building-your-api-documentation-strategy-for-success/">Building Your API Documentation Strategy For SUCCESS</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>So far, we have put together a foundation for our API documentation:</p>
<p>1. We must first <a href="http://launchany.com/moving-beyond-api-reference-documentation/">move beyond API reference documentation</a> and look for other ways to communicate the value and purpose of your APIs</p>
<p>2. APIs are conversations between client and server. <a href="http://launchany.com/extending-your-api-conversations/">Extending these conversations is important</a> and documentation can help surface opportunities and gaps in the conversation</p>
<p>3. As we write our API documentation, we need to ensure that it <a href="http://launchany.com/10-questions-your-api-document-must-answer/">addresses the 10 questions developers and decision makers will ask</a> before, during, and after API adoption</p>
<p>With this foundation, our next step is to define an overall API documentation strategy. This strategy will unify your API design and documentation, causing them to work together to produce a better developer experience. At the same time, it will address any questions key decision makers may have along the way.</p>
<h1>An approach to API Documentation Strategy SUCCESS</h1>
<p>To make it easier to remember, I have defined a simple acrostic as a simple way to help define a complete strategy: SUCCESS.</p>
<h2>(S)olution-focused</h2>
<p>Your API documentation strategy must first be solution-focused. If your API and related documentation does not help developers and users solve problems, then you will struggle to gain adoption.</p>
<p>A solution-focused strategy means consistently finding ways to:</p>
<p><strong>Explain the benefits that your API provides.</strong> For example: saving time, reducing expenses, increasing revenue, and/or improving collaboration. To find your API&#8217;s benefits, ask how the lives of your developers and their customers/end users have improved as a result of your API. Your documentation&#8217;s role is to keep these benefits in mind and always challenge the API design when it doesn&#8217;t meet or exceed these expectations.</p>
<p>Once the benefits are clear, <strong>the documentation must guide developers on how to perform the various activities to be done</strong> to achieve these benefits. This is sometimes referred to as the <a href="http://www.christenseninstitute.org/key-concepts/jobs-to-be-done/" target="_blank">jobs-to-be-done</a>, which focuses on seeking to produce an outcome rather than focusing on the product itself. Once we understand the outcome, then we can support the necessary activities to get there.</p>
<h2>(U)nified Understanding</h2>
<p>There is nothing more frustrating then encountering an API that at first appears to solve a problem, only to realize that their product isn&#8217;t a fit because their definition of the problem or assumed domain concepts don&#8217;t match to your specific needs.</p>
<p>As technical writers, we must strive to be clear about the concepts our API supports (and doesn&#8217;t support). I encourage teams to define their domain concepts up-front. Otherwise, one person&#8217;s concept of a &#8216;project&#8217; is another person&#8217;s concept of a &#8216;team&#8217; or a &#8216;task&#8217;. Be clear, define everything up-front, and reference it consistently throughout your documentation.</p>
<p>On a side note, most web APIs expose resources that are named based on either the underlying domain model or database structures. When you surface these names without first defining your API&#8217;s conceptual model, confusion will likely occur. This may be the result of misunderstanding by developers, or something as simple as marketing terms creeping into the names of your resources, confusing developers on the meaning of resources. Be clear, define your concepts, and address areas that your API isn&#8217;t intended to solve.</p>
<h2>(C)omprehensive</h2>
<p>We covered this in <a href="http://launchany.com/moving-beyond-api-reference-documentation/" target="_blank">a previous post</a>, so I&#8217;ll simply summarize it here:</p>
<p><strong>Provide an overview of the API</strong>, addressing concerns such as benefits, concepts, capabilities, and pricing of your API to qualify prospects. Also, make your API discoverable so that it can be found outside your website.</p>
<p><strong>Case studies</strong> highlight applications that have been built using your API. Provide <strong>examples and reference applications</strong> to demonstrate some of your API’s capabilities.</p>
<p><strong>Provide a reference documentation for each API endpoint</strong> to developers, including details on the URL, HTTP verb(s) supported, response codes, and data formats. Developers use this documentation when starting to consume API endpoints.</p>
<p><strong>Guides offer help with learning an API</strong>, including its concepts and vocabulary during this critical stage. They also provide step-by-step guides for implementing common use cases.</p>
<p><strong>Help pages and FAQs</strong> can guide new and experienced developers toward a better understanding of your API and proper usage patterns.</p>
<p><strong>Create internal documentation</strong> to help your support team when developers get stuck. These assets may eventually become public documentation over time.</p>
<h2>(C)ollaborative</h2>
<p>APIs are, by their very nature, collaborative. Developers inside and outside of your organization are using something you have built and shared. This means that it is important to find ways to allow your documentation to include community ownership.</p>
<p>One way to accomplish this is by hosting your documentation on Github or other sites that allow for community improvement. We also suggest monitoring for posts and stories that document how someone used your API or struggled with your API, as these will provide greater insights into usage patterns and problems.</p>
<p>Finally, something that is often missed is promoting the products that are using your API. Share what others are doing with your API on your website by capturing case studies (with their permission, of course). This helps them to gain recognition for innovating on your API and helps website visitors know that your customers are experiencing successes with your API.</p>
<h2>(E)ngaging</h2>
<p>Many of us are familiar with API reference documentation tools, such as Swagger, that offer interactive documentation. This nice-to-have feature is quickly becoming a required feature in documentation today. Beyond this, however, lies a whole other opportunity for expanding your documentation to engage all types of audiences:</p>
<ul>
<li><strong>Demos for interacting with your API</strong> to perform a task or see it in action</li>
<li><strong>Videos for demonstrating API capabilities</strong> and value to non-technical decision makers</li>
<li><strong>Tools such as Postman</strong> that allow for <a href="https://www.getpostman.com/docs/collections">collections of API requests</a> with sample payloads to be exported and shared with developers to accelerate learning</li>
<li><strong>Drip email campaigns</strong>, driven by the developer onboarding lifecycle and metrics, to teach developers how to use the API for better results or help them overcome problems</li>
</ul>
<h2>(S)trategic</h2>
<p>While API documentation should be focused toward external problems, it can also help drive your internal strategy. This includes marketing and sales, which will better resonate if it aligns with your API concepts and solutions. API documentation can also drive search engine optimization (SEO) for organic growth.</p>
<p>API documentation may also drive key performance metrics, specifically customer acquisition costs (CAC) and customer lifetime value (LTV). A well-executed documentation strategy will decrease the customer acquisition costs (CAC), as it will require less sales and support staff to close and onboard the customer. It will also increase customer lifetime value (LTV), as you will be able to increase retention and reduce customer churn.</p>
<p>Don&#8217;t overlook your API documentation strategy when defining and tracking your API metrics. It can have a positive impact on your overall product strategy.</p>
<h2>(S)ustainable</h2>
<p>The final part of your API documentation strategy is sustainability. It is important to select the right tools that the team will use to keep the documentation fresh and up-to-date with the latest API changes.</p>
<p>Tool selection should match the technical skills available on the team. For example, if you have team members aren&#8217;t comfortable with Github, then you may have to invest time training them or select something else that is a better fit, such as WordPress. Whatever you select, it should have minimal friction to encourage updates from team members.</p>
<p>Sustainable documentation is important as code deliverables &#8211; perhaps more so, as without current documentation, no one will know how to best use your API.</p>
<p>The post <a rel="nofollow" href="http://launchany.com/building-your-api-documentation-strategy-for-success/">Building Your API Documentation Strategy For SUCCESS</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></content:encoded>
			</item>
		<item>
		<title>10 Questions Your API Documentation Must Answer</title>
		<link>http://launchany.com/10-questions-your-api-document-must-answer/</link>
		<pubDate>Tue, 12 Jan 2016 16:01:47 +0000</pubDate>
		<dc:creator><![CDATA[James Higginbotham]]></dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[api design]]></category>
		<category><![CDATA[api documentation]]></category>
		<category><![CDATA[api product management]]></category>

		<guid isPermaLink="false">http://launchany.com/?p=957</guid>
		<description><![CDATA[<p>Effective communication is the most important factor for API success. APIs do not have a user interface, so your documentation is the primary communication method for developers to interact with your API. As my API training partner Keith Casey states, &#8220;Documentation is the third user interface for APIs, and the most important&#8221;. Your API Documentation [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://launchany.com/10-questions-your-api-document-must-answer/">10 Questions Your API Documentation Must Answer</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Effective communication is the most important factor for API success. APIs do not have a user interface, so your documentation is the primary communication method for developers to interact with your API. As my API training partner Keith Casey states, <a href="http://clarify.io/blog/every-api-company-has-three-user-interfaces/" target="_blank">&#8220;Documentation is the third user interface for APIs, and the most important&#8221;</a>.</p>
<h2>Your API Documentation Must Be Comprehensive</h2>
<p>As previously discussed, our API documentation needs to <a href="/moving-beyond-api-reference-documentation/">move beyond API reference documentation</a> and into all aspects of the API lifecycle. Unlike the typical SaaS-based product, however, your documentation has to target a variety of audiences, from the key decision makers to the developers ultimately integrating with it. There is no guarantee which type of audience member will encounter your API first, so your documentation effort needs to be comprehensive.</p>
<h2>Your API Documentation Must Answer 10 Key Questions</h2>
<p>To start your API documentation journey, it helps to focus on the questions that your audience members will ask. From the first time they encounter your API, to their initial &#8216;hello world app&#8217; and beyond, the questions they will be asking are wide ranging. Being able to answer these questions will help your audience better understand what problems your API solves, engage with their first integration, and address their concerns as they consider formally adopting your API.</p>
<h2>Question #1: Do you have an API?</h2>
<p>Just because you live-and-breathe your API doesn&#8217;t mean others know you have one. Your corporate website and marketing materials are key entry points for those that may not know you offer an API. Be explicit about offering the API, as API-based products are still a new concept to many that will assume your product is a SaaS instead. Your documentation should call attention to your API offering, detail the problems it solves, and link to your developer portal.</p>
<p>Also, remember that if your developer portal is doing its job regarding search engine optimization (SEO), then non-developers may happen upon your developer portal as well. So, offer ways to get back to the overview for your product for those not as familiar with APIs. Or better yet, help them learn a little more about your product offerings and API at the same time.</p>
<h2>Question #2: What can I do (and not do) with your API?</h2>
<p>Once your audience begins to explore your API, they need to know what it does (and doesn&#8217;t do). Start with the problems your API aims to solve first, then move on to the features of your API that solve those problems.</p>
<p>By focusing on the problems and resulting solutions, you focus on the need rather than specific API endpoints. This is often accomplished through: getting started guides, integration/solution guides, and reference applications &#8211; all scattered with lots of easy-to-read code examples that can be used as a launching point once development begins.</p>
<p>No one will care about your beautifully designed API if they don&#8217;t know what kind of problems you can solve for them. Both decision makers and developers are trying to solve problems, not add more API integrations to their codebase. Find the problems, offer a solution, and then detail some of the nice features of your API to reinforce your API value.</p>
<h2>Question #3: Does your API fit my company&#8217;s needs?</h2>
<p>Once you establish the kinds of problems your API addresses, the next step is to make sure your API aligns with their specific needs and identity. Part of offering an API product is positioning your product so that it is seen as the right solution *for them*.</p>
<p>By offering use cases, case studies, and example applications, your product is easily aligned with the kinds of customer segments that you want to attract (and as a result you focus less on other segments). These documentation assets also builds trust as customers begin to see similar companies as themselves, causing them to picture themselves solving similar problems.</p>
<h2>Question #4: How much does it cost?</h2>
<p>Ultimately, price is going to become a factor. If they get this far, they have at least spent time vetting your API solution and now want to know if it will meet their budget. Be up-front with your pricing. Don&#8217;t hide your pricing behind a &#8220;Call us&#8221; link. This doesn&#8217;t mean that you can&#8217;t offer an enterprise license that requires a phone call, however.</p>
<p>At a minimum, provide enough pricing information to help them understand your pricing model (e.g. subscription, per transaction), subscription tiers (e.g. free, solo, team, enterprise), and what kind of support is available for each tier (e.g. forums, email, 48 hour phone, 24 hour phone, 4 hour phone). Being up-front with your pricing helps those conducting research and prevents them from removing you from their short list due to your more closed pricing approach.</p>
<h2>Question #5: How does your API view my world?</h2>
<p>Every API approaches a solution to a problem in a different way. The API carries with it a specific view of the world: what accounts mean, the kinds of workflows supported, and the type of data considered important.</p>
<p>As an example, let&#8217;s consider three popular project management APIs: <a href="https://github.com/basecamp/bcx-api">Basecamp</a>, <a href="https://developers.trello.com/apis">Trello</a>, and <a href="https://help.rallydev.com/for-developers">Rally</a>. Each one has different views on how projects should be organized, how tasks should be created, and how they are marked as completed. Depending on how your organization prefers to manage projects will determine which solution is the best fit for you.</p>
<p>Therefore, it is important to document your API concepts, resources, data structures, and field types. Doing so will provide greater insight into how your API views the world and the solution to the problems your audience faces. While some view API reference documentation as the place to do that, I often recommend using Markdown or HTML-based introductory guides to capture concepts, common vocabulary, and high-level resource definitions. When sprinkled with anchor tags for deep linking, your API reference documentation can link to the specific concepts useful for the specific resource/endpoint being viewed.</p>
<h2>Question #6: How do you secure your API?</h2>
<p>Security of your API is important, particularly with the API <a href="http://money.cnn.com/2015/05/13/technology/hackers-starbucks-app/">security</a> <a href="http://www.zdnet.com/article/researchers-publish-snapchat-code-allowing-phone-number-matching-after-exploit-disclosures-ignored">stories</a> <a href="http://www.theverge.com/2015/3/25/8277743/tinder-hack-bros-swiping-bros">recently</a> in the news. Too often, however, security is an afterthought when building APIs. Nearly every API will provide access to sensitive data, internal business systems, or share user data. Up-front security considerations prevent last-minute API design changes that make the API more difficult to use.</p>
<p>Your documentation should provide details on how your API handles authentication, authorization, and data security (both security in motion and security at rest). This will reenforce your product&#8217;s dedication to a professional, production quality service that will stand out against competitors.</p>
<h2>Question #7: How long will it take to get started?</h2>
<p>While many modern web APIs offer self-service onboarding, not every API does. If your API does offer self-service onboarding, call this out in your documentation as a benefit to getting started faster. For those that require time to go through a partnership program, include this in your documentation as well. This will ensure that the appropriate lead time is factored in prior to developers beginning the first &#8216;hello world&#8217; integration.</p>
<p>It is also a good idea to point to example applications that have been built with a variety of programming languages, as a way to get started quickly. We recommend using <a href="https://Github.com">Github</a> or other public source code repository, so that developers can quickly clone your examples, configure their API key or OAuth token, and try out your API.</p>
<h2>Question #8: Do you offer helper libraries/SDKs?</h2>
<p>Not all developers want to code the HTTP client from scratch. This is particularly the case for developers that are new to web API integration, or for those that prefer to use their IDE and code completion to get their job done faster. If you offer SDKs, reference them in your documentation as well as in code examples. <a href="https://stripe.com/docs/api/ruby">Stripe&#8217;s API documentation</a> is a great example of integrating examples in multiple programming languages into their documentation.</p>
<h2>Question #9: What API endpoints and event integrations does your API offer?</h2>
<p>You will notice that we are nearing the end of our questions and only now getting to API reference documentation. <a href="/moving-beyond-api-reference-documentation/">Reference documentation is only one part</a> of a complete API documentation strategy, even though it is an important one.</p>
<p>Your API reference documentation should list all of the available API endpoints, including details about data structures, success/error status codes returned, and request/response payload formats. Keep in mind that this reference documentation must be thorough and complete, as external developers will not have access to your source code, internal diagrams, or private documentation.</p>
<p>Remember that not all API integrations are one-way communication patterns. Find ways to offer <a href="/extending-your-api-conversations/">a complete API conversation</a>, allowing your API clients to make API requests when needed (&#8220;asking&#8221;) and be informed of specific server-side events (&#8220;telling&#8221;). Whether you decide to use Webhooks, Websockets, or SSE, find ways to extend your API design beyond the simple request/response design. Then, offer documentation about these integration options to show how developers can extend the typical integration scenarios with more robust options.</p>
<h2>Question #10: Why am I getting this error code or unexpected response?</h2>
<p>Once developers start to work with your API, they will likely encounter unexpected errors. Offer support docs with FAQs, troubleshooting guides, and developer support to help them overcome these issues and be successful. Documentation that consists of getting started guides only should be considered incomplete.</p>
<h2>(Bonus) Question #11: What do I do if I&#8217;m not a programmer?</h2>
<p>Not all visitors to your API product page will be developers. For those that aren&#8217;t, show them ways to use your APIs via tools such as <a href="https://zapier.com/">Zapier</a>/<a href="https://ifttt.com/">IFTTT</a>, a third-party solutions marketplace, or an integration partners page. Even better, give them a demonstration of your API through a simple web or mobile app to spark their imagination and get them to take action.</p>
<p>The post <a rel="nofollow" href="http://launchany.com/10-questions-your-api-document-must-answer/">10 Questions Your API Documentation Must Answer</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Improving Your API Conversations with Hypermedia, ETags, and Real-Time APIs</title>
		<link>http://launchany.com/extending-your-api-conversations/</link>
		<pubDate>Tue, 05 Jan 2016 13:16:21 +0000</pubDate>
		<dc:creator><![CDATA[James Higginbotham]]></dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[api architecture]]></category>
		<category><![CDATA[api design]]></category>
		<category><![CDATA[hypermedia]]></category>
		<category><![CDATA[real-time apis]]></category>

		<guid isPermaLink="false">http://launchany.com/?p=934</guid>
		<description><![CDATA[<p>There is considerable source material on great API design. We can read discussions on how to use HTTP properly, from selecting the proper HTTP verb to which response code(s) are appropriate to return based on the success or failure of the request. These are all important things to consider when designing a great API. As API providers [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://launchany.com/extending-your-api-conversations/">Improving Your API Conversations with Hypermedia, ETags, and Real-Time APIs</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>There is considerable source material on great API design. We can read discussions on how to use HTTP properly, from selecting the proper HTTP verb to which response code(s) are appropriate to return based on the success or failure of the request. These are all important things to consider when designing a great API.</p>
<p>As API providers and designers, we can forget what it is like to consume APIs as we get so busy building them. So, let&#8217;s revisit our API design from the client view of the API conversation to see how we can make it even better.</p>
<h2>How API clients see our API design today</h2>
<p>APIs tell a story. Part of that story is the conversation that is exchanged between the API client and server. It often goes something like this:</p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv1.png"><img class="aligncenter wp-image-935 size-medium" src="http://launchany.com/wp-content/uploads/2015/12/conv1-300x171.png" alt="API Conversation: GET /projects" width="300" height="171" srcset="http://launchany.com/wp-content/uploads/2015/12/conv1-300x171.png 300w, http://launchany.com/wp-content/uploads/2015/12/conv1.png 373w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv2.png"><img class="aligncenter wp-image-936 size-medium" src="http://launchany.com/wp-content/uploads/2015/12/conv2-300x171.png" alt="API Conversation: POST /projects" width="300" height="171" srcset="http://launchany.com/wp-content/uploads/2015/12/conv2-300x171.png 300w, http://launchany.com/wp-content/uploads/2015/12/conv2.png 375w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv3.png"><img class="aligncenter wp-image-937 size-medium" src="http://launchany.com/wp-content/uploads/2015/12/conv3-300x210.png" alt="API Conversation: GET /projects/12345" width="300" height="210" srcset="http://launchany.com/wp-content/uploads/2015/12/conv3-300x210.png 300w, http://launchany.com/wp-content/uploads/2015/12/conv3.png 371w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>The problem is that <strong>we often add in update and delete support, then stop the design effort</strong>. Our API is not much of a conversationalist, is it? We need to look for ways to extend the conversation our API clients can have with our API. Let&#8217;s examine a few ways we can do this.</p>
<h2>Extending the API client conversation with hypermedia</h2>
<p>One consideration may be to add hypermedia constraints to your API. This moves the focus <strong>from a content-only design to a context-centric design</strong>. Our API can now tell our client what is possible (and what isn&#8217;t) based on the current state of the system, perhaps combined with the caller&#8217;s permissions of what their role allows them to perform (sometimes called entitlements).</p>
<p>The conversation starts to get a lot more interesting when we add hypermedia. For example:</p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv4.png"><img class="aligncenter wp-image-939" src="http://launchany.com/wp-content/uploads/2015/12/conv4.png" alt="API Conversation: GET /projects (with Hypermedia)" width="300" height="479" srcset="http://launchany.com/wp-content/uploads/2015/12/conv4.png 369w, http://launchany.com/wp-content/uploads/2015/12/conv4-188x300.png 188w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>So, now our client is interacting with the server using a hypermedia API. It is able to better understand both the state and actions available, along with links to related resources. <strong>The client can now present its user interface, showing or hiding links and buttons as appropriate based on the hypermedia links present (or absent).</strong></p>
<p>Another advantage of hypermedia is that it can prevent the need to push out new versions of the app to our app stores when minor changes to business logic are made on the server. Our application is now a little more resilient to changes in server-side logic and our client will immediately reflect those changes if behavior is driven from the hypermedia links. Perhaps the client is a universal client that knows how to talk to any kind of hypermedia API (we can dream, can we?).</p>
<h2>Extending the API client conversation with concurrency control</h2>
<p>But what about when something changes on the server side? How will we know and ensure that we are kept in sync?</p>
<p>A common solution to this problem is to add API support for ETags and the If-None-Match header, pushing the business rules that determine when a resource has changed to the server rather than the client.</p>
<p>For those not familiar, an ETag is an opaque identifer for a specific version of a resource at a specific URL. They are often, but not always, represented as one of the following: the hash of the resource state, the last modified timestamp, or a version number. An ETag is sent back to the client when a resource representation is sent to the client. The client may then use the ETag to perform actions on the resource, but only if the ETag matches (or doesn&#8217;t match if that is the desired behavior).</p>
<p>Now when we are retrieving a resource representation, the API client will receive an ETag as well:</p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv5.png"><img class="aligncenter wp-image-941" src="http://launchany.com/wp-content/uploads/2015/12/conv5.png" alt="API Conversation: GET /projects (with ETag returned)" width="300" height="379" srcset="http://launchany.com/wp-content/uploads/2015/12/conv5.png 373w, http://launchany.com/wp-content/uploads/2015/12/conv5-238x300.png 238w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>The client can then ask to update a resource <em>only if the resource hasn&#8217;t changed since it was last retrieved</em>:</p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv6.png"><img class="aligncenter wp-image-943 size-medium" src="http://launchany.com/wp-content/uploads/2015/12/conv6-300x250.png" alt="API Conversation: PUT /projects (with ETag and If-Not-Modified)" width="300" height="250" srcset="http://launchany.com/wp-content/uploads/2015/12/conv6-300x250.png 300w, http://launchany.com/wp-content/uploads/2015/12/conv6.png 372w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>It also prevents overwriting resources that have changed underneath us by forcing our requests to match a specific resource ETag/version:</p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv6-error-path.png"><img class="aligncenter wp-image-944 size-medium" src="http://launchany.com/wp-content/uploads/2015/12/conv6-error-path-300x285.png" alt="API Conversation: GET /projects (with ETag and If-Not_Modified resulting in error)" width="300" height="285" srcset="http://launchany.com/wp-content/uploads/2015/12/conv6-error-path-300x285.png 300w, http://launchany.com/wp-content/uploads/2015/12/conv6-error-path.png 371w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>This will save our clients lots of problems and ensure our server-side state remains consistent.</p>
<h2>Extending the API client conversation with cache support</h2>
<p>Sometimes our clients need to know if a resource representation has changed on the server side to prevent displaying or working with stale data. Currently, our API design would require our client to retrieve the most recent representation every time, whether it has changed or not. The client is responsible for trying to figure out if the resource has changed by comparing it to a previously stored representation, or by completely replacing any previously stored version. <strong>However, the client doesn&#8217;t know the business rules that indicate a resource has changed (and shouldn&#8217;t have to know) .</strong> We need a way to allow the API server to inform the client if a resource has changed since it was last retrieved.</p>
<p>To achieve this, most API clients will occasionally check for resource changes using the ETag approach described above. The conversation may go something like this:</p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv5.png"><img class="aligncenter wp-image-941" src="http://launchany.com/wp-content/uploads/2015/12/conv5.png" alt="API Conversation: GET /projects (with ETag returned)" width="300" height="379" srcset="http://launchany.com/wp-content/uploads/2015/12/conv5.png 373w, http://launchany.com/wp-content/uploads/2015/12/conv5-238x300.png 238w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv8-part1.png"><img class="aligncenter wp-image-947 size-medium" src="http://launchany.com/wp-content/uploads/2015/12/conv8-part1-300x243.png" alt="API Conversation: GET /projects (with ETags)" width="300" height="243" srcset="http://launchany.com/wp-content/uploads/2015/12/conv8-part1-300x243.png 300w, http://launchany.com/wp-content/uploads/2015/12/conv8-part1.png 377w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv8-part2.png"><img class="aligncenter wp-image-948 size-medium" src="http://launchany.com/wp-content/uploads/2015/12/conv8-part2-300x217.png" alt="API Conversation: GET /projects (with ETags)" width="300" height="217" srcset="http://launchany.com/wp-content/uploads/2015/12/conv8-part2-300x217.png 300w, http://launchany.com/wp-content/uploads/2015/12/conv8-part2.png 373w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>&nbsp;</p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv8-part2.png"><img class="aligncenter wp-image-948 size-medium" src="http://launchany.com/wp-content/uploads/2015/12/conv8-part2-300x217.png" alt="API Conversation: GET /projects (with ETags)" width="300" height="217" srcset="http://launchany.com/wp-content/uploads/2015/12/conv8-part2-300x217.png 300w, http://launchany.com/wp-content/uploads/2015/12/conv8-part2.png 373w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv8-part3.png"><img class="aligncenter wp-image-949 size-medium" src="http://launchany.com/wp-content/uploads/2015/12/conv8-part3-300x222.png" alt="API Conversation: GET /projects (with ETags)" width="300" height="222" srcset="http://launchany.com/wp-content/uploads/2015/12/conv8-part3-300x222.png 300w, http://launchany.com/wp-content/uploads/2015/12/conv8-part3.png 376w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>This kind of loop has to be executed for every resource you want to monitor, which may be in the hundreds of resources. That&#8217;s a lot of conversations and work for the API client.</p>
<p>Instead, some APIs may offer an optimized solution, providing a specific endpoint to poll and receive any changes across a resource collection:</p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv9.png"><img class="aligncenter wp-image-950 size-medium" src="http://launchany.com/wp-content/uploads/2015/12/conv9-300x194.png" alt="API Conversation: PUT /projects (with ETag and If-Not-Modified header)" width="300" height="194" srcset="http://launchany.com/wp-content/uploads/2015/12/conv9-300x194.png 300w, http://launchany.com/wp-content/uploads/2015/12/conv9.png 375w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Now our API client can be informed when one or more resource representations have changed and refresh its local data to reflect those changes.</p>
<h2></h2>
<p>You may be thinking that polling an API seems like a clunky approach to keep client data up-to-date &#8211; you would be correct. We can solve this design problem by adding support for server-originated conversations.</p>
<h2>Extending the API client conversation with real-time API messaging</h2>
<p>Real-time API messaging changes the conversation dynamic from one-way (client-initiated) to two-way. The client doesn&#8217;t have to be the initiating party in this conversation. Instead, the server can start the conversation when it becomes aware of an internal state change. This means that we can start to have conversations like the following:</p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/conv10.png"><img class="aligncenter wp-image-951" src="http://launchany.com/wp-content/uploads/2015/12/conv10.png" alt="API Conversation: Server-originated event using real-time messaging" width="300" height="449" srcset="http://launchany.com/wp-content/uploads/2015/12/conv10.png 372w, http://launchany.com/wp-content/uploads/2015/12/conv10-200x300.png 200w" sizes="(max-width: 300px) 100vw, 300px" /></a></p>
<p>Now, clients can respond to change by allowing servers to initiate communication. Whether you decide to use <a href="http://en.wikipedia.org/wiki/Webhook">Webhooks</a> or <a href="http://en.wikipedia.org/wiki/WebSocket">WebSockets</a>, opening up your API to two-way communication enables the creation of collaborative API integrations.</p>
<h2>Moving the API design discussion forward</h2>
<p>Many of our API design discussions today are focused on applying proper HTTP principles. There is nothing wrong with this and it is an important step in the API design process. However, by focusing only on a data-centric request-response design style, we are missing a great opportunity.</p>
<p>Instead, we should strive to design our APIs to change the entire conversation that is taking place with our API clients. These new conversations afford clients the opportunity to fully collaborate in conversations between the server. This includes support for real-time API messaging to allow APIs to engage in rich conversations with our API clients.</p>
<p>The post <a rel="nofollow" href="http://launchany.com/extending-your-api-conversations/">Improving Your API Conversations with Hypermedia, ETags, and Real-Time APIs</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Moving Beyond API Reference Documentation</title>
		<link>http://launchany.com/moving-beyond-api-reference-documentation/</link>
		<comments>http://launchany.com/moving-beyond-api-reference-documentation/#comments</comments>
		<pubDate>Tue, 08 Dec 2015 13:35:10 +0000</pubDate>
		<dc:creator><![CDATA[James Higginbotham]]></dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[api design]]></category>
		<category><![CDATA[api documentation]]></category>
		<category><![CDATA[blueprint docs]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[oadf]]></category>
		<category><![CDATA[raml]]></category>
		<category><![CDATA[swagger]]></category>

		<guid isPermaLink="false">http://launchany.com/?p=913</guid>
		<description><![CDATA[<p>&#8220;Great API documentation is essential&#8221; many people exclaim. So, you fire up your favorite API definition editor and start writing docs. You learn what YAML is and how to format it properly. You agonize over the URL paths, verbs, response codes, and payload definitions. Finally, you reach that glorious moment: &#8220;Documentation is done! Whew!&#8221; Not quite. [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://launchany.com/moving-beyond-api-reference-documentation/">Moving Beyond API Reference Documentation</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>&#8220;Great API documentation is essential&#8221; many people exclaim. So, you fire up your favorite API definition editor and start writing docs. You learn what YAML is and how to format it properly. You agonize over the URL paths, verbs, response codes, and payload definitions. Finally, you reach that glorious moment: &#8220;Documentation is done! Whew!&#8221; Not quite.</p>
<p>While it is an important step to create API reference documentation, focusing only on these docs can cause you to miss the hidden value that API documentation can bring to your customers and your team.</p>
<h2>The Hidden Value of API Documentation</h2>
<p><strong>API documentation tells the story of your API.</strong> From the getting started guide, to core concepts and examples, your API documentation informs the audience about how you see their problem. As we know, we can solve problems using a variety of approaches and points of view. Your documentation tells me your story: how you see the world, my problems, and your solution to those problems.</p>
<p><strong>API documentation is the primary communication medium between API provider and consumer.</strong> Unless the API is open source, you will likely never see the source code behind it. Therefore, the only thing that developers consuming your API have is your documentation. Without clear and complete documentation, developers will struggle to use your API.</p>
<p><strong><strong>API documentation</strong> validates API design prior to implementation.</strong> By including documentation as part of the process and including technical writers during the design and development process, API design flaws can be spotted before coding has been completed &#8211; when changes can still be made easily and with minimal impact.</p>
<h2>Beyond API Reference Documentation</h2>
<p>We use the term &#8220;API documentation&#8221; as if there is only one kind of documentation. Yes, you need to deliver a great API reference for developers. Tools such as <a href="http://swagger.io/">Swagger</a>, <a href="http://raml.org/">RAML</a>, and <a href="https://apiblueprint.org/">Blueprint</a> are just a few of the formats available to help build them. However, complete API documentation requires more than just your API reference in HTML or PDF form. It requires looking at the marketing, development, and customer support aspects of documentation as well.</p>
<p><a href="http://launchany.com/wp-content/uploads/2015/12/API-Documentation-Categories.png"><img class="aligncenter wp-image-914" src="http://launchany.com/wp-content/uploads/2015/12/API-Documentation-Categories-1024x662.png" alt="API Documentation Categories" width="600" height="388" srcset="http://launchany.com/wp-content/uploads/2015/12/API-Documentation-Categories-1024x662.png 1024w, http://launchany.com/wp-content/uploads/2015/12/API-Documentation-Categories-300x194.png 300w, http://launchany.com/wp-content/uploads/2015/12/API-Documentation-Categories.png 1199w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
<p>As you see, it takes more than just generating an API reference to fully document your API. Let&#8217;s examine each of the options available to help compose your complete set of API documentation:</p>
<h3>Marketing-Focused API Documentation</h3>
<p><strong>Features and Discovery &#8211;</strong> Provides an overview of the API, addressing concerns such as benefits, capabilities, and pricing of your API to qualify prospects. This may include marketing content for developers and key decision makers, as well as automated discovery through formats such as <a href="http://apisjson.org/">APIs.json</a>.</p>
<p><strong>Case Studies and Examples &#8211;</strong> Case studies highlight applications that have been built using your API. It is also useful for sharing usage of your API by applications that have been internally deployed and therefore not generally not accessible. You may wish to consider providing examples and reference applications to demonstrate some of your API&#8217;s capabilities prior to developer sign-up.</p>
<h3>Development-Focused API Documentation</h3>
<p><strong>Reference Docs &#8211;</strong> Provides a reference for each API endpoint to developers, including details on the URL, HTTP verb(s) supported, response codes, and data formats. Developers use this documentation when starting to consume API endpoints, whether for the first or the tenth time. While some developers may use reference documentation to become acquainted with the API product, it is most often used for exploration, development, and troubleshooting. This is where <a href="http://swagger.io/">Swagger</a>, <a href="http://raml.org/">RAML</a>, and <a href="https://apiblueprint.org/">Blueprint</a> formats are used to generate documentation from an API definition.</p>
<p><strong>Guides and Concepts &#8211;</strong> As an API consumer, the most difficult part of using an API is the initial learning curve. Guides offer help with learning an API&#8217;s concepts and vocabulary during this critical stage. They also provide step-by-step guides for implementing common use cases. Combined with links to reference docs sprinkled throughout, developers are able to get started quickly and with confidence.</p>
<h3>Support-Focused API Documentation</h3>
<p><strong>Problem/Resolution &#8211;</strong> Sometimes developers need a little help when consuming your API. Documentation that helps developers troubleshoot error response codes can ease the burden on your developers and support staff. In addition, help pages and FAQs can guide new and experienced developers toward a better understanding of your API and proper usage patterns.</p>
<p><strong>Internal Docs &#8211;</strong> For those instances when developers need more assistance with your API, it is important to have internal assets to help your support team. Don&#8217;t forget to create and maintain internal design documentation, including diagrams and code comments, which go a long way to debug difficult issues.</p>
<h2>Putting it all together</h2>
<p>There are a variety of API documentation types beyond the typical reference documentation style we see today. Each one serves a different purpose to support the API both internally and externally. You will need to mix-and-match them depending on the purpose of your API to create a complete set of documentation. Be sure to select the ones that support your developers, your team, and the story your API tells.</p>
<p>The post <a rel="nofollow" href="http://launchany.com/moving-beyond-api-reference-documentation/">Moving Beyond API Reference Documentation</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://launchany.com/moving-beyond-api-reference-documentation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Successfully Deploy Your Web or Mobile API to Heroku</title>
		<link>http://launchany.com/how-to-successfully-deploy-your-web-or-mobile-api-to-heroku/</link>
		<comments>http://launchany.com/how-to-successfully-deploy-your-web-or-mobile-api-to-heroku/#comments</comments>
		<pubDate>Tue, 14 Oct 2014 13:09:46 +0000</pubDate>
		<dc:creator><![CDATA[James Higginbotham]]></dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[api deployment]]></category>
		<category><![CDATA[api development]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[microservices]]></category>
		<category><![CDATA[PaaS]]></category>

		<guid isPermaLink="false">http://launchany.com/?p=890</guid>
		<description><![CDATA[<p>I have deployed a wide variety of APIs, from internal to APIs for public or partner consumption. Many of them have been deployed to Heroku. There are a variety of advantages, including reduced server configuration, easy scaling, and a great vendor ecosystem for third-party add-ons. However, many have not experienced Heroku before or have not [&#8230;]</p>
<p>The post <a rel="nofollow" href="http://launchany.com/how-to-successfully-deploy-your-web-or-mobile-api-to-heroku/">How To Successfully Deploy Your Web or Mobile API to Heroku</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>I have deployed a wide variety of APIs, from internal to APIs for public or partner consumption. Many of them have been deployed to Heroku. There are a variety of advantages, including reduced server configuration, easy scaling, and a great vendor ecosystem for third-party add-ons.</p>
<p>However, many have not experienced Heroku before or have not considered it for an API deployment solution. This article provides an overview of Heroku, including how it works and how to get the most out of deploying your API to their platform.</p>
<h2>What is Heroku?</h2>
<p><a href="http://launchany.com/wp-content/uploads/2014/10/heroku-status.jpg"><img class="alignright wp-image-891" style="margin-left: 10px;" src="http://launchany.com/wp-content/uploads/2014/10/heroku-status-300x266.jpg" alt="heroku-status" width="249" height="222" srcset="http://launchany.com/wp-content/uploads/2014/10/heroku-status-300x266.jpg 300w, http://launchany.com/wp-content/uploads/2014/10/heroku-status.jpg 554w" sizes="(max-width: 249px) 100vw, 249px" /></a>Heroku is a Platform-as-a-Service (PaaS) that offers managed services for the deployment, management, and scaling of web applications. Acquired by Salesforce, Heroku has become an accepted platform for quickly deploying and scaling applications for startups and enterprises. There is no requirement to create custom deployment and server configuration scripts, as it is all handled by the Heroku platform, command line tools, and its integration with git.</p>
<p>Heroku is currently on the third version of their platform, codenamed “Cedar”. Originally focused their services around Ruby on Rails, the current Cedar stack is designed to handle technology stacks beyond Ruby and Rails. This provides flexibility for companies that may need more than one technology to build a solution.</p>
<p>A single Heroku account may host any number of applications. Each application has an owner and may have any number of collaborating accounts, allowing multiple members of a team to deploy and manage an application. Applications may be accessible via a standard HTTP connection or via HTTPS if an SSL certificate is installed.</p>
<h2>How Does Heroku Work?</h2>
<p><a href="http://launchany.com/wp-content/uploads/2014/10/heroku.png"><img class="alignright wp-image-892" style="margin-left: 10px;" src="http://launchany.com/wp-content/uploads/2014/10/heroku-300x184.png" alt="heroku" width="250" height="154" srcset="http://launchany.com/wp-content/uploads/2014/10/heroku-300x184.png 300w, http://launchany.com/wp-content/uploads/2014/10/heroku.png 650w" sizes="(max-width: 250px) 100vw, 250px" /></a>Heroku utilizes Amazon EC2 instances for deployments to their platform. This enables other Amazon-based services to be used in-network, reducing or eliminating most bandwidth charges.</p>
<p>The service is currently deployed to us-east-1 within AWS, limiting the ability to deploy to multiple regions. Deployment to multiple regions is currently being evaluated and is likely to emerge in the future.</p>
<p>Dynos are processes managed and monitored by the Cedar Stack, typically associated to an application tier (e.g. a web application) or service (e.g. background job processor). Dynos are contained within a Dyno Manifold that isolates the application, including libraries (e.g. Ruby gems), from other applications for security.</p>
<p>Dynos may be increased or decreased (to 0) as needed. The Heroku platform will perform the work of deploying the application to more or less dynos, as required. Heroku provides one dyno for free per application.</p>
<h2>Managing Your Heroku Applications</h2>
<p>Heroku management is based on a public API that is available to all accounts. This API may be used directly for custom integration into an internal release management workflow.</p>
<p>In addition, the Heroku CLI (“command-line interface”) allows for full access to the API in a scriptable manner. This includes the instantiation of new applications, management of add-ons, life-cycle control, remote monitoring, log file access, and remote process execution such as upgrade<br />
scripts. The CLI is useful for developers that wish to manually interact and/or automate the management of their applications.</p>
<p>A web-based management dashboard is also available. It has been built on top of the management API with basic provisioning, configuration, and rudimentary statistics (disk usage, allocated dynos, etc). However, most find that the CLI or API is the best method of managing deployed  applications.</p>
<h2>Why is Heroku such a great fit for deploying APIs?</h2>
<p>There are several advantages for deploying your API to Heroku:</p>
<ul>
<li>Removes the need to setup and configure servers and network infrastructure</li>
<li>One-step to deploy your latest code, using the command-line, Github integration, or their new one-button deploy feature</li>
<li>Security updates are managed by Heroku staff, not your staff</li>
<li>Ecosystem of Heroku and third-party add-ons allow for easy extensibility</li>
<li>You can scale your processes up or down as needed to meet demand, using their command-line, API, or web dashboard</li>
<li>Background processes can easily be deployed and scaled for long-running jobs, message processing, and other computational needs</li>
<li>Provides a platform for deploying solutions built using a microservice architecture</li>
</ul>
<h2>Taking Advantage of the Heroku Ecosystem</h2>
<p><a href="http://launchany.com/wp-content/uploads/2014/10/heroku-addons.jpg"><img class="alignright wp-image-893" style="margin-left: 10px;" src="http://launchany.com/wp-content/uploads/2014/10/heroku-addons-300x160.jpg" alt="heroku-addons" width="250" height="134" srcset="http://launchany.com/wp-content/uploads/2014/10/heroku-addons-300x160.jpg 300w, http://launchany.com/wp-content/uploads/2014/10/heroku-addons-1024x547.jpg 1024w" sizes="(max-width: 250px) 100vw, 250px" /></a>Heroku has a variety of add-ons that can be used to enhance and extend your API. These add-ons are services offered by Heroku or third-parties that may be provisioned for free or a monthly charge. Certain add-ons are free or have a free tier, but use caution when enabling add-ons to prevent unexpected charges on your monthly Heroku bill.</p>
<p>Settings such as user names, passwords, host names, and tokens are passed to the application using environment variables. Some add-ons, such as host name-based SSL, require additional configuration steps to be performed for the application before the add-on may be enabled.</p>
<h2>Must-Have Add-ons</h2>
<p>There are a variety of very useful Heroku Add-ons that can benefit APIs. The following is a short list of those we generally recommend for consideration. Of course, your specific API architecture and implementation requirements may vary, so be sure that these add-ons will work for your specific environment.</p>
<p><strong>Buildpacks</strong> &#8211; Not really an add-on, but buildpacks are used to setup and configure a dyno for your application. Many <a href="https://devcenter.heroku.com/articles/buildpacks">pre-built buildpacks</a> already exist, but you can fork one and customize it as needed to ensure you have everything you need.</p>
<p><strong>Domains</strong> &#8211; Configure your API to respond to your custom domain name, rather than *.herokuapp.com. <a href="https://devcenter.heroku.com/articles/custom-domains">Follow the instructions</a> to setup one or more entries using CNAMEs.</p>
<p><strong>SSL</strong> &#8211; Heroku provides a unique subdomain for each application, with SSL support. If you are using your own domain, you will want to <a href="https://devcenter.heroku.com/articles/ssl-endpoint">generate and upload your own SSL certificate</a> so that you can serve your API over HTTPS</p>
<p><strong>PG Backups</strong> &#8211; If you decide to use Heroku&#8217;s hosted PostgreSQL service, be sure to enable the <a href="https://devcenter.heroku.com/articles/pgbackups">PG Backups add-on</a>. It is free and provides options for 1 week or 1 month retention. Just be aware that developer databases support manual backups only.</p>
<p><strong>Monitoring</strong> &#8211; Once your API is deployed, you will want to be notified when performance degrades or errors are identified. Try New Relic or 3scale (Kin Lane wrote an <a href="http://apievangelist.com/2014/06/05/deploying-apis-using-heroku-and-3scale-addon/">excellent overview article on using Heroku + 3scale</a>).</p>
<p><strong>Logging Services</strong> &#8211; Unless you choose to use an add-on such as 3scale for logging your requests, or if you are deploying your API alongside a web application, you will want to monitor your application logs. Heroku provides <a href="https://devcenter.heroku.com/articles/logging">built-in logging</a>, but look for add-on services such as <a href="https://addons.heroku.com/papertrail">Papertrail</a>  to archive them and make them searchable.</p>
<p><strong>Continuous Deployment</strong> &#8211; There are multiple solutions for continuous deployment on Heroku, including <a href="http://docs.travis-ci.com/user/deployment/heroku/">Travis CI</a> and <a href="https://devcenter.heroku.com/articles/codeship%20">Codeship</a> (which can help with your <a href="http://blog.codeship.io/2013/09/26/how-to-deploy-a-ruby-on-rails-app-from-github-to-heroku.html">Github integration as well</a>)</p>
<p>For a complete list of add-ons currently available, visit the <a href="http://addons.heroku.com/">Heroku Add-Ons page</a>.</p>
<h2>Overcoming Heroku Process Reaping</h2>
<p>Heroku hosts of variety of applications, some of which see little or no activity during a 24 hour period. Therefore, Heroku has a policy to reap  processes after a period of no activity. These processes will be started once the Heroku routing layer detects an incoming request for an idle application. Depending on the start-up time required for your application, you may witness delays from a few seconds up to 30 seconds before the process is ready. This can be an issue for APIs that do not see consistent traffic but wish to offer consistent response times without this delay.</p>
<p>To overcome this, install the New Relic add-on or use a third-party website health check service. This will ensure that website health checks are sent to the site on a regular basis, ensuring that your process receives regular requests and stays active. Be sure to use a service that performs a check using HTTP or HTTPS, and that you have a static page or API endpoint that will return a 200 OK response code if your application is in a good state.</p>
<h2>Securing Your API</h2>
<p>There are several steps that we recommend be taken to secure your Heroku-deployed API. A few of these are specific to Heroku and its deployment model, while most of these are common to any application:</p>
<ul>
<li>The use of HTTPS for access to all deployed APIs either by using their pre-installed SSL certificates (for their *.herokuapp.com domains) or installing a custom SSL certificate (when using your own custom domain)</li>
<li>Enforce secure database connections using SSL to protect sensitive data transmitted to and from applications (data in motion)</li>
<li>Use of a strong passphrase for all Heroku and third party user accounts</li>
<li>Ensure secure storage of SSH keys to prevent disclosure, replace keys if lost or disclosed</li>
<li>Use individual contributor accounts rather than sharing a single user account to allow for easy revocation of API access when necessary</li>
<li>Prevent sensitive data from being written to STDOUT or to log files, including submitted form field data by using a logging system with smart filtering enabled</li>
<li>Passwords should be one-way encrypted and include a salt to further encrypt the password</li>
</ul>
<h2>Additional Resources</h2>
<ul>
<li><a href="https://devcenter.heroku.com/">Heroku Dev Center</a> is full of cookbooks and HOWTOs</li>
<li><a href="http://www.higherorderheroku.com/">Higher Order Heroku</a> is a website dedicated to tips and links to articles, both from Heroku and other websites</li>
<li>Common Heroku questions <a href="http://stackoverflow.com/questions/tagged/heroku?sort=frequent&amp;pageSize=15">already answered on StackOverflow</a></li>
<li>My slide deck from a short presentation given in 2013 to a local meetup:</li>
</ul>
<p><iframe style="margin-left: 30px; border: 1px solid #CCC; border-width: 1px; margin-bottom: 5px; max-width: 100%;" src="//www.slideshare.net/slideshow/embed_code/13619694" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen="allowfullscreen"> </iframe></p>
<p>Questions? Drop me a comment below or a <a title="Contact" href="http://launchany.com/contact/">private note</a> and let me know.</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="http://launchany.com/how-to-successfully-deploy-your-web-or-mobile-api-to-heroku/">How To Successfully Deploy Your Web or Mobile API to Heroku</a> appeared first on <a rel="nofollow" href="http://launchany.com">LaunchAny</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://launchany.com/how-to-successfully-deploy-your-web-or-mobile-api-to-heroku/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
