- Building RESTful Web Services with PHP 7
- Haafiz Waheed ud din Ahmad
- 203字
- 2021-07-03 00:02:16
Code on demand (optional)
This states that the server can add more functionality to the REST client, by sending code that can be executable by that client. In the context of the web, one such example is JavaScript code that the server sends to the browser.
Let's consider an example to understand this better.
For example, a web browser acts like a REST client and the server passes HTML content that the browser renders. At the server side, there is some sort of server-side language which is performing some logical work at the server side. But if we want to add some logic which will work in the browser then we (as server-side developers) will have to send some JavaScript code to the client side and the browser and then execute that JavaScript code. So that the JavaScript code can add validation to a form, some animation or anything else, that couldn't be possible simply in HTML content. That JavaScript code is code on demand which the server sends to the client that extends the functionality of the REST client.
Note that sending code on demand to the client is optional, and not required if we don't want to extend the client's functionality.
- 高手是如何做產品設計的(全2冊)
- Python自動化運維快速入門(第2版)
- Rust編程從入門到實戰(zhàn)
- Learning Elixir
- R語言編程指南
- Mastering C# Concurrency
- Big Data Analytics
- 第一行代碼 C語言(視頻講解版)
- 搞定J2EE:Struts+Spring+Hibernate整合詳解與典型案例
- JavaScript應用開發(fā)實踐指南
- Visual Basic程序設計全程指南
- AngularJS UI Development
- Swift Essentials(Second Edition)
- Learning Java by Building Android Games
- Learning Ext JS(Fourth Edition)