Home Backend Development PHP Problem What does php webservice mean?

What does php webservice mean?

Aug 17, 2020 am 09:09 AM
webservice

php webservice is a very heavy-duty specification. Its application protocol is SOAP. The underlying communication method it relies on is not only HTTP, but also SOAP over SMTP and SOAP over TCP. The HTTP protocol has a wide mass base and is easy to develop and debug. convenient.

What does php webservice mean?

Recommendation: "PHP Video Tutorial"

mentioned PHP webservice. It was relatively new to me before, because I had little contact with it, and I had never used it in almost any company. The only time I had used it seemed to be to access a third-party SMS channel, using SOAP|WSDL.

A very extreme statement that "webservice" is outdated is true:

1 WebService has many protocols, why is HTTP more popular?

WebService is a very heavy specification. Its application protocol is SOAP (Simple Object Access Protocol). The underlying communication method it relies on is not only HTTP, but also SOAP over SMTP, SOAP over TCP. Because the HTTP protocol has a broad mass base and is easy to develop and debug, it has become the most popular method in WebService.

Even many companies use HTTP for intranet communications. For example, applications call search engines. Solr is an example.

But HTTP is also a protocol with poor performance over TCP, because HTTP is based on TCP and has 3 handshakes. In addition, HTTP is a text transfer protocol (although binary attachments can also be transmitted, the business logic is still Text is used a lot), and there are many complex HEADERs. Therefore, people have invented some more efficient communication protocols for remote calls, such as ACE, ICE, Corba, and Taobao's HSF, but this is a topic for another time and I will not go into details. All you need to know is that the reason why HTTP is popular is that it is easy to use and has a broad mass base.

2 Why WebService is not as popular as RESTful API

WebService has been around for more than ten years. At first, IBM and Microsoft were more enthusiastic about promoting it, but it has always been tepid. On the contrary, XML-RPC, RESTful and remote calling methods that are simpler than RESTful have caught up from behind. Does it feel a bit like folk Spring killing official EJB?

The reason is that WebService is too bulky. The SOAP envelope is like a mother-in-law's foot wrap, smelly and long. Most developers can't bear it, so they have a simplified version called XML-RPC later became popular with Web2.0, and RESTful took the lead. I built a product 10 years ago, pure PHP JS, standard WebService. Even the WSDL I had to write a PHP program to generate. Fortunately, I was the only one to develop it. If it were a team collaboration, I would have been scolded a long time ago. Humanoid.

Later, even RESTful was despised, and everyone simply didn’t even bother to use PUT and DELETE, and used GET and POST directly.

At the same time, I have to say that this is only in the Internet field. The business logic of most companies is relatively simple, and the construction period is abnormally short (just like most Internet startups use rough and fast PHP instead of Relatively rigorous Java). In some areas where the business is complex and the stability and accuracy requirements are high (such as ERP, e-commerce, payment), WebService still has its place.

3 Why JSON is more popular than XML

It is also about ease of use. JSON is several Chang'an Streets more readable than XML, and the parsing rules are much simpler. There are too many rules when parsing XML, including illegal characters and exceptions. This is a fatal flaw for companies that pursue high development speed and low development thresholds.

The disadvantage of JSON is that it has less data type support and is imprecise. For example:

price:12580

In json, you cannot know whether the price is int, float or double.

So, as mentioned in the second article above, XML is more suitable in some areas with higher business requirements.

Finally, let’s talk about performance. The performance of JSON is higher than that of XML. In addition, there is no performance difference between WebService based on XML and HTTP, and RESTful API based on JSON.

XML performance is so bad, there is a special CPU called XML Accelerator, which provides hardware acceleration for XML parsing.

The above is the detailed content of What does php webservice mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8 JIT (Just-In-Time) Compilation: How it improves performance. PHP 8 JIT (Just-In-Time) Compilation: How it improves performance. Mar 25, 2025 am 10:37 AM

PHP 8's JIT compilation enhances performance by compiling frequently executed code into machine code, benefiting applications with heavy computations and reducing execution times.

PHP Secure File Uploads: Preventing file-related vulnerabilities. PHP Secure File Uploads: Preventing file-related vulnerabilities. Mar 26, 2025 pm 04:18 PM

The article discusses securing PHP file uploads to prevent vulnerabilities like code injection. It focuses on file type validation, secure storage, and error handling to enhance application security.

OWASP Top 10 PHP: Describe and mitigate common vulnerabilities. OWASP Top 10 PHP: Describe and mitigate common vulnerabilities. Mar 26, 2025 pm 04:13 PM

The article discusses OWASP Top 10 vulnerabilities in PHP and mitigation strategies. Key issues include injection, broken authentication, and XSS, with recommended tools for monitoring and securing PHP applications.

PHP Encryption: Symmetric vs. asymmetric encryption. PHP Encryption: Symmetric vs. asymmetric encryption. Mar 25, 2025 pm 03:12 PM

The article discusses symmetric and asymmetric encryption in PHP, comparing their suitability, performance, and security differences. Symmetric encryption is faster and suited for bulk data, while asymmetric is used for secure key exchange.

PHP Authentication & Authorization: Secure implementation. PHP Authentication & Authorization: Secure implementation. Mar 25, 2025 pm 03:06 PM

The article discusses implementing robust authentication and authorization in PHP to prevent unauthorized access, detailing best practices and recommending security-enhancing tools.

What is the purpose of prepared statements in PHP? What is the purpose of prepared statements in PHP? Mar 20, 2025 pm 04:47 PM

Prepared statements in PHP enhance database security and efficiency by preventing SQL injection and improving query performance through compilation and reuse.Character count: 159

PHP API Rate Limiting: Implementation strategies. PHP API Rate Limiting: Implementation strategies. Mar 26, 2025 pm 04:16 PM

The article discusses strategies for implementing API rate limiting in PHP, including algorithms like Token Bucket and Leaky Bucket, and using libraries like symfony/rate-limiter. It also covers monitoring, dynamically adjusting rate limits, and hand

What is the purpose of mysqli_query() and mysqli_fetch_assoc()? What is the purpose of mysqli_query() and mysqli_fetch_assoc()? Mar 20, 2025 pm 04:55 PM

The article discusses the mysqli_query() and mysqli_fetch_assoc() functions in PHP for MySQL database interactions. It explains their roles, differences, and provides a practical example of their use. The main argument focuses on the benefits of usin

See all articles