Wave is a lightweight web development framework that implements a loose Model-View-Controller architecture. The framework was written by Austin Bales at 417east Models are powered by Luke Baker's ActiveRecord for PHP.

You're running: , ""

Documentation for: 0.1,1/2 "WagonGap". This is pre-release software.

Warning, the current version of this software is 0.2,0 "BuckPrivate", some information may not have been updated.

Getting Ready

To get started with developing or deploying your WAVE application, you need to get a few things in order:

Getting Started

Using wave is actually pretty easy. We'll go through some basic configuration, and then get to work.

  1. Open config/database.inc.php in TextMate or an inferior editor. You'll need to provide your MySQL hostname, username, and password. You'll also add table names you want ActiveRecord to scan.
  2. Next is config/application.inc.php, where your constants are defined. You must define your FQDN and your top-most URL fragment. In PHP 5.3, you can define constants with the const keyword — how nice!
    • If you're developing your models, you should set S_ACTION_RUNNER to True so that you can use runner.php to generate_models.
  3. Create views/welcome.php, this is your default view. For a completely static view, you can simply call $this->present() and your views/welcome.html file will be loaded. Consult the doc blocks for help with the HTML helper and the templating system.

What's Inside?

Inside the framework/application, you'll find many folders and files. The functions inside are documented, and won't be extensively covered here.

.htaccess
Controls error-handling, environment variables, and rewriting.
autoload.php
Autoloads system and model classes.
bootstrap.php
Boots the application, and initializes the database.
index.php
The application "environment", pulls everything together.
runner.php Deprecated in 0.2,0
When S_ACTION_RUNNER is set to True, this lets you access the database console.
config/
application.inc.php
The main application configuration file. Set URL's here. Define your constants here.
database.inc.php
The database configuration file. Connection parameters and ActiveRecord scope are set here. For security purposes, the database user may not be root.
routes.inc.php 0.2,0
Define your routes here.
strings.inc.php
Used by you and the framework for localization.
css/
Store your non-theme css here.
error.css
CSS file for the error views
helpers/
Helper/Utility classes. These are static classes, and cannot be instantiated.
HTML
Provides methods for page presentation, form inputs, etc. XHTML syntax only at this time.
Message
Messaging helper, Message::send('Account created', 'success') and Message::view()
OpenID
The OpenID helper provides a facility to accept OpenID logins (with proper model support)
PayPal
Provides PayPal IPN helper methods
Tempate
Placeholder, please use HTML::template(); instead
images/
Application images folder. Not for image assets.
includes/
Developer included helpers, classes, misc. The autoloader looks here.
js/
Javascript libraries and files go here.
meta/
This folder is exempt from the URL rewriting — used for conducting quick tests.
models/
Contains your data models. They are generated from your database schemas following the ActiveRecord patterns from runner.php
static/
These files are exempt from URL rewriting.
assets
Used for images, files, etc that your application references
templates
Contains the default and developer-created templates that are used by the HTML helper.
doctypes
Currently, WAVE only provides XHTML Strict headers, but you can roll your own.
system/
The core of the framework.
view.php
Well documented, used to present your views. The pentagon($levels) method is used for access control and requires a user/login system.
controller.php 0.2,0
Framework class for interaction with models, your controllers will Extend this class for functionality.
view/
Your view .php and .html files go here.
view_fragments
Contains fragments for use in your views using HTML::render_fragment($name).