On 22 Sep 2002 at 13:52, Michael Sims wrote: > Well, that is basically my question. I considered both SOAP and > XML-RPC (which you mention later) but I wasn't sure what the impact on > performance would be. I am basically looking for anecdotal evidence > from people who have implemented this sort of thing before...
I was just looking at my software architect book ... not half-way through yet. Good book. CORBA is what is mentioned know, a bit different than SOAP but I don't know enough of either yet to say for sure. > with writing standalone scripts in PHP. I used Perl because for this > particular task it seemed better suited, and I wanted to get some more > Perl experience. In retrospect it was probably not the wisest decision, > and I probably have made things more complicated than necessary... Personally, I think you were correct. I cannt imagine just doing everything with one tool. But how to write PHP and your Perl so they can talk to each other. Dunno. IDL, CORBA .... but as you say, it sure would be good to hear from someone who's been here already. > >I don't know about that. Works well for me. I take an Amazaon XML feed > >and run it through my smarty templates with no problem here: > > > >http://www.readbrazil.com/books/amazon.php?mode=books > > > >please note that above site has been more of a php playground than > >anything else. > > That was just the impression that I picked up from my admittedly > limited research I did on XML support in PHP. I was focusing mainly on > XSL transformations though. > Do you mind if I ask how exactly you are parsing the XML in your PHP > pages? It seems to me that there are a few different options available > on www.php.net. There is the --with-xml option that uses expat, and Yes, I avoid XSL with the SABOLOTRON (or whatever it is) cus it's not in most virtual environments and that's a reason to use PHP over Perl, the ease of deployment. If I have my own box, heck, mod_perl is strong. Anyhow, I'm a lazy guy, avoid writing code at all costs :) include_once ( 'AmazonLiteXMLParser.inc'); // include_once ( 'AmazonAPI.inc'); // written by Daniel Kushner http://www.amazonlite.com/ And so my script is essentially this: $xml = new AmazonAPI(); $rxml = $xml- >keywordSearch($input['keyword'],$input['mode'],$input['page']); $parse = new AmazonLiteXMLParser($rxml); $records = $parse->getRecords(); for($i = 0; $i < sizeof($records); $i++) { for($inner = 0; $inner < sizeof($records[$i]['rating']); $inner++) { $records[$i]['reviews'][$inner]['summary'] = $records[$i]['summary'][$inner]; $records[$i]['reviews'][$inner]['rating'] = $records[$i]['rating'][$inner]; $records[$i]['reviews'][$inner]['comment'] = $records[$i]['comment'][$inner]; } unset($records[$i]['summary']); unset($records[$i]['rating']); unset($records[$i]['comment']); } $smarty->assign("BookLoop",$records); $smarty->assign($input); $smarty->display('book_index.tpl'); And that's it. > Thanks for your response, you've given me some nice food for thought. > I've heard of Smarty several times before but never looked into it. I > definitely will take a look at it now... If you continue to use Perl, look at Template::Toolkit. I use it for all sorts of things, everything, really nice. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php