VTML
Github iconNPM icondownload
Tutorial
Getting startedHello worldMy first siteAdding a formRoutingAuth
Documentation
VariablesLogicPagesSQLFormsChecksPortalsJavascriptEvent streams
Reference
v-withv-ifv-unlessv-for-eachv-portalv-jsonv-yamlv-markdownv-sqlv-nodejsv-dumpv-hint-portv-pagev-exposev-set-cookiev-includeformv-outputv-check-*v-catchv-tryv-set-statusv-redirectv-subscribev-notify
warning

VTML and vtml.org is in alpha and under active development. Use at your own risk

warning

VTML is in alpha. Use at own risk.

VTML

Web development made simple

How many developers does it take to create a web page?

UI, UX, client-side logic, server-side routing, validation, error-handling, security, database interaction. VTML takes all these headaches and give you a simple declarative way to define the behaviour of a web page by interpreting your HTML. Say goodbye to diving through multiple programming languages to figure our how or why the pages works and say hello to a simple new kind of development.

<h3>VTML is...</h3>
<v-nodejs target=$adjectives >
    return ["fast", "easy", "awesome"]
</v-nodejs>

<ul>
    <v-for-each $adjectives as=$adj >
        <li>$adj</li>
    </v-for-each>
</ul>
Features
Inbuilt routing
<header>Routing<header>
<main>
  <h3>VTML can be</h3>
  <v-page path="/" >

    <v-index>
      Great
    </v-index>

    <v-page path="/speed" >
      Quick
    </v-page>

    <v-page path="/readability" >
      Simple
    </v-page>
  </v-page>
</main>

Create simple routing structures with ease.

Automatic form endpoints
<form v-name="say_hi" action="/sayhi" >
  <input
    name="message"
    type="text"
    maxlength=128
    required
  />

  <v-action>
    <v-nodejs>
      console.log($.body.message)
    </v-nodejs>
  </v-action>

</form>

Server-side validation is generated from form inputs. Define the interaction once and let VTML take care of the REST.

Component isolation
<v-nodejs target=$not_important >
  return "Trivial data"
</v-nodejs>

<v-nodejs target=$important >
  return "Important data"
</v-nodejs>

<v-portal>
  <p>I only need $important</p>
</v-portal>

Forms, pages and portals can all be isolated and rendered independently of the rest of the page. VTML can determine which tags need to be executed to produce only the parts of the page you need.

Declarative asynchronous templating
<v-sql>
  SELECT lotsof, data FROM very_big_table;
</v-sql>

<v-nodejs>
  return fetch("https://very.slow/api")
</v-nodejs>

<v-include src="./more/massive/stuff.vtml" />

The VTML reference engine can detect the optimum order of component execution to deliver lightning fast load times.