As far as design patterns go, MVC is the most well known pattern.
This component contains the data structures and logic that are unique to your business. That is what the application does to add value.
Examples of this would be your firebase models.
This component interacts with the users of the application.An example would be the html rendered in the browser.
The controller processes requests incoming from the user and sends them to the model as commands.
Of course the pattern is a general principal. To its end a couple of popular implementations have emerged which we will look into in brief.
In this pattern the controller writes out a request to shared file such as a dot file. A daemon running in the background would then read this file and perform an activity based on it.
This particular pattern is best illustrated by the print spool. The front end (your machine) drops files to be printed in a spool area. A printer daemon running in the background watches for new files and send them out to the printer. Once the job is done, the file is removed from the spool area.
It is noteworthy that this pattern would work well with jobs that would benefit from batch processing.
In this pattern the driver provides commands and interprets output from an engine after startup. An example of this would be where a utility meant to periodically fetch content from say ten different websites starts up curl in the background and uses it to do the actual fetching.
This is the browser/server pair where requests are sent to a daemon running in the server such as nginx which then processes the request and sends a response back.
This pattern can be thought of as an implementation of the Driver/Engine pattern.
Do you know of any other implementation of the MVC pattern? Talk to us in the comment section below