About Sitellite       Screenshots       Downloads       Forge      Documentation       Community       Support

You are here: Home / Documentation / Boxes in Sitellite: Basic Building Blocks

Boxes in Sitellite: Basic Building Blocks

As I mentioned in my previous article "The Anatomy of an App", boxes are the basic building blocks of Sitellite-based applications (or just "apps").  A box is actually just a simple PHP script that supplies a small piece of functionality, usually a single screen worth, for a Sitellite app.  These scripts, or boxes, are never called directly from the browser, but are called through the Sitellite Content Server (SCS) upon request by your web site visitors, or from other boxes or templates within Sitellite, and even from within an embedded box "call" inside a web page in Sitellite.  I'll show you how all of this works in short order, but first...

Some of the things that set a box apart from ordinary PHP scripts include:
  • Automatic access control
  • Contextual metadata
  • Access to app-wide settings
  • Access to pre-loaded objects and functions for database access, templating, i18n, and more
  • settings.php files, which provide a level of automatic documentation and introspection into your boxes.  These are used by AppDoc to provide automatic developer documentation for your apps, and will be used by the upcoming Sitellite Box Chooser (see our roadmap for 4.2) to dynamically generate box calls within web pages via a simple wizard-like UI.
Let's write a quick box and then flesh it out into a full Sitellite box using all of the features Sitellite provides to app developers.  To start, create a file called inc/app/myapp/boxes/hello/index.php with the following contents:

<?php

echo 'Hello, World!';

?>

Next: Calling our box

Page 1: As I mentioned in my previous ar...
Page 2: Calling our box
Page 3: The access.php File
Page 4: The $parameters array
Page 5: Accessing app-wide properties

All Tutorials

Members

Note: You can use your SitelliteForge.com account here and vice versa.

Username

Password

Forgot your password?

Not a member? Click here to register

Sitellite 5 Beta


Copyright © 2010, SIMIAN systems Inc.
All rights reserved. Privacy policy
Some of the icons on this site were created by the Gnome Project.