Ideal PHP framework [was: DataObject with ITX]
| From: | Diego Algorta Casamayou | Date: | Tue, 15 Apr 2003 16:55:13 +0000 |
| Subject: | Ideal PHP framework [was: DataObject with ITX] | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-4858@lists.php.net to get a copy of this message | ||
I've been watching your Report examples and it seems to be VERY usefull. I'll keep an eye on that.
But, I'm learning here. I have a new BIG project in hands and I want to write the most scalable code possible with PHP. That's why I'm looking for the best ways of solving common problems.
My final goal is to find a set of PHP libraries to choose and elaborate a framework integrating them all so I can write my app with that framework in mind.
This are the goals and the libs I've choosen so far:
-DBMS independence -> DB (PEAR) and possibly DB_DataObject to get a higher level of abstraction. Others?
-Layout independence -> HTML_Template_ITX (PEAR) or Smarty . I like Smarty's cache, but it seems like ITX is more standards oriented.
-i18n -> I didn't do any research yet, but I think PEAR has something helpfull too.
-Presentation layer independence -> It would be nice to be able to reuse my business rules PHP code and make 2 presentation layers, one GTK and one HTML_Template_ITX. Am I dreaming????? Anyway, this is not a MUST.
Anyone has suggestions here?
Thank you
Bytes
DAC
rocha@i-node.com.br wrote:
Hi,
Looks like you're trying to make a report. Take a look at
http://www.i-node.com.br/report. It can help you solve
this problem and future ones.
Nevre used DataObject with ITX, but i looks like your
code can be written like this:
$country = new DataObjects_Country;
$client = new DataObjects_Client;
// I want all countries, so we prepare a array with country as indexes.
$country->find();
while ($country->fetch()) {
// I want al clients from this country
$client->CouId = $country->CouId; //This is the Country ID
$client->find();
while($client->fetch()) {
$clientArray[$country->CouId] = $client->toArray();
}
}
// Then we make the report:
$report = new Report($clientArray, '.' , 'clientsPerCountry.tpl.html'); $report->setTitle('country', 0); $report->setBlockValueName("client");
$report->makeReport();
$report->show();
Didn't test it, so may need some fix to work, but that is the
basic idea.
Regards
S.Rocha
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/