Non-visual components or client-to-server commands

Currently in echo2, echo only communicate with the server through visual components such as a button, a textfield, etc. Each one of these components essentially fires off some events that triggers a message to be sent to server side for processing. From the server side, however, we have browser commands that can send messages to the client side without any visual component.

Now, if I want to be able to send message to the server side from a client side javascript object, how should I do it?

I use echo2 embedded, and I would like to be able to have some non-echo javascript to trigger some "virtual" action for the embedded application instance in the page.

tliebeck's picture

They're called

They're called "Commands."

http://echo.nextapp.com/site/node/41

Echo2 and Echo3 have them. You implement a "Command" and then a "CommandSynchronizePeer" to execute it on the client.

Isn't "Commands" only good

Isn't "Commands" only good for the server to talk to client? How would you initiate a communication from client to server via commands?

tliebeck's picture

If you need to send messages

If you need to send messages back to the server, the only way to do so would be a non-visual component, or by writing some custom script that communicated with a custom Service. (The script could be sent to the client and started using a Command).

Commands are stateless and server-to-client only.

Is there any documentation

Is there any documentation on how to write and deploy a custom service? Where should I start looking?