The Simplicity PHP Framework!
The Simplicity PHP Application Framework is an advanced, scalable and extensible PHP application framework to aid developers in creating high traffic, high availability Web 2.0 online applications. Integrating a solid MVC framework with some of the best Open Source projects around Simplicity aims to assist developers with any amount of experience in taking their applications to a new level.
Mission Statement
Create and evolve a fast and lightweight, yet robust, complete and secure PHP framework, aiding and supporting the PHP developer who wants to use and deploy all the new and exciting Web 2.0 features fast and easy, without the need to become an expert in all the different aspects.
Features
- Fast and lightweight OO-MVC framework.
- Tight integration of one of the finest JavaScript frameworks available, Ext 2.0.
- Full AJAX enabled control panel to manage all aspects of you application this includes database modeling and the creation of stub controllers, and even the addition of predefined actions to speed up development.
- Database modeling and the creation of stub controllers with the Admin console.
- Addition of predefined actions to speed up development.
- Flexible Data Models architecture to allow accessing and even creating relations with almost any data source, Including RDBMS, RSS, LDAP, XML or even just plain text.
- 100% Buzzword compliant!
Quick intro to Simplicity
Here are some screen shots to give you a taster for the admin console...
This is the 'home tab' of the admin console. Here you can see a quick into to simplicity and a dynamic, real time usage monitor, this gives you the current page views / sec across the site.
This is the 'Registry' of the simplicity application. This is an XML backed cascading hierarchical configuration used you use to hold all configuration for your site. But this is not limited to single, key/value types on information, you can for example store the navigational structure of your application within the registry, so you could have a container called home, and within there a container called children, and in there keys for the children etc. etc. This can be accessed in code as follows:
<? /*This code refers to the following tree:
navigation
home
info -> 'The info page'
contact -> 'The contact page'
*/
// Here we use the shortcut class to Simplicity_Registry: SRG
$nav = SRG::get('navigation'); // returns the entire navigation tree as an multidimensional array.
$nav = SRG::get('navigation.home'); // returns just the home container as an associative array.
$nav = SRG::get('navigation.home.info'); // here we return the value of the info key, as a string.
?>
This shows the context menus of the Registry tree, showing how you can add keys and containers to the registry.
This is the popup for adding a new root level item to the registry.
This shows the Application Structure section of the application, this is used to display all the current controllers and their methods, currently it is read only, but here you will be able to assign routes (custom URIs) to methods, and even create controllers from scratch directly within the interface.
This shows the data modeling tab of the console. This allows you to create connections to a variety of different data sources, including all RDBMS' supported by php PDOs, CSV and TSV files and raw PHP arrays, with support on the horizon for RSS feeds and more. Once created you can create Models associated with the connections, you do this by creating the model using the context menu, then adding column definitions, each column is a container and contains a variety of properties. Internally all of this is stored in the Registry, showing just how flexible it can be. When a model is defined it can be accessed in the code is a variety of ways:
<?
// Again here we are using the shortcut class for Simplicity_Data : SDA
//Request a specific model directly by id
$user = SDA::getModel('simplicity.users',1);
print $user->name; //outputs the value of the 'name' field.
//Request a group of models using MQL - this will request all the users.
$users = SDA::query('select simplicity.users');
foreach ($users as $user) {
print $user->name.'</br>'; // outputs a list of all users
}
//Filter the results with where and limit
// users with names starting with J.
$users = SDA::query('select simplicity.users where name like "j%"');
// the first 10 users
$users = SDA::query('select simplicity.users limit 10');
// the next ten users, (offset by 10)
$users = SDA::query('select simplicity.users limit 10,10');
//Ordering
// show all users sort by name
$users = SDA::query('select simplicity.users order by name');
// show all users sort by kudos in reverse order.
$users = SDA::query('select simplicity.users order by kudos desc');
?>
No comments:
Post a Comment