Per some previous posts (starting here) I have pulled some functionality from a project that I am working on into a little demo application - Node.Js Physical Interface Demo.
Over the past days I have refined the framework that I am using for my web server. I have chosen to use a fairly primitive approach to providing web service as I have based my application on the http module. This gives me very atomic control though with some added complexity.
In order to attack that complexity I have refined my own framework for http service. There are to scripts that are purely server...server.js which talks to the port and form.js which handles page and form interaces asynchronously. Two additional scripts provide an interface between server and form, serverExits and formExits. As the name implies there are a number of exits embedded in Server and Form that allow a application to customize some key handling aspects.
Everything else is pure application. To add a web page you create a script that includes application logic AND to handlers...serverHandler and formHandler. serverHandler executes the asynchronous recieve of a form which is then processed by formHandler. A matching html file is created in the html directory, with some meta tags that allow substitutions of variables, and Bob is Your Uncle.
I will write more about this later. Remember that my target is an embedded application with its head being a small LCD touchscreen.....
No comments:
Post a Comment