You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-10Lines changed: 9 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ The *Basic Messenger Demo* is a very simple instant messenger application based
5
5
6
6
This project includes a simple web client front-end for the *Basic Messenger Demo*.
7
7
8
-
As example of [Lightstreamer Adapters Needed by This Client](https://github.com/Weswit/Lightstreamer-example-Messenger-client-javascript#lightstreamer-adapters-needed-by-this-client), you may refer to the [Lightstreamer - Basic Messenger Demo - Java Adapter](https://github.com/Weswit/Lightstreamer-example-Messenger-adapter-java).
8
+
As an example of [Lightstreamer Adapters Needed by This Client](https://github.com/Weswit/Lightstreamer-example-Messenger-client-javascript#lightstreamer-adapters-needed-by-this-client), you may refer to the [Lightstreamer - Basic Messenger Demo - Java Adapter](https://github.com/Weswit/Lightstreamer-example-Messenger-adapter-java).
9
9
10
10
## Live Demo
11
11
@@ -17,11 +17,11 @@ As example of [Lightstreamer Adapters Needed by This Client](https://github.com/
17
17
18
18
The Basic Instant Messenger Demo shows an extremely simple version of a typical messenger, where messages can be delivered to a specific friend, chosen from a dynamic list of online buddies.
19
19
20
-
Choose a nick-name and click Login. You will see a list of all users connected to this demo, with their nicknames. Write a message and choose a recipient. The message will be delivered only to him/her (rather than broadcasting it, as the [Lightstreamer - Basic Chat Demo - HTML Client](https://github.com/Weswit/Lightstreamer-example-chat-client-javascript) does).
20
+
Choose a nickname and click Login. You will see a list of all users connected to this demo, with their nicknames. Write a message and choose a recipient. The message will be delivered only to him/her (rather than broadcasting it, as the [Lightstreamer - Basic Chat Demo - HTML Client](https://github.com/Weswit/Lightstreamer-example-chat-client-javascript) does).
21
21
22
-
Launch multiple instances of the demo, possibly on different machines, to populate the Buddies list. If you use the same nick-name on different instances, you will actually embody the same identity (to keep things simple, no authentication is used).
22
+
Launch multiple instances of the demo, possibly on different machines, to populate the Buddies list. If you use the same nickname on different instances, you will actually embody the same identity (to keep things simple, no authentication is used).
23
23
24
-
The front-end code can be considered a reference example of one-to-one messaging. Each user subscribes to their personal item (corresponding to the nick-name), so that messages can be routed properly, instead of begin broadcast (as in the [Lightstreamer - Basic Chat Demo - HTML Client](https://github.com/Weswit/Lightstreamer-example-chat-client-javascript), where all the users subscribe to the same item). In real applications, where authentication is used, the Metadata Adapter should enforce the association between the user's identity and the item they have the right to subscribe to.<br>
24
+
The front-end code can be considered a reference example of one-to-one messaging. Each user subscribes to their personal item (corresponding to the nickname), so that messages can be routed properly, instead of begin broadcast (as in the [Lightstreamer - Basic Chat Demo - HTML Client](https://github.com/Weswit/Lightstreamer-example-chat-client-javascript), where all the users subscribe to the same item). In real applications, where authentication is used, the Metadata Adapter should enforce the association between the user's identity and the item they have the right to subscribe to.<br>
25
25
26
26
The demo includes the following client-side functionalities:
27
27
* A [Subscription](http://www.lightstreamer.com/docs/client_javascript_uni_api/Subscription.html) containing 1 item, subscribed to in `DISTINCT` mode feeding a [DynaGrid](http://www.lightstreamer.com/docs/client_javascript_uni_api/DynaGrid.html) (showing all the personal messages).
@@ -31,14 +31,14 @@ The demo includes the following client-side functionalities:
31
31
<!-- END DESCRIPTION lightstreamer-example-messenger-client-javascript -->
32
32
33
33
## Install
34
-
If you want to install a version of this demo pointing to your local Lightstreamer Server, follow these steps.
34
+
If you want to install a version of this demo pointing to your local Lightstreamer Server, follow these steps:
35
35
* As prerequisite, the [Lightstreamer - Basic Messenger Demo - Java Adapter](https://github.com/Weswit/Lightstreamer-example-Messenger-adapter-java) has to be deployed on your local Lightstreamer Server instance. Please check out that project and follow the installation instructions provided with it.
36
36
* Download this project.
37
37
* Get the `lightstreamer.js` file from the [latest Lightstreamer distribution](http://www.lightstreamer.com/download) and put it in the `src/js` folder.
38
-
Alternatively you can build a `lightstreamer.js` file from the [online generator](http://www.lightstreamer.com/distros/Lightstreamer_Allegro-Presto-Vivace_5_1_1_Colosseo_20130305/Lightstreamer/DOCS-SDKs/sdk_client_javascript/tools/generator.html). In that case be sure to include the LightstreamerClient, Subscription, DynaGrid, and StatusWidget modules and to use the "Use AMD" version.
39
-
*Get the `require.js` file form [requirejs.org](http://requirejs.org/docs/download.html) and put it in the `src/js` folder.
40
-
* Deploy this demo on the Lightstreamer Server (used as Web server) or in any external Web Server. If you choose the former, please note that in the `<LS_HOME>/pages/demos/` folder there may be already a `MessengerDemo` folder. If this is not your case please create the folders `<LS_HOME>/pages/MessengerDemo` and copy here the contents of the `/src` folder of this project.
41
-
The client demo configuration assumes that Lightstreamer Server, Lightstreamer Adapters and this client are launched on the same machine. If you need to targeting a different Lightstreamer server please search in `js/lsClient.js` this line:<BR/>
38
+
Alternatively, you can build a `lightstreamer.js` file from the [online generator](http://www.lightstreamer.com/distros/Lightstreamer_Allegro-Presto-Vivace_5_1_1_Colosseo_20130305/Lightstreamer/DOCS-SDKs/sdk_client_javascript/tools/generator.html). In that case, be sure to include the LightstreamerClient, Subscription, DynaGrid, and StatusWidget modules and to use the "Use AMD" version.
39
+
* Get the `require.js` file form [requirejs.org](http://requirejs.org/docs/download.html) and put it in the `src/js` folder.
40
+
* Deploy this demo on the Lightstreamer Server (used as Web server) or in any external Web Server. If you choose the former, please note that in the `<LS_HOME>/pages/demos/` folder, there may be already a `MessengerDemo` folder. If this is not your case, please create the folders `<LS_HOME>/pages/MessengerDemo` and copy here the contents of the `/src` folder of this project.
41
+
The client demo configuration assumes that Lightstreamer Server, Lightstreamer Adapters, and this client are launched on the same machine. If you need to target a different Lightstreamer server, please search in `js/lsClient.js` this line:<BR/>
42
42
`var lsClient = new LightstreamerClient(protocolToUse+"//localhost:"+portToUse,"MESSENGER");`<BR/>
43
43
and change it accordingly.
44
44
* Open your browser and point it to: [http://localhost:8080/MessengerDemo/](http://localhost:8080/MessengerDemo/)
@@ -59,4 +59,3 @@ and change it accordingly.
59
59
## Lightstreamer Compatibility Notes #
60
60
61
61
- Compatible with Lightstreamer JavaScript Client library version 6.0 or newer.
0 commit comments