The Smartest architecture is structured like that of an operating system, and is split into six distinct layers (shown right).
The six layers (in order from the bottom upwards) go like this:
Smartest is written in PHP - a popular, secure and highly stable server technology that powers around 20 million websites - and is optimized for PHP version 5.2. We will begin to make use of the features in PHP 5.3 once more people have adopted that version.
Smartest makes extensive use of the technologies offered by PHP version 5.x, and is not compatible with PHP 4. In fact, if you are still running PHP 4, it is highly recommended that you update immediately, not just because of the security holes and lack of support, but also because you'll never be able to use Smartest unless you do.
MySQL is a fully featured database server with more than 6 million installations that commonly used by free software applications.
Smartest is compatible with any version of MySQL from 4.1 upwards.
Smartest fully implements the MVC paradigm in at least three distinct but complementary ways.
Application structure, through use of the Quince application controller.
Web pages - all requests for web pages are processed and responded to by an MVC-based page server.
Template data - every data object passed to the presentation layer also implements MVC by returning data requested about it using Smartest's easy Ruby-like template syntax.
The controller helps make Smartest secure, and keeps the code nice and modular.
Similar name, different function. Smartest uses the excellent Smarty template engine as its presentation layer - both in the administrative interface and in public-facing website templates.
Despite considerable architectural changes and extra functionality (added by extension), heavy use of Smarty's plugins API, and different, more XML-compatible template tags than are found in standard Smarty templates, Smartest actually uses a stock version of Smarty (version 2.6).
Use of a presentation layer means template editors don't have to - or in Smartest's case, can't at all - worry about logically-oriented code, such as querying a database. This is known as separation of concerns.
At a certain point in development, Smartest's developers nearly got painted into a corner: Smartest is entirely object-oriented, but its presentation layer - Smarty 2.6 (see above) is completely array-based at the template level. For many obvious reasons, third-party libraries are only used by Smartest when this can be done without direct modification. This caused a bit of a pickle.
One-way object to array conversion methods don't cut it because they require business logic to assume which data will be needed by the templates, which is either too simple or not simple enough. This is also a bad idea when you are designing a standardized platform for others to build on.
A little-known and thus confusingly named set of built-in PHP classes and interfaces called the Standard PHP Library came to the rescue, and in particular an interface called ArrayAccess that conveniently blurs the line between objects and arrays.
For configuration, Smartest is increasingly using the YAML format, already familiar to users of pure-data frameworks such as Ruby on Rails and Symfony.
Smartest's configuration files are expected to be completely YAML-based (barring the configuration of outside libraries) from version 0.5 onwards, though prior formats will be supported concurrently to ease transition.