SOA和PHP
SOA和PHP
什么是SOA?
“SOA ( Service Oriented Architecture ,面向服务的架构)是一种新的面向服务架构的编程模型,号称“下一代软件架构”。 SOA 由 Gartner 在 1996 年提出的,到了 2002 年 12 月, Gartner 又提出了 SOA 是 “ 现代应用开发领域最重要的课题 ” ,并预计到 2008 年, SOA 将成为占有绝对优势的软件工程实践方法。
SOA就是服务的集合。从软件和业务功能两方面的观点看,服务就是定义良好的软件组件,它不依赖于任何调用它的应用程序的上下文或状态。
在技术上,定义这些服务以及它们到应用程序的接口,然后实现这些服务,是SOA的核心部分.这些服务通常被实现为Web Services,应用程序可以通过简单对象访问协议(Simple Object Access Protocol,SOAP)来访问它,基于HTTP协议以XML的形式进行传输.
从根本上说,SOA是服务接口的一种流和一种关系,设计接口及其关系需要熟练掌握Web技术、业务流程和服务下的技术平台以及采用它们的应用程序等方面的知识。架构师不仅必须了解如何构造Web服务,而且还要了解现有应用程序和计划未来使用的应用程序如何使用它们。
”
SOA和Web Services是比较大的概念,是一种规范(封装服务和提供服务的规范),它们降低了后台程序如何运行的重要程度。你可以用不同的编程语言和平台来并实现SOA和Web Services。甚至有人由此预计五年后JavaEE不再是主流的标准程序设计模型,因为Java EE太过复杂。很显然,如果我用简单的方式也可以实现SOA,那么为什么要用Java EE呢? 这就是平台的力量,平台的影响力总是大于应用,JavaEE是个小平台(对于一般的开发而言,它已经是个非常大的平台,但是技术和需要总是在不断发展的),而SOA是个大平台。从面向过程,面向对象,面向组件和面向业务各种编程模型,目前JavaEE大部份时候是在面向组件和面向业务之间,而SOA是面向业务,应该说对于企业应用非常有优势。
目前IBM可以说是SOA的主宰力量,我们可以看到它甚至在PHP方面也在大力推广SOA(IBM、Oracle 尝试把PHP 应用到SOA 之中),足见其野心之大。
我们看看IBM在PHP SOA方面的进展:
2005.7 IBM用PHP实现SDO并提交到PHP的PECL库
2005.12 IBM联合BEA、Oracle、IONA、SAP、Siebel、Sybase、Xcalia以及Zend公司,共同发布了两项针对SOA的重要编程模型规范??SCA(Service Component Architecture)和SDO(Service Data Object)。 注意,包括Zend公司。Zend和PHP的关系,就类似于Sun和Java。
2006.3 PHP SDO v 1.0.0 发布
2006.9 PHP SDO v 1.0.4 发布
2006.9 PHP SCA v 0.1.0 发布
详情请参看:
SOA PHP Homepage
其实单独地说PHP中的SOA并不是一件很有意义的事,因为那只不过是一个Java的移植,以现在PHP5的面向对象编程模型,基本上已经足够胜任,甚至有些方面更方便,因为PHP是弱类型和动态类型的语言(Type Juggling),在实现SDO时,写代码不用像Java那么烦琐(不需要写那么多geter/seter)。但是实现之后,能否推广起来?这种“抽象、松散耦合和粗粒度”的软件架构能否真正被接受?
光靠IBM的力量(可能还有Oracle、Zend)来发展PHP SOA,可以说是没有可能成功的。当然话又说回来,如果SOA发展很好,PHP SOA也一定会流行起来,也会有更多技术厂家加入。一个技术能否被接受,能否流行,很多情况下还是要看大环境。
参考:
SOA PHP Homepage
解读SCA/SDO ??SOA已进入实质阶段
An introduction to Service Data Objects for PHP
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1324113

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.
