¡@

Home 

java Programming Glossary: emailsender

Is it bad to use servicelocation instead of constructor injection to avoid writing loads of factory classes

http://stackoverflow.com/questions/1599811/is-it-bad-to-use-servicelocation-instead-of-constructor-injection-to-avoid-writi

to a constructor we use a factory class e.g. public class EmailSender internal EmailSender string toEmail string subject String body.. use a factory class e.g. public class EmailSender internal EmailSender string toEmail string subject String body ILogger emailLogger.. subject String body ILogger emailLogger ..... public class EmailSenderFactory ILogger emailLogger public EmailSenderFactory ILogger..