Skip to the content.
Home Page
Class 06 Notes
Review, Research, and Discussion
- A singleton is an instance of a class that has one single reference to it and only refers to one other object.
- The singleton pattern can be used for making linked lists as well as making sure that your data flows one way like the React components we made in 301.
- The approach i would take to constructing middleware like express would be to make the information flow in one way. It sounds redundant to be saying this but having learned singletons makes me more prone to using it in the data structures that we are creating.
Terms
- Router Middleware: A router is a software module that helps direct paths for specific operations.
- Dynamic Module Loading: This means that modules and tasks are done dynamically by writing code that can accept random bits of information to fill gaps in code. Basically filling a variable with a value in order to complete some predefined processes.
- Singleton Pattern: This is the singular flow of data almost like iterating through a for loop.
- Mock Testing: This is testing used to see if your code will work. Using fake data to test functions.