NewPerson question about Chat server example

11 views
Skip to first unread message

Jack Park

unread,
Jul 20, 2011, 10:28:51 PM7/20/11
to lif...@googlegroups.com
All the screencasts, etc, say that ChatServer is an object, a singleton.

What if you want one portal to serve more than one chat conversation
at the same time. Does that argue that ChatServer must be a class and
that you then must create a way to save the larger state (who is in
which ChatServer instance)?

TIA
Jack

David Pollak

unread,
Jul 21, 2011, 1:48:06 AM7/21/11
to lif...@googlegroups.com
On Thu, Jul 21, 2011 at 3:28 AM, Jack Park <jack...@gmail.com> wrote:
All the screencasts, etc, say that ChatServer is an object, a singleton.

In the example code, it is a singleton.  There's no requirement that it be a singleton.  Just make lots of instances of lots of chat rooms and allow the user to select the appropriate on.

The example code is distilled into the key concepts of both Lift and Scala.  It's a starting point, not a destination.  It's also the minimum number of lines of code so that developers can focus on those key concepts and so that, when I give presentations, I can type the entire application.
 

What if you want one portal to serve more than one chat conversation
at the same time. Does that argue that ChatServer must be a class and
that you then must create a way to save the larger state (who is in
which ChatServer instance)?

TIA
Jack

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.




--
Lift, the simply functional web framework http://liftweb.net
Reply all
Reply to author
Forward
0 new messages