I developing a Skype-Clone chat application, and wanna use Mediator Pattern or Observer Pattern.
But, what is the different between those 2 patterns ? After hours of searching and reading, still confusing about it, so :
1. What is the main different between Mediator and Observer ?
2. With a chat application, which one is the best choice ?
3. If my question is wrong, please give me some advises how the real-world do with chat applicattion (architect, pattern...).
P/s: The main idea of my application is :
- User can view who is online
- User can communicate (chatting, sending files...) with another Users in seperate window
- If more than 2 Users in 1 "Chat-Room", when 1 User send data (text, file...) to Server, Server will "broadcast" those data to another Users in the Room (except sender)
I know how to "communicate" between Clients, but how the real-world do it ? Please help me, and thanks for reading.