- 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.
- Go Web編程
- Mastering Julia
- Rust Cookbook
- Learning Python Design Patterns(Second Edition)
- Java程序設計與實踐教程(第2版)
- IDA Pro權威指南(第2版)
- Visual Basic 程序設計實踐教程
- 軟件測試分析與實踐
- Java 9 with JShell
- jQuery Mobile Web Development Essentials(Second Edition)
- Go Systems Programming
- Microsoft Dynamics GP 2013 Cookbook
- Java EE 7 Development with WildFly
- 深入理解MySQL主從原理
- Learning Rust