分享
 
 
 

PHP 5, Oracle, and the Future

王朝java/jsp·作者佚名  2006-12-17
窄屏简体版  字體: |||超大  

PHP 5, Oracle, and the Future

PHP 5, Oracle, and the Future

PHP 5 (PHP: Hypertext Preprocessor Version 5) was officially released on July 13, 2004. Not surprisingly, the release was widely covered by the media due to the leadership role PHP plays in the Web application market. It is true that technologies such as .NET and J2EE have had more exposure and hype than PHP, but ease-of-use, performance, tight integration with the Apache Web server, and a large collection of application building blocks have made PHP one of the leading Web application development languages.

<?phpclass Person {var $name;function Person($name) {$this->name = $name;}function setName($name) {$this->name = $name;}function getName() {return $this->name;}}function lowerCaseName($obj){$new_name = strtolower($obj->getName());$obj->setName($new_name);}$obj = new Person("Andi");lowerCaseName($obj);print $obj->getName();?>

$objlowerCaseName()lowerCaseName()$obj

$obj->getParentObject()->method();

$temp_obj &= $obj->getParentObject();$temp_obj->method();

cloneclone $obj;__clone()

$ie = new COM("InternetExplorer.Application"); $ie->Visible = true; $ie->Navigate("http://www.php.net/");

__autoload()instanceof

<?phpclass MySingleton {static private $instance = NULL;private function __construct() {}private function __clone() {}static public function Instance() { if (self::$instance == NULL) {self::$instance = new MySingleton();}return self::$instance;}// ... Additional code for the MySingleton class.}

privateMySingletonself::$instanceprivate

changeStmt()

<?phpfinal class ImmutableQueryStatement { private $stmt; public function __construct($stmt) { $this->stmt = $stmt; } public function getStmt() { return $this->stmt; } public function changeStmt($stmt) { return new ImmutableQueryStatement($stmt); }}

finalchangeStmt()

It was decided to rewrite the XML support in PHP 5, and a few developers from the PHP community stepped up to make this rewrite a reality. The first and most important decision was that all XML functionality be based on the excellent libxml2 library from the Gnome's project. With this in mind, all three existing extensions were rewritten. Most important, the DOM extension was revamped and its interface redefined to be W3C-compliant. At the time of PHP 5's release, DOM was no longer experimental but full-featured and stable.

<clients><client> <name>John Doe</name> <account_number>87234838</account_number></client><client> <name>Janet Smith</name> <account_number>72384329</account_number></client></clients>

<?php$clients = simplexml_load_file('clients.xml');foreach($clients->client as $client) { print "$client->name account: $client->account_number\n";}

John Doe account: 87234838Janet Smith account: 72384329

With SimpleXML, accessing XML files becomes extremely easy. I have no doubt that SimpleXML will revolutionize the ease-of-use provided to the PHP developer for dealing with XML files. And if there are certain things SimpleXML cannot do, then due to the fact that both SimpleXML and the DOM extension use the same underlying library, the SimpleXML object can be converted to a DOM tree and more-advanced XML manipulations can be done in DOM. This conversion back and forth between SimpleXML and DOM is zero-copy, meaning it costs neither time nor additional memory.

<?php$client =new SoapClient("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl"); print($client->getQuote("ORCL"));

11.23.

(is a very interesting third-party project. It is a project that implements a proxy broker for SQL connections (including Oracle), allowing for connection pooling of database connections using PHP.

Using connection pooling, you can limit the amount of open connections to the database. Getting up and running with SQL Relay, although not trivial, is quite simple. I'd also like to note that the SQL Relay author was very responsive to my questions.

You have to use a different API than the PHP Oracle extension. Result sets are copied twice: first to the SQL Relay broker and then to PHP. You don't have as rich an API as you do when using PHP's native oci8 extension.

, by Wez Furlong, suffice to say that PDO is something to watch. PHP has been waiting for quite some time for good native database abstraction. I believe that PDO may very well be the solution we have all been waiting for. The designers of PDO are some of the lead developers of the PHP community, and I like their approach with PDO. The following is a list of their design goals, as written in the PDO README file:

Propel is a very interesting project and can come in handy. In addition, it is built on top of a database abstraction layer called Creole. Unlike PDO, this abstraction layer tries to mimic JDBC as much as possible and might be easier to use if you are converting existing Java code to PHP. That said, if PDO becomes mainstream and is distributed as part of standard PHP, it might be best to stick with that.

to define a standard on how to bridge between PHP and Java. Today the JSR's expert group comprises many software vendors, including Oracle. Although the JSR talks about all scripting languages, the initial interest was in PHP and mainly the possibility of calling Java code from PHP. You can guess that one of the primary motives for such connectivity would be to connect front-end PHP servers to back-end J2EE application servers and, more specifically, the ability to call Enterprise Java Beans (EJBs) directly from PHP code.

You can see that what you'll be able to do is write Java code in PHP. This should allow you to call any Java business logic you might have, specifically EJBs.

More specifically, I think Oracle users have a lot to look forward to. With Oracle's published Statement of Direction regarding PHP inclusion in future Oracle Application Server releases, it is clear that the company has recognized the importance of PHP technology. I believe that following this recognition will come a variety of solutions that will improve Oracle/PHP productivity and flexibility, both very much required in today's ever-changing market. The initial bundling of PHP in the upcoming version of Oracle 10g and the PHP extension for Oracle JDeveloper are significant first steps for widespread PHP support by Oracle.

PHP 5 Power Programming (Prentice Hall). He welcomes suggestions about PHP 5 at

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有