For many developers, web application development is a whole new ball game. Common misperceptions about device-level web development can result in the selection of the wrong choice of development tools which causes frustration and delayed projects.
In a typical (non embedded) deployment, a website runs a web server for the static content and a separate application server for the business logic. However, in resource constrained systems, including embedded systems and devices, a combined web server and application server is necessary. These systems require a small application server with a fast internal embedded web server.What is business logic?
The phrase business logic is a bit of a misnomer as one might think it is related to business software. Business logic simply means the server can generate dynamic content and/or execute custom code on the server in response to incoming requests. Application server clients are often applications themselves and can include other application servers. Communication between the application server and its clients can take the form of HTTP messages, but can be any protocol including industrial protocols such as Modbus and OPC-UA.
When developing modern interactive HTML5 web applications, you do not necessarily have to run the application server on the same operating system or device as you are developing on. The following video illustrates how one can develop a modern HTML5 Vue.js application by keeping all HTML files on your local development computer and use services provided by an online application server for the backend stuff.
See the tutorial a modern approach to embedding a web server in a device for details on the hands-on tutorial.
Do you like to tinker with hardware? An application server can run on a micro-controller thus enabling fast and super easy development of device control logic by using an easy to use scripting language. The following video shows a servo being controlled in real time by sending JSON messages over WebSockets from the browser to the application server running on on a tiny micro-controller. You can find more information on this project at the Lua and Barracuda Application Server for ESP32 page.