mercredi 18 juillet 2018

Defining Singleton vs declaring in interface

I wanted to know is it an good idea to define my factory object in an interface or make an singleton factory for it.

Scenario: I have multiple factories which I want to have single instances, so should I create an singleton factory or should declaring then in an interface is also ok

I am building an api for other teams so can't use spring or guice.

Aucun commentaire:

Enregistrer un commentaire