Skip to content

RESTful API #144

@michaelgfalk

Description

@michaelgfalk

The big questions

  • What aspects of a RESTful architecture are most important to implement soon?
  • What concrete approaches/technologies might work?
  • What aspects might you be willing to work on, if you are a programmer?

Status Quo

Retrieving data

Currently Heurist relies mostly on URL parameters to retrieve records and other data from Heurist databases. A typical call to the public API looks something like this:

    heurist server     version   data param   database param
           |              |           |              |
|---------------------/-------/--------------&---------------|
https://heuristref.net/heurist/?recID=12735&db=falk_playspace

My preferred solution would be to implement something like the following:

    heurist server     version    database   datatype  id
           |              |          |           |      | 
|---------------------/-------/--------------/------/-----|
https://heuristref.net/heurist/falk_playspace/record/12735

User interface

On the backend, Heurist is implemented as a single page application and does not provide routing to different menus in the interface.

How important is routing on the backend? To my mind it is unimportant. Users interact with the backend interface as a software application, the way they would us Google Docs or a desktop application. In these contexts, I don't think routing is very important.

CMS websites

On websites in the Heurist CMS, the website and the current page are both indicated by URL parameters. Heurist public sites are also implemented as single page applications, and do not provide full routing—though it is possible to obtain a persistent URL to individual pages on each site.

Here I think that a better form of routing can and should be implemented. Users should be provided a subdomain for each site on each Heurist server. This may not be possible for some servers, where there are insitutional restrictions on subdomains, but generally I think it could be implemented by creating a wildcard domain for each Heurist server and then parsing the subdomain elements in a standard form, e.g.

        database name  heurist server
              |              |
|---------------------.--------------/
https://falk_playspace.heuristref.net/

Apache would direct all requests with a subdomain to a PHP script that would parse the subdomain and retrieve the website for e.g. db == falk_playspace.

Ideally this would be combined with standard page routing as in other CMSs:

        database name  heurist server     slug
              |              |              |
|---------------------.--------------/------------/
https://falk_playspace.heuristref.net/project-team/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions