Skip to content

Hodjy/FacebookMiniApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 

Repository files navigation

FacebookMiniApp

image

A Facebook app that showcases multiple uses of Design Patterns. Written in a C# college course. Written in C# and using Windows Forms.
This project is ment to show our understanding of Design Patterns, Class Diagrams, Sequence Diagrams, and Simple Threading.

The app uses Facebook's API with a premade wrapper that was given to us. The wrapper is old and outdated, thus some commands wont work due to new access limitations.

In this readme, we will show some of the Design Patterns we used in the project.

Design Pattern used:

  • Facade
  • Adapter
  • Proxy
  • Strategy
  • Command
  • Visitor

Facade:

Class Diagram:

image

Will seperate the subsystem from the front-end classes, and will simplify the commands while tailoring them for spesific front-end usage.

Proxy+Adapter:

Class Diagram:

image

The "User" class is as a Legacy Component, therefore we used an Adapter Design Pattern for the Proxy Design Pattern.
With Proxy Design Pattern we added extra features to the class "User" and turned it into a spesific class "LoggedInUser".
In addition, we can add more features in the future with ease.

Sequence Diagram:

image

(click to view in more detail)
Showcase the sequence of logging in. The process include using the Proxy class "LoggedInUser".

Visitor:

Class Diagram:

image

In order to implement "Dark Mode" for our UI, we used the Visitor Design Pattern.
We created a Proxy for each Windows Forms Legacy Component that we desired a dark mode functionability for.
With the Visitor Design Pattern we can add Dark Mode functionability with ease, and reuse its logic.

Dark Mode:

image

Sequence Diagram:

image

(click to view in more detail)
Showcase the sequence of pressing the "Toggle Dark Mode" button.

Command:

Class Diagram:

image

With the Command Design Pattern we created a "drop down menu" that we can swap between filter types with ease.
Instead of using naive methods such as "switch case" for user selection, and to make adding more filter types simpler and easier, we used the Command Design Pattern.

Filter Selection:

image

About

💻 A Facebook app with basic features. Heavy emphasis on UML diagrams and Design Patterns.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages