- 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.
- Facebook Application Development with Graph API Cookbook
- Python程序設計教程(第2版)
- Testing with JUnit
- Android開發精要
- Python 深度學習
- 實用防銹油配方與制備200例
- QTP自動化測試進階
- Android 應用案例開發大全(第3版)
- JavaScript動態網頁開發詳解
- Haxe Game Development Essentials
- Node.js Design Patterns
- Android玩家必備
- Babylon.js Essentials
- Building Serverless Web Applications
- 深度學習入門:基于Python的理論與實現