Am I right understand that Web interface generator only for static sites that do not have any JS for creation JS objects?
On Thu, 14 Sep 2017 10:49:46 GMT, Suliman wrote:
Am I right understand that Web interface generator only for static sites that do not have any JS for creation JS objects?
It is certainly meant more for dynamic sites. There are two examples with dynamic frontend code (web_ajax, web_websocket), but they don't communicate with JSON. You can, however, also return Json
from a method and it will be sent as JSON to the client and can be used with XHR requests to exchange objects.
Thanks! But when I should Web interface generator and when I should simply to render .dt
on different urls?
Am 16.09.2017 um 18:45 schrieb Suliman:
Thanks! But when I should Web interface generator and when I should simply to render
.dt
on different urls?
I'd usually always prefer the interface generator when doing anything
serious. Since it's always possible to simply define a method with (HTTPServerRequest, HTTPServerResponse)
parameters, it is a strict
superset of the basic router functionality, and on the other hand it can
save a lot of boilerplate code.
The more difficult question is sometimes the choice between web and REST
generators, because there are sometimes interfaces that are only almost
RESTful. But at least the communication between client code in the
browser and the server is almost always in the realm of the web
interface generator.