Set Up Your First Website
See Download & Install for more info.
Assuming you are using Apache, your website needs three folders with the following contents:
We were inspired to make MVC more suitable and intuitive for web development. We think our "Page-Model-API" architecture is pretty awesome...
Everything starts with the page. You type in a URL and your corresponding "page" is run. Pretty simple.
A page is a
.php file located within the
/pages folder of your codebase. When a user visits a URI of your website, a Page object is instantiated and
run() which does stuff like db connections and authentication before including your
The Page object has many useful properties and methods (like templates) which automatically link up your
.js files. Your Page object is accessible via
Also, pages never have the
.php file extension in the URL thanks to our
See pages for more info.
Creating models is fairly simple. You choose the data fields that you want in your data object, and you have methods that validate the data fields and methods that run beforeInsert(), afterUpdate(), etc.
We have developed a clever ORM syntax called AQL (AQL Query Language) for creating multi-dimensional data objects with an "AQL statement". It's like SQL, but it can return multi-table data objects instead of a flat recordset! We use AQL to map the relational database fields to the data properties of our model.
See models for more info.
If your website has a database, you should have a REST API.
Send a POST or GET request like
http://example.com/api/ClassName/methodName and you will get a JSON response. Most likely you will have pages that submit AJAX requests to your API. And yes, you should set permissions to limit who can do what in your class, but more on that later.
This works because there is a
page that acts as the controller for your API (
See API for more info.
All code is organized into reusable, cascading codebases.
There are a few classes you will want to be familiar with.
There are a few functions you will want to be familiar with.
We are active on Github and welcome collaboration and code contributions!