Re: Are PHP5 features worth it?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All the XML things are new

Start with DOM. If you know DOM in Browser you can use DOM in PHP5.
"AJAX" Webapplications are not possible in PHP4. The experimental DOMXML
in PHP4 is NOT standard conform and has DIFFERENT syntax than DOM in
Javascript.

To retrive data from AJAX is simple.

$data=file_get_contents('php://input');
$dom=domDocument::loadXML($data);

Using an iterator, it is easy to put this data to a database.

$elements=$dom->getElementsByTagName('whateveryouwant');
foreach($elements as $element){
...
}

XPath also helps a lot.
---
You can use and provide XML Comunication (Webservices) with the same
skills as you do  AJAX. Google for example has lots of Webservices that
are really useful. You can also connect to SAP Systems using XML for 
Data transfer...
This opens a new world.

And finally PHP5 has much better XSLT support than PHP4. It's still
experimental, but it uses libxslt which is a really good thing.
--
If you do real javascript programming (not only document.write and
innerHTML) there are lots of things you
can do in the same way in PHP5 and javascript.
Learn it once and use it Client- and Serverside - that's the good thing
in PHP5.

The bad thing is, that all this nice new things are hidden in the online
documentation. If you search for "getElementsByTagName" (a DOM Method)
you don't find it. The same with XSLT.

Bernhard

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux