vorlage the vampire squid

Download Now, Ask Questions Later (Linux amd64)

What is Vorlage?

Vorlage is an HTTP server and HTML processor that keeps the frontend development as basic and as simple as possible while keeping the backend as flexible and as powerful as possible.

Its aim is to stop the unhealthy co-dependence of frontend and backend so that users of Vorlage are not restricted to a particular framework, paradigm, and/or language when building new or maintaining existing web applications.

Vorlage used in reporting/analytics.

The Vorlage architecture took into account the popular use of the web to format reports/analytics. After all, that's why HTML was made in the first place. So Vorlage users will find that the processing and formatting of data in HTML form is fast, powerful, efficient, and intuitive.

Vorlage used in processing of input.

Vorlage users will find that taking in input is easier than ever. Vorlage forces backend developers to document their inputs and outputs to their form processors, RESTful APIs, ect. This gives frontend developers a clear-cut and concise experience.

Simply put, Vorlage forces everyone to be very deliberate with their methods handling input and output.

Vorlage used in basic websites.

Even though Vorlage is powerful when it comes to high-demand, high-volume, high-processing traffic, Vorlage is engineered to also work great with small, basic websites. Vorlage start ups instantly and requires no external dependencies/external installations and is super lightweight.

Vorlage in comparison to similar products.

  • No compiling needed: PHP and Vorlage have fast development cycles because compilation is done when the page is requested.
  • Appends and Prepends: PHP and Vorlage have the ability to append and prepend documents easily without worrying about import logic.
  • Compile Caching: Unlike PHP, Vorlage is smart enough to cache subsequent compilations when no changes to the file were detected, making Vorlage much more versatile in high-volume traffic.
  • Code Separation: Unlike PHP, Vorlage is strict on the philosophy that HTML and processing code must not be mixed.
  • Production-ready web-server: Nginx and Vorlage are both ready out-of-the box to start handling high volumes of traffic in a reliable and secure manner.
  • Simple to configure: Unlike Nginx, Vorlage has very basic configuration and great measures have been taken to make configuration security vulnerabilities difficult.
  • Processor/not-a-proxy: Unlike Nginx, Vorlage actually handles the processing the documents instead of just passing them off.
  • Fast: Node.js and Vorlage have extremely fast processing times compared to other web processors.
  • Easily Debuggable: Node.js and Vorlage have spent a good portion of time making it easy to debug deriving products.
  • Quick and Mobile Deployment: Unlike Node.js, Vorlage-based products are easily transferable and easily started, requiring only a few copy-and-paste to work. No npm-install/configure needed.
  • Language Agnostic: Unlike Node.js, Vorlage's processing will function with any language from assembly to python, including C, C++, Go, Rust, Java, Javascript, and everything else capable of being dynamically linked.
Apache HTTP
  • Modular/Powerful Linking: Apache and Vorlage both have a versatile integration systems that operate just above the system without the need for socket programming and/or slower integration protocols (ie, fastcgi)
  • Easily Integrated: Unlike Apache, Vorlage requires a very simple interface to implement for processors of only a handful of functions.
  • Low Maintenance: Unlike Apache, Vorlage derived products require very minimal impact on web-server configuration.

Learn By Example

This article you'll go through some simple steps to see Vorlage in practice. It's easy to understand so just follow along and read the additional details if you so desire. But you should be focusing on the code/HTML itself to easily comprehend Vorlage's capabilities.

Write a header.



As you can tell we've set the title to a variable. This header will be used across multiple pages, but the title of each one of those pages will change. So we use a variable that we can define in the page itself.

Write a footer.



The footer here is just closing the tags that the header had opened. Simple and sweet.

Write a web processor.


func MyIP() string {
	return getRemoteIP()

You can make "Processors" in Vorlage. Processors can supply variables to the page without using the #define macro. Here, our processor (myproc) sets a variable ($(myproc.MyIP)) to print out the IP of the requester.

Finally, write the index.


#prepend header.html
#append footer.html
#define $(MyName) Kevin
#define $(Title) Home Page

<p>Hello, my name is $(MyName).</p>
<p>My IP is $(myproc.MyIP)!</p>

This is where it certainly all comes together. Look closely at what's going on here. Note that even though $(Title) is declared after the header.html is prepended, it will still be defined in header.html by the time the page is outputted.

Also note that the macros (#prepend, #append, #define, ect) are at the start of the page: this is required. All macros must be defined at the top of any file to make it impossible to mix the Vorlage processing with the actual HTML. This is an effort to make Vorlage easy to work with for those who are not skilled in logical text (aka programming).

And now, the output:

	<title>Home Page</title>
	<p>Hello, my name is Kevin.</p>
	<p>My IP is!</p>

This is what the requester will see. A single, well-put-together html page with variable information.