Two places in preprocess.py and META_scraper.py are applied with Singleton Pattern. Singleton pattern is a creational pattern that allows only one instance to exist and provides a single and global access point for this instance.
Benefits: It prevents other objects from instantiating their own copies of the Singleton object, ensuring that all objects access the single instance so the security level may be improved.
The number of the instance can be clearly shown, which is easier to manage in future maintenance.
Two places in preprocess.py and META_scraper.py are applied with Singleton Pattern. Singleton pattern is a creational pattern that allows only one instance to exist and provides a single and global access point for this instance. Benefits: It prevents other objects from instantiating their own copies of the Singleton object, ensuring that all objects access the single instance so the security level may be improved. The number of the instance can be clearly shown, which is easier to manage in future maintenance.