Hi,

I do not in any way intend for this thread to be a rant of 'To Use' or 'Not to Use' templates OR XLST for that matter. I have already made up my mind, and I feel that PHP in itself is a worthy template engine. (FYI, For the XSLT Fans, The Server I have does not have Sablotron compiled - php v. 4.1.?)

Being that, I would like to Separate my Application Logic from my Presentation Layer.

I have gone through some threads on this forum (only forum I'm aware of with any real information on this topic (PHP based)). There were a few very interesting threads that I have printed / saved and studied.

Anyways, I would really like to have a Class for instance a Books Class that would possible extend a Page Class?

Here is what I have: (Using Eclipse):

PHP Code:
// Require The Application Data
require_once("application/init.php");

$db =& new MyDatabase(DB_DATABASEDB_SERVER);
$db->connect(DB_USERDB_PASS);

$sql ="SELECT * FROM test";    

$resultSet $db->query(& $sql);
$iterator =& new QueryIterator($resultSet);

while(
$row $iterator->getCurrent())  {
    
    echo 
"<p>Book Title: <b>" $row['BookTitle'] . "</b><br><br>";
    
$iterator->next(); 


$db->disconnect();

echo 
"<b><p align=center>This is the End</b></p>"
As you can see, I have HTML in my Logic.
I just did this to make sure I got the freakin thing working. It was pretty easy enough.

How would I go about separating this??? OOP of course.

Please Note: I have looked in DAO and MVC. Are there other alternatives???

Thanks!!!!
And Sorry for the ignorance.