Making an A4W a service - apps4work/co.a4w GitHub Wiki

tl;dr

An A4W is a Part stored in a file, in a standard file format (WAR), than can be "dropped into" a Standard Web Application Server, with automatically added files that make it browsable by a human and accessible data and/or function to other A4Ws running on the same server or other servers.

An A4W is made a service by

  1. Being a WAR file. This means that an A4W can be deployed into a Web Application Server, where is becomes a named Web App that can be browsed, using http://domain-name-of-server/name-of-a4w

  2. Responding to a set of URL variants:

    1. http://domain-name-of-server/name-of-a4w or http://domain-name-of-server/name-of-a4w/part.html The expected response is HTML to display the Part on a browser
    2. http://domain-name-of-server/name-of-a4w/part.json The expected response is JSON that describes the Part
    3. http://domain-name-of-server/name-of-a4w/part.url The expected response is a URL for the part
    4. others (fixme)
  3. Registering the A4W in the Server's A4W Registry (which is available if the server is A4W Aware so that the Part is available to other Part's in the Server. An A4W that does not do this is only accessible as a service via the http requests listed above. See Technical details

These behaviors are automatically added to a Part when an A4W is created by CreateA4W. These are default behavoirs but an A4W can provide its own implementation of them.