Integration Patterns

Updated: 2018-11-28

How to integrate another library or system.

shared database; RPC(SOAP, protobuf, thrift); REST

By Inserting Javascript Snippet

  • Google Analytics: to add tracking code to your web pages, simply configure the settings on their web portal and copy-and-paste the generated js snippet to HTML
  • Disqus: similarly, to add Disqus comments to web pages, copy-and-paste the js snippet to the wherever you would like to show the comments in HTML

This seems to be so simply and so smooth; of course this may be limited to adding widgets to websites.

By RESTful API

  • PayPal: to integrate Express Checkout or Payflow, you need to send requests to the exposed REST API endpoints; Stripe provides a better integration by inserting HTML/js snippets, which makes PayPal integration so grueling and cumbersome
  • H2O: by REST API endpoints

By SDK

  • H2O: h2o also provides Python/R API so user do not need to interact with REST API directly but utilize the wrapper; unfortunately there's not Java counterpart, the Javadoc in their documentation page is not very helpful; though REST API tends to be stable, python API is changing so fast, which leaves the question whether it is a good investment to learn the current one.