Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li>Using nodejs on your server is the only way I know of where both server and client could read a single js file. The folks developing the Cordova js library for mobile app UI interaction have been working around the syntax pattern of require js to make their files readable by both client (browser) and server (node js). My app doesn't use any variety of this architecture so I can't speak to it fully, but I'll be perusing this possibility for my next coding upgrade. </li> <li>I'm not sure what you mean by define user interaction. For event listeners, trial and error ( &amp; stackoverflow) has taught me to use object.addEventListener() for cross browser and cross device compatibility. For remote calls to the server I like to create a helper method that proxies all the calls for me. I find this to be the easiest way to process all the success and error messages returned by my server. </li> <li>If you have control of your end user (such as an intranet) and you can reasonably assume everybody is using a modern browser, the XMLHttpRequest() will do the job nicely. If you don't have that kind of control, and need to support older versions of IE, I'd suggest using a library such as jQuery ($.ajax()). All that is assuming you want to use the AJAX design pattern. Websockets are all the new rage and offer better response time when making a call to the server. Websockets are complex to set up and work on a completely different model. With AJAX, you make a call to the server and in turn get a response. With websockets, you "subscribe to a channel" and messages are sent and received independently. That means client A can send some info to the server and then the server can send that same data to client B without client B asking first. I know there are some libraries out there you could use for python that i ran across during my own research several months back. When using AJAX I prefer to POST data when I have control of the server to make it slightly less easier to see the data for unskilled hackers. To package my data, I like to use native js Dom methods to build JSON objects because I'm OCD about validating form data before sending it. And, then I use JSON.stringify() to make my data ready for sending. </li> <li>Don't fully understand the question. What is the scope of your object on the server? Application level, client level, user level? That could be handled many different ways depending on the application needs. if you are using websockets as your communication technique, your server can send updates automatically without first requesting from the browser. If using AJAX you client will have to ask for updates or use a technique such as long-polling to simulate websocket like communication. </li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload