Hi Srikanth Venkatesh,
On 25.01.2016 07:22, Srikanth Venkatesh wrote:
> 2. Not clear on this part still - ScheduleType enum is a core part of
> the schedules module and it defines the types supported by schedules
> module. (Refer diagram) Every higher level user of schedules module
> needs services for a subset of types in ScheduleType. So, If
> ScheduleType is defined in domain instead of schedules module, another
> higher level module wanting to use the schedules module will have to
> depend on the domain module... That's bad, right? How do I solve this?
> Enum is a bad data structure choice here?
I have a feeling, that the problem here is a different one. You
mentioned, that there are different modules that are different subsets
of those schedules. So maybe there shouldn't be a single interface, but
multiple ones, each one specific to each client module. Then the
schedules module could implement all of them, but each client would only
know the part it is interested in. I cannot tell though, if that's
possible or desirable, because I don't know how much overlaps there are.
If none or little, you could try to go the way I described. If not maybe
your design is OK, just your business requirements are forcing you to go
this way. As always, there are compromises to make, just try to select
the best/least awkward one.
--
Pozdrawiam / Best regards / Mit freundlichen Grüßen
Jacek Bilski