← All projects

Chat App

Chat App project preview

About the project

This was a semester-long project for my software architecture class. The class focused on thinking through the design before writing code. We were required to learn about design principles and apply patterns to the codebase. Our group consisted of three people, and we assigned each person a different area to work on. I worked on the backend, where I was responsible for implementing WebSockets.

Project flow

My role was to ensure that the WebSocket could send and receive messages on the backend, implement decoupling techniques using delegates and interfaces, and ensure that the code followed SOLID principles.


The ServerCommunicationCtrl class handles WebSocket communication and receives serialized tokens from the frontend. Each token is deserialized, and a switch statement selects an operation based on its contents. These operations include logging out, adding a contact, and starting a group chat. This class also handles synchronization between users to ensure that messages are displayed to everyone involved.


I also ensured that we applied the design principles taught in class. One key technique was using delegates to decouple the codebase and reduce reliance on inheritance. The sequence diagram below shows the communication between classes when a contact is added.


Challenges

The biggest challenge was getting used to designing the project before writing any code. This was a requirement, and it felt unfamiliar because we had never focused on software design this way before. It was difficult at first, but each milestone became easier because we had a strong foundation to build on.

What I learned

This project helped me think about software differently. Working on a project that required good design gave me a deeper understanding of why it matters. I have been able to apply these lessons during my internship, where these principles are also used.

Want to see more?

Browse all projects