Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A simple front-end structure for websites based on the DAVE Api methodology.
Branch: master
Failed to load latest commit information.
css file cleanup
js fixing page check
partials file cleanup
.gitignore ignore
index.html file cleanup
license.txt licence update
readme.markdown readme update
robots.txt file cleanup



A simple front-end structure for websites based on the DAVE Api methodology.

This is a framework website which is meant to be used in conjunction with a remote JSON API. The philosophy behind this type of website is that it is entirely composed of static assets and js which can be rendered by the browser. Transactions are decoupled from the front-end and processed via a well-formed API. This example site is a single static HTML page with HTML partials which are loaded as needed (via the jQuery load() method).

app.js includes the main application files. Example JSON actions can be found throughout this project, but they all make use of the app.apiRequest(Action, Callback, Params) method.

I also employ ajax-friendly deep linking.

This type of website can be served by even the simplest of servers (S3 objects, even GitHub static pages!), and work great behind load-balancers, as there is no server-side rendering done per-user.

Example of loosely-coupled APIs for a user login form:

<form id="userLoginForm" action="#">
    screenName: <input type="Text" id="screenName"></input><br />
    password: <input type="Password" id="password"></input><br />
    <input id="userLoginSubmit" type="submit" value="sign in"></input>

<script> = {};
$('#userLoginForm').bind("submit", function(e){
    params = {};
    params.password = $('#userLoginForm > #password').val();
    params.screenName = $('#userLoginForm > #screenName').val();
    app.apiRequest("userLogIn", "", params);
}); = function(api){
    if(api.error != "OK"){ 
        $.cookie('userID', api.userID);
        $.cookie('sessionKey', api.sessionKey);
        $.cookie('screenName', api.screenName);
        $.cookie('image', api.image);
        window.location.href = window.location.href; //reload
Something went wrong with that request. Please try again.