2

AN OVERBROAD PATENT ON EXAMPLE SOURCE CODE

Google has patented the generation of client libraries and example code from API descriptions. 10 minutes of your time can help narrow US patent applications before they become patents. Follow @askpatents on twitter to help.

QUESTION - Have you seen anything that was published before March, 2012 that discusses:

Automatically generating a client library for accessing a given API from a given operating system using a given programming language, together with sample code that uses the client library, and making the generated code available for download from the web?

If so, please submit evidence of prior art as an answer to this question. Only one piece of prior art per answer below. We welcome multiple answers from the same individual.

TITLE: Generate custom client library samples based on a machine readable API description

Summary: It’s common for a web application to provide a programming-language-agnostic HTTP API. It’s also common for web applications to provide example code for accessing the API from many different programming languages. Google wants to patent automating this.

  • Publication Number: US8510762 B1
  • Assignee: Google
  • Prior Art Date: Seeking prior Art predating March 2012
  • Open for Challenge at USPTO: Open through Feb 13, 2014

Claim 1 requires each and every step below::

A method performed by one or more processors, the method comprising:

  1. Receiving a request for a client library for an API, the request including an API identifier, a target programming language, and a target operating system platform
  2. Retrieving a machine-readable description of the API based on the identifier for the API
  3. Building a model of the API based on the machine-readable description
  4. Generating an API library source code in the target programming language
  5. Receiving a sample template for a generic sample application
  6. Expanding the sample template by incorporating a data structure in the target programming language to generate one or more code samples using the API library source code
  7. Storing in a unique Web location the generated code samples for later download.

In English, this means:

  1. The server requests a client library for accessing the Foo API using the Bar programming language
  2. The server looks up a description of the Foo API
  3. The server parses the API description
  4. The server generates a Bar-programming-language client library for the Foo API
  5. The server looks up sample code for using the Foo API. The patent does not specify if this sample code is in the Bar programming language, or in some other format that is then translated to the Bar programming language.
  6. The server generates Bar-language sample code that uses the Bar-language client library. It does so by using the impossibly vague procedure of “expanding the sample template by incorporating a data structure in the [Bar] programming language.”
  7. The server returns a URL of the generated client library and sample code.

Good prior art would be evidence of a system that did each and every one of these steps prior to March, 2012.


What is good prior art? Please see our FAQ.

Want to help? Please vote or comment on submissions below. We welcome you to post your own request for prior art on other questionable US Patent Applications.

1
  • I have actually done something similar personally for quite some time, though unsure if it'd really qualify. I use TT tempting & some libraries from Microsoft to generate a database, repository layers & service layers into DLLs, given a UML model. Sep 19, 2013 at 6:27

6 Answers 6

5

Microsoft had code that does this same thing with a limited language set (those supported by .NET), but it wasn't done on a server, it was done in Visual Studio. It's been around since VS 2008 at least, but I'm not sure it's specific enough for this patent.

4

This is a fairly common practice in my day to day work. We use the wsdl specification (http://www.w3.org/TR/wsdl) to define the api. The client connects and we deliver a pre-build library using whatever is configured.

In many environments, the application developer is responsible for building the library, this is both not unique and an obvious increment to an established work-flow.

3
  • That's interesting. If there are published articles or blog posts that describe this practice, that would have more weight at the patent office. Are you using a publicly-available library or tool to do this? There might be a pre-2012 manual for it online.
    – Dave
    Aug 26, 2013 at 14:11
  • Here is an example of 2010 blog discussing using a WSDL to generate the code needed to access it in Salesforce. mattreyuk2.wordpress.com/2010/09/30/…
    – Ben
    Sep 19, 2013 at 20:22
  • fedorahosted.org/suds/browser/trunk - suds (for Python) has commits from 2007, @Dave. Sep 20, 2013 at 13:49
2

It has some resemblance to regular expressions (let's call it a TEXT description), for which client libraries in various programming languages can be generated automatically.

More generally, if a client library can be generated out of some description, this means, that:

  • the description is already a source code (it is machine-readable, in a formal language)
  • the genrated code of the client libraries is just what this source code is compiled to (we can also call it an intermediate code).
2

This is just a variation of a common practice: using a tool to generate sample (or stub/skeleton/boilerplate) code. This practice is described in "A Source Code Generator Based on UML Specification", a paper by Kresimir Fertalj and Mario Brcic, published in 2008.

Usually a developer uses offline tools to generate such code rather than a server. In the case of this patent application, the tool happens to be made available on a server rather than offline on a developer's local system. Other than that the process of generating code from a given input is the same (compare III. Basic Principle in the paper cited above Claim 1 of the patent).

That said here are examples of server-based code generators (aka. custom client library samples) available before March 2012:

2

Client library generation is common practice for webservice API.

The clientgen Ant task generates, from an existing WSDL file, the client component files that client applications use to invoke both WebLogic and non-WebLogic Web Services.

Some mainframe integration tools also use similar technique. Software AG webMethods EntireX comes to mind. They have a tool named EntireX Workbench that let you extract an API from COBOL or Natural routine. This API is called an IDL file. The IDL can then be used to generate .NET, Java client.

0

gSOAP, from around 2002, generates client and server library C/C++ code based on WSDL for web services. However, this is done statically, at development time, and not in the server itself. So, not entirely the same thing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .