Hi everyone,
I've been working on this new development framework for about the last 3 years.
http://www.qiphp.com
It's a PHP5 framework, natively OO, MVC architecture, and with some really neat tools that make it an ULTRA-rapid development framework.
Here's a quick run-down of how some of the core components work.
Let's say I have the following table:
Code:
CREATE TABLE user (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
username VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL
);
Once I've created that table in my database, I IMMEDIATELY have a data access object available in my Qi applications, using our proprietary "Archetype" dynamic data access layer (dDAL).
What I mean by that is that without adding any DAL or running any interpreter script, I can
IMMEDIATELY BEGIN CODING within the framework (with no additional work) and do tasks such as the following:
Retrieve User as JSON (e.g. for AJAX)
PHP Code:
$user = new User();
$user = $user->findById($_GET["id"])->first();
print($user->getData(DataFormat::JSON);
Get a list of Users as XML
Limit 10, page #1, ordered by name descending
PHP Code:
$user = new User();
$users = $user->findAll(10, 1, "name desc");
print($users->getData(DataFormat::XML);
Create a New User Form and Save to DB
The Qi Form component automatically does advanced validation on the front end, such as required states, format (email, date, number, etc.), and confirmation.
PHP Code:
$form = new Form("user-create", $PHP_SELF, Method::POST);
$form->addElement(new TextInput("name", "Full Name", array("required"=>true)));
$form->addElement(new TextInput("username", "Username", array("required"=>true)));
$form->addElement(new PasswordInput("password", "Password", array("required"=>true)));
$form->addElement(new PasswordInput("password_confirm", "Password", array("required"=>true, "confirm"=>"password")));
$form->addElement(new TextInput("email", "Email", array("required"=>true, "format"=>"email")));
$form->addElement(new TextInput("email_confirm", "Email", array("required"=>true, "format"=>"email", "confirm"=>"email")));
$form->addElement(new Button(ButtonType::SUBMIT, "submit", "Submit"));
// If the form was posted, try to save the item
if ($form->posted()) {
try {
$user = new User($_POST);
if ($user->save()) {
header("Location: /user?message=user_created");
} else {
throw new Exception($mli->getValue("error_saving")); // MLI translation - see below
}
} catch (Exception $e) {
$messageManager->addMessage($e->getMessage(), MessageType::ERROR);
}
}
// Print the form
print($form);
Security
Now, let's say I want to add some security to the User Archetype, such as encryption of the password. All I have to do is open up my settings file and add the following:
PHP Code:
$settings->archetype->encryption = array(
"user" => array(
"password" => new Cryptor(Cryptor::MI5, "mySalt")
)
);
MI5 is Qi's proprietary salted double-MD5 encryption. It's unhackable unless you know the salt.
MORE!
Qi has so much to it:
- Powerful Multi-template Templating (you can adapt almost any Drupal or Joomla template in minutes!)
- Multi-database connectivity
- SMTP Mail & Multi-part Mail Templating
- Easy to configure Multi Lingual Interface component
- File management
- Media management (images and video)
- Super-simple RSS feeds and aggregators
- More on the way!
Take a look and let me know what you think!