Kata - It's like CakePHP, but with less calories
Kata is a lightweight PHP5
MVC-
Framework
that balances speed and comfort. It's in use for
pages with million of monthy pageviews, so it's a tried and true solution.
Unfortunately i
can't tell you where, i currently work there.
Hilights:
- Cache with support for memcached,apc,xcache,eacc,filesystem
- Models with Active Record (find() alike pattern)
- DBOs for mysql and mssql (postgres and simpledb coming soon), switchable on-the-fly back and forth
- Diverse debugging aids: code coverage, profiler, verbose output and so on
- A first: framework+webapp (+optional views) compileable into a single file for maximum code cache performance
- In the works: haXekata
- LGPL license.
Overview
Installation
You need:
» PHP5
» Apache (1.3 or higher)
» mod_rewrite
Download Version 1.1:
Zip,
Tar.
Uncompress it to a directory somewhere under your Apache webroot. If you are using
Linux set permissions
so that the user the webserver is running under is able to write to tmp/ and all
directories below tmp/.
$ cd /var/www/test/
$ chmod 644 tmp/ tmp/logs tmp/session tmp/cache
$ chown www-data:www-data ..
$ chown www-data:www-data * -R
Make shure the mod_rewrite extension is loaded. If you are running Windows
take a look inside your httpd.conf inside the Apache-Directory, if you are
using Linux try something like this:
$ ls /etc/apache2/mods-enabled/*rewrite*
/etc/apache2/mods-enabled/rewrite.load
$
Make shure AllowOverride is set to something that allows .htaccess files
to modify some of the permissions:
$ grep -i allowoverride /etc/apache2/sites-enabled/000-default
AllowOverride All
Now lets test if the framework functions. Open your webbrowser and take a look
if you can see the kata startpage (in the above case: http://localhost/test/)
Flowchart
Tricks with Kata
- If you have access to your Apache-Config, you can move the
docroot from / to webroot/, thus eleminating one .htaccess
your Apache has to parse from each Request.
You can speed up Apache further if you move the content of
webroot/.htaccess into your httpd.conf,
so Apache never has to read+parse that file on every request.
- If you have some php-script that can't be integrated into kata
(even using vendor() is not working in your case)
simply put it into the webroot-folder.
Example: You've put file file bar.php
into webroot/foo/. You can browse
that file by navigating to http://localhost/foo/bar.php.
- If you are using some external class that outputs something to the browser
and you dont want to use a view simply set $this->autoRender=false;,
echo your data and return from the controllers action.
Setup Eclipse for Kata
You just have to add support for .thtml files to Eclipse.
Take hte screenshots as reference how to do this.
My other projects
Comments
[ Frank Spychalski | 29.06.08 23:48 ]Nice! Next time I play around with PHP, I will give it a try....
[ Ben Milleare | 26.09.08 16:47 ]It's like a lean, mean, stripped down version of CakePHP. Love it!
[ slier | 24.12.08 22:31 ]looks quite promising..
will look into core code
Add comment