Okay I gave this a go and went ahead and made some changes. Here's the link git.nzoss.org.nz/brian/poorexample This was a fun little thing. I'm interested to see part 2. I'm self taught but I have never used Spring Boot.
Peter is the former President of the New Zealand Open Source Society. He is currently working on Business Workflow Automation, and is the core maintainer for Gravity Workflow a GPL workflow engine.
You correctly moved the configuration of each sender into the senders themselves. You also correctly added a interface and modified the senders to implement this rather than disparate calls.
The one thing that could have been done better is in the 'Alert' package, where you have a AlertHandler which would need to be modified if another sender is introduced. Ideally you want to end up with a system where you can simply code a new type of sender and add it to the bean configuration.
I see exactly what you mean. I made it more complicated than it needed to be, your solution was much simpler. I'll have to see if I can find some 'refactoring challenges' online, because this seems like a good way improve my coding/critical thinking skills. Thanks for taking the time to look it over and giving your feedback.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Okay I gave this a go and went ahead and made some changes. Here's the link git.nzoss.org.nz/brian/poorexample This was a fun little thing. I'm interested to see part 2. I'm self taught but I have never used Spring Boot.
You correctly moved the configuration of each sender into the senders themselves. You also correctly added a interface and modified the senders to implement this rather than disparate calls.
The one thing that could have been done better is in the 'Alert' package, where you have a AlertHandler which would need to be modified if another sender is introduced. Ideally you want to end up with a system where you can simply code a new type of sender and add it to the bean configuration.
I see exactly what you mean. I made it more complicated than it needed to be, your solution was much simpler. I'll have to see if I can find some 'refactoring challenges' online, because this seems like a good way improve my coding/critical thinking skills. Thanks for taking the time to look it over and giving your feedback.