COMP 310
Spring 2010
|
Lec33: Chat App
demos
|
 |
Today we will demo our chat apps and discuss the ways that people solved the
various problems that came up.
Some common problems:
- Creating the 2-way references between the room model/manager and the
room's view. -- using fields and closures to enable "lazy attachment" where
references are established before their values have been initialized.
- Serialization issues: when you can and cannot use anonymous
inner classes (bottom line: ok for Remote stubs but not for
transmitted objects).
- Using Iterable<T> objects in
for loops. (Easy!
for(T t: iterableOfT) {....})
- Put implementation specific code under
netid.controller, netid.model,
netid.view to avoid name clashes.
Othewise, Java will try to load the deserialized data from one class into
the class file stucture of a different class becaue they appear to have the
same name, e.g. model.ChatRoom.
- etc.
© 2010 by Stephen Wong