I previously blogged about my theories on separation of functionality and how I wanted to setup a RESTful app API methodology in the nexista PHP / XSL / XML framework .
Its now in motion and its working well. Here's some quick updates on the matter:
Lingering questions:
In other Nexista news, I hacked my way through adding configurable support for data access entities, aka custom table names and table name prefixes. It still needs some work, but the idea was inspired by the table prefix method used by Wordpress and many other great apps. With Wordpress on debian specifically, I really like how easy it is to create new database table prefixes based upon server name. Here's what I use:
<?php include('shared-config.php'); $specific_site = str_replace('.','',$_SERVER['SERVER_NAME']); $table_prefix = $specific_site.'_'; ?>
And shared:
<?php define('DB_NAME', 'mysql'); define('DB_USER', 'myisam'); define('DB_PASSWORD', ''); define('DB_HOST', 'localhost'); define('CUSTOM_USER_TABLE', 'wp_all_users'); define('CUSTOM_USER_META_TABLE', 'wp_all_usermeta'); $server = DB_HOST; $loginsql = DB_USER; $passsql = DB_PASSWORD; $base = DB_NAME; ?>
I'm starting to feel that Nexista is more of a web application framework than a php application framework.
Related: