cse210-works-on-my-machine / CSE210-Fall23-Team-3

Repo for Team 3 in CSE210 for the Fall 2023 quarter.
2 stars 0 forks source link

Javascript refactoring #37

Closed BirdyYao closed 10 months ago

BirdyYao commented 10 months ago

Key points:

  1. apply idea of separation of concerns - split fetch posts from display posts.
  2. apply idea of factory pattern - add a basic factory for initializing fetcher and display in terms of different instances.

Pros:

  1. increased modularity and cohesion
  2. should be able to "plug-in" new fetchers and displays for other instances
  3. easier for writing unit test since separation of concerns

Cons:

  1. existing unit test need to be refactored
  2. lakshya's improvement on slow loading of Mastodon posts won't work since total separation of fetch and display.

TO-DOs:

  1. unit testing
  2. fix slow loading of Mastodon posts
sapiosaturn commented 10 months ago

noticed the folder is called fecther, small issue but should fix that