| 
 Posted by petermichaux on 10/12/05 16:11 
I am going to be very interested in this thread! 
 
I have been trying to develop a good application framework for a new 
web application: a sourceforge project called OSCommerce-XSL which is 
intended to be a  professional version of osCommerce. The goal is to 
use PHP to query an SQL database. The PHP produces XML for XSL to 
transform into XHTML. This transformation occurs server side. Optional 
Javascript validation of form inputs. Mandatory PHP validation of form 
inputs. 
 
So far I have divided the application into the following tiers 
View: XSL layer to produce XHTML from XML 
Controller: PHP takes URI requests. Validates form input. Produces the 
outgoing XML and passes it to the View layer once at the very end. 
Model-business layer: a purely PHP layer. No XML related function. No 
SQL or PEAR. 
Model-data layer: This layer exists to separate the SQL from the rest 
of the application 
 
About DB abstraction. With all the SQL dialects this really possible 
when queries get complicated? I use PEAR DB but if someone wanted to 
change from MySQL they might have to edit many of my SQL statements for 
the new dialect. 
 
Form Validation. Which tool kits are available and good? Currently I am 
using a PHP class pattern I designed for each form that can validate 
input and produce output. I am reasonably happy with what I have 
designed but I'm sure it could be better. 
 
Templating. I've tried Smarty but the XML/XSL combination seems much 
more powerful. With XML/XSL I like that the application flow is through 
the PHP control layer with only conversion using the View layer at the 
very end when serving the page to the client. With Smarty the 
application flows through the various template files and calls the PHP 
as needed. 
 
I haven't seen the MOJAVI project before and will spend some time on 
their website. 
 
If you are looking for a sample application to discuss I would gladly 
volunteer mine since I am at the right stage of development to do this 
kind of discussion. 
 
Peter
 
  
Navigation:
[Reply to this message] 
 |