I have talked about the functions, the hardware, the logical structure, the data flow and so on but all of this has been at the technical end of things. Now, I would like to try to give a feel for the actual software. Smalltalk is probably a new experience for most of you readers but a bit of exposure won’t hurt. I will try to keep it easy for non-programmers.
Being a RESTful design means that there are not any actual web pages sitting there waiting to be called up. All of the content of the site comes from a program sitting on the server. It all starts at a place called WSShowMenu. This is the external name of a class in the program. The class is actually called TM470WSShowMenu but I reduce that for external use. So, we enter
and we get a menu on the screen. Splitting this out, the domain name is http://www.tm470routingproject.co.uk which tells the browser where to get the information (obvious stuff!) – the :8080 tells the router where to send the request (we have four computers on our server network). There is a server sitting on the network which responds to the request and routes it to a piece of software that is looking at the port 8080. I have mentioned ports before but they are the pipes that route different types of requests – port 25 is the port for sending e-mails, for instance. This server extracts the WSShowMenu and instantiates an object from that class. This object knows how to build the resulting Menu web page but first it, in its turn, separates out the bit after the colon – demo. This is the user name of the requester and is used by the web object to get that user’s data.
The user data includes the web address of that user’s logo and also the name of their railroad. This is all wrappered up into a stream of HTML that gets sent back to the calling browser and the result is:
The next post will discuss how the system handles data.