Content deleted Content added
No edit summary |
m Dating maintenance tags: {{Clarify}} |
||
(43 intermediate revisions by 35 users not shown) | |||
Line 1:
{{More citations needed|date=February 2022}}
In [[distributed computing]], '''code on demand''' is any technology that sends executable software code from a server computer to a client computer upon request from the client's software. Some well-known examples of the code on demand paradigm on the web are [[Java applet]]s, Adobe's [[ActionScript]] language for the [[Adobe Flash Player|Flash Player]], and [[JavaScript]].<ref name="Is Code Still Moving Around">{{cite book|last= Carzaniga|first=Antonio|author2=Gian Pietro Picco |author3=Giovanni Vigna |title=29th International Conference on Software Engineering (ICSE'07 Companion) |chapter=Is Code Still Moving Around? Looking Back at a Decade of Code Mobility |year=2007|publisher=IEEE Computer Society|___location=Washington, DC, US|pages=9–20|url=http://dl.acm.org/citation.cfm?id=1248922|doi=10.1109/ICSECOMPANION.2007.44|isbn=978-0-7695-2892-2|citeseerx=10.1.1.119.5295|s2cid=8728428 }}</ref>
Code on demand is a specific use of [[mobile code]], within the field of [[code mobility]].<ref name="Understanding Code Mobility">{{cite journal|last=Fuggetta|first=Alfonso|author2=Gian Pietro Picco|author3=Giovanni Vigna|year=1998|title=Understanding Code Mobility|url=http://www2.computer.org/portal/web/csdl/abs/trans/ts/1998/05/e0342abs.htm|journal=IEEE Transactions on Software Engineering|volume=24|issue=5|pages=342–361|doi=10.1109/32.685258|issn=0098-5589|accessdate=29 July 2009|citeseerx=10.1.1.20.3442}}</ref>
[[Category:Network-related software]]▼
== Constraints ==
=== Client-server ===
The first constraint is that the system must be made up of clients and servers.
Servers have resources that clients want to use. For example, a server has a list of stock prices (i.e. a resource) and the client would like to display these prices in some nice graphs.
There is a clear separation of concerns between the two. The server takes care of the back-end stuff (data storage, business rules, etc.) and the client handles the front-end stuff (user interfaces).
=== Stateless ===
To further simplify interactions between clients and servers, the second constraint is that the communication between them must be stateless.
This means that all information about the client’s session is kept on the client, and the server is completely unaware. The consequence is that each request must contain all information necessary to perform the request (i.e. it cannot rely on any context information).
=== Cache ===
The last constraint on the client-server communication is that responses from servers must be marked as cacheable or non-cacheable.
An effective cache can reduce the number of client-server interactions, which contributes positively to the performance of the system. At least, from a user’s point of view.
=== Code on demand ===
Code on demand (COD) is the only optional constraint in REST. It allows clients to improve their flexibility because it is the server which decides how certain things will be done. For instance, with code on demand, a client can download a Javascript, Java applet or even a Flash application in order to encrypt communication so servers are not aware of any encryption routines / keys used in this process.{{Clarify|date=June 2024}}
However, using COD reduces visibility, hence the optionality. Also, not every API needs this kind of flexibility.
==See also==
*[[Remote evaluation]]
*[[Code mobility]]
== References ==
<references/>
{{Authority control}}
{{Use dmy dates|date=June 2024}}
{{DEFAULTSORT:Code On Demand}}
[[Category:Software distribution]]
|