Webchat updates
Tuesday, 3. June 2008, 21:58:39
So, it's been quiet for a while (though no one ever visits, so nevermind). I have made some updates to my webchat. I'll be quick. New enhancements of the chat as I can remember:- New look
- Server sends the data to the client in JSON form
- Text formatting (not sure how it is called, but you can use *bold*, _underline_ and /italic/)
- Auto-resize the input field for screen size (togglable)
- Settings "window" (small movable popup-thingamajig) for font and stuff
And btw, I left debugging on, so you can see all the data sent (POST) and received (JSON).
JSON
JSON part here is the biggest thing under the hood, I guess. It is basically a data format like XML, but suits better for Ajax applications since it's minimalistic.
JSON packet example received from the server:
{"messages":
[
{"type":"rooms","roomlist":
[
{"name":"<roomName>","passRequired":"0"},
{"name":"<roomName>","passRequired":"1"},
]
},
{"type":"system","text":"<text>","color":"<color>"},
{"type":"msg","user":"<nick>","text":"<text>","time":"<time>"},
{"type":"users":"userlist":
[
{"user":"<nick>","color":"<color"},
{"user":"<nick>","color":"<color>"},
]
},
]
}
Upcoming
Something I expect to do in the future:
- Implement Prototype framework
- Make the interface class-based, so maintaining is easier
- Have more developers (?)
- Database version (!)
- Support for external domain usage (actually, it is already theoretically possible)
- File-share
- Registration, user-levels etc
So, lately I have been studying Prototype Javascript framework. In the near (or not-so-near) future I plan to add it more in use. I already have a test build which uses it for certain stuff. Maybe some reader has some other recommendations...
Though, right now I should design the database for this all. So, hmmm...
One interesting concept would be external domain usage of this chat and custom user interfaces. As the interface mostly consists of Javascript and CSS, it shouldn't be too hard to implement it. Maybe I should first make some chat "framework" first. Hmm... The endless possibilities...
Teh future
In the future the purpose of this chat is probably be open-source, customizable, feature-rich and easily deployable webchat. You could choose from two options: hosting the whole system in your website OR implementing only an interface to use centralized system.
Anyone interested is welcome to come and pinch me (not too hard), developers and users equally.
Ta ta, for now.






How to use Quote function: