Framework list
Filter
MVC
minimal
library
routing
toolkit
ajax
shortlist
all
Submit
Add a new framework
.include-once.org
Filter
MVC
minimal
library
routing
toolkit
ajax
shortlist
all
Submit
Add a new framework
| kissmvc | |
title![]() | KissMVC |
description![]() | simple and minimalist MVC framework |
url![]() | http://kissmvc.com/ |
license![]() | MITL |
version![]() | 0.7 |
release![]() | 2008 |
size![]() | 12 |
language![]() | PHP |
documentation![]() | ☆ |
maturity![]() | stable |
development![]() | closed |
team![]() | single |
type![]() | mvc |
| kissmvc | |
coding.paradigm![]() | object-structured |
coding.names![]() | c_style |
coding.autoloader![]() | ![]() |
coding.debug![]() | E_NOTICE |
abstraction.level![]() | ![]() |
coding.unit_tests![]() | ![]() |
| kissmvc | |
modules.mvc![]() | ![]() |
modules.db![]() | ![]() |
modules.orm![]() | ![]() |
modules.crud![]() | ![]() |
modules.multidb![]() | ![]() |
modules.filedb![]() | ![]() |
modules.auth![]() | ![]() |
modules.cache![]() | ![]() |
modules.validate![]() | ![]() |
modules.filter![]() | ![]() |
modules.i18n![]() | ![]() |
modules.session![]() | ![]() |
modules.log![]() | ![]() |
modules.sandbox![]() | ![]() |
modules.benchmark![]() | ![]() |
modules.form![]() | ![]() |
modules.ajax![]() | ![]() |
modules.edp![]() | ![]() |
modules.plugins![]() | ![]() |
modules.dist![]() | ![]() |
modules.cli![]() | ![]() |
modules.scaffolding![]() | ![]() |
modules.rest![]() | ![]() |
| kissmvc | |
compatible.php![]() | php5 |
standard.html![]() | html4 |
compatible.app![]() | |
compatible.forks![]() | |
compatible.sql![]() | |
compatible.css![]() | |
compatible.plugin![]() | |
| kissmvc | |
security.db![]() | parameterized |
security.inputsanitization![]() | - |
security.outputescaping![]() | - |
security.auth![]() | |
security.admin![]() | |
| kissmvc | |
mvc.type![]() | Passive-MVC |
| kissmvc | |
routing.type![]() | front controller |
routing.rewriterules![]() | ![]() |
routing.dispatch![]() | ![]() |
routing.responder![]() | ![]() |
| kissmvc | |
model.type![]() | database |
model.db![]() | table |
model.backend![]() | PDO |
| kissmvc | |
view.type![]() | template |
view.backend![]() | php |
view.collect![]() | assign |
view.output![]() | variables |
| kissmvc | |
controller.type![]() | handler |
controller.helper![]() | |
| kissmvc | |
configuration.type![]() | array |
configuration.store![]() | files |
configuration.format![]() | php |
| kissmvc | |
ajax.type![]() | |
ajax.library![]() | |
| kissmvc | |
util.upload![]() | ![]() |
util.session![]() | ![]() |
util.cookie![]() | ![]() |
util.pagination![]() | ![]() |
util.http![]() | ![]() |
util.url![]() | ![]() |
util.mime![]() | ![]() |
util.permission![]() | ![]() |
util.debug![]() | ![]() |
util.localization![]() | - |
util.form![]() | - |
| kissmvc | |
http.negotiation![]() | ![]() |
http.conditional![]() | ![]() |
util.xml![]() | ![]() |
util.rss![]() | ![]() |
util.zip![]() | ![]() |
util.mail![]() | ![]() |
util.gzip![]() | ![]() |
util.captcha![]() | ![]() |
util.dom![]() | ![]() |
util.markup![]() | ![]() |
util.pdf![]() | ![]() |
util.images![]() | ![]() |
util.wysiwyg![]() | ![]() |
util.webdav![]() | ![]() |
| kissmvc | |
util.sitemap![]() | ![]() |
util.pingback![]() | ![]() |
util.rpc![]() | ![]() |
service.twitter![]() | ![]() |
service.google![]() | ![]() |
service.facebook![]() | ![]() |
service.openid![]() | ![]() |
service.cardspace![]() | ![]() |
service.oauth![]() | ![]() |
service.opensearch![]() | ![]() |
service.geo![]() | ![]() |
service.paypal![]() | ![]() |
| kissmvc | |
forum_from_framework![]() | ![]() |
popular_apps![]() | ![]() |
big_websites![]() | ![]() |
You can also update this entry, if you have more information.
KISSMVC provides 3 small classes:
* The Model class is a simple ORM that works on single database tables.
* The View class is a simple PHP templating system.
* The Controller class lets you use friendly URLs routed though a single index.php page.
KISSMVC provides a "Model" ORM class to let you map your database tables as PHP objects. It is built on PDO and thus requires PHP5.
Data objects that extend the Model class will gain the following 5 operations: Create, Retrieve, Update, Delete and Exists.
Say you have a database table named 'users', with the following fields: uid (autoincremented primary key), username, password, fullname, created_dt. The code below shows how your 'user' class can be defined:
<?php
class User extends Model {
function User() {
//call parent with primary key name 'uid', table name 'users'
//and function that returns the pdo handler named 'getdbh'
parent::__construct('uid','users','getdbh');
//list of table fields below, need not contain all fields in table. $this
->rs['uid'] = '';
$this->rs['username'] = '';
$this->rs['password'] = '';
$this->rs['fullname'] = '';
$this->rs['created_dt'] = '';
}
}
?>
This is how the Controller is called:
$controller = new Controller('../app/controllers/','/','main','index'); $controller->parse_http_request()->route_request();
In KISSMVC, the aim of the View is to help separate of your application logic from the presentation.
The templates are plain PHP files, and so normal PHP code can be used and the PHP global variables are accessible together with any extra variables you have passed in as a parameter in the form of an associative array.
How to use the KISSMVC View:
Say you have a template file named welcome.tpl.php with the following contents:
<html>
<head>
<title><?php echo $pagename;?></title>
</head>
<body>
<h1>Welcome <?php echo $username;?>,</h1>
<p>The time is now <?php echo date('Y-m-d H:i:s');?></p>
</body>
</html>
This is how you use call template file using a simple function call:
<?php
$vars = array('pagename'='Welcome!','username'='Eric');
echo View::do_fetch('/path/to/welcome.tpl.php',$vars);
Same result as above, but using object-oriented methodology:
<?php
$vars = array('pagename'='Welcome!','username'='Eric');
$view = new View('/path/to/welcome.tpl.php',$vars);
echo $view->fetch();
Yet another way:
<?php
$view = new View('/path/to/welcome.tpl.php');
$view->set('pagename','Welcome!');
$view->set('username','Eric');
echo $view->fetch();
Add a Comment