-
-
Notifications
You must be signed in to change notification settings - Fork 17
Feature/trblock #637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Feature/trblock #637
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't wait to see this go live :)
import java.util.logging.Logger; | ||
|
||
@Singleton | ||
public class TRBlockManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good
But I doubt if having TRBlockManager and TRBlock would make sense since they seem to be doing closely related jobs
If the concern is executing public boolean start()
only once, we could put that into initialize()
directly instead.
If you prefer having multiple layers of abstraction (which is good), consider creating TRBlock as an interface and creating the TRBlockImpl
class which implements the TRBlock interface. In this way, we can avoid depending directly on Javalin. Or it doesn't have to be TRBlock
but some more generic name like TRBlockWebServiceProvider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i got it
@wysohn how about like this? |
Pretty close, but not quite Here is how I envisioned: Before) After) So the point is that in 'before' scenario, TRBlockManager, which is part of TriggerReactor, depends on TRBlock, and TRBlock depends on Javalin, and this makes our project strongly depending on the changes of Javalin Instead, we let TRBlockManager to depend on TRBlockWebService |
I understood |
@wysohnI'm not sure if I understood well, but is this what you meant? |
Yes exactly! As a minor point, the interface name can be If you prefer to add postfix, Ipml, then |
No description provided.