mgweb-server: REST API development for Legacy Systems
Those of you who run and support older-style legacy systems on IRIS may be interested in learning about and trying out a new framework I've built on top of my colleague Chris Munt's mg_web technology (details at https://github.com/chrisemunt/mg_web).
There are quite a few older-style and legacy applications out there whose useful life can be extended by making their functionality available as REST APIs. To make this something that can be done quickly and easily, using modern, industrial-strength web servers, I've created what I'm calling mgweb-server:
https://github.com/robtweed/mgweb-server
This can be installed to work with standalone IRIS systems, but the easiest way to try it out and understand how it works etc is to use the pre-built containerised version. As most readers here will be interested in using it with IRIS, you can quickly and easily reconfigure the mgweb-server Container to use a separate IRIS system instead of the database it comes pre-installed with.
Again, the easiest way to try it out with IRIS is to use the IRIS Community Edition Docker Container - so you have the web-server (Apache) and mweb-server running in one Container, and IRIS running in another, with the routines and Global storage being maintained in IRIS.
To see it all in operation, you can then install the mgweb-conduit example/demonstrator REST API suite:
https://github.com/robtweed/mgweb-conduit
Those of you familiar with the IRIS Competitions may recognise this as being yet another implementation of the RealWorld Conduit application for IRIS - this time implemented in old-school legacy M code and storing the Conduit data in Globals.
The interesting thing is that the Global storage in mgweb-conduit is identical to that used in my qewd-conduit application, qewd-conduit abstracted those Globals as persistent JavaScript Objects. Now, in mgweb-conduit you can see how those Globals are accessed and maintained the old-school way!
The IRIS-specific instructions can be found here:
- https://github.com/robtweed/mgweb-server#using-the-mgweb-server-container-with-iris
- https://github.com/robtweed/mgweb-conduit#setting-up-mgweb-conduit-on-an-iris-system