I'm trying to refactor some code such that the display is separate from the implementation, and I'm not sure where to put the existing
My project is currently structured as follows:
- RemoteData (Depends on:
- LocalData (Depends on:
- RemoteWeb (Depends on:
- LocalWeb (Depends on:
I'm now trying to add "ViewLibrary (Depends on:
Utilities)" to this list, and then adding it as a new dependency to both
LocalWeb. It will contain a set of interfaces which the other two projects will implement, use to populate the view, and then consume the result.
enum which is currently used in all the projects except
Utilities. It thus lives in the
RemoteData project, because everything else depends on it. But this new
ViewLibrary won't depend on either data project. So how will it know about this
Some options I see:
- Create a new project just for shared enum values.
- Add it to
Utilities, even though it is related to data.
- Define it a second time in
ViewLibrary, and require both
LocalWebto convert the one type into the other when they access the shared views.
- Add a dependency on
ViewLibrary, even though it's supposed to be independent of data-source.
Are there any better options? Is this structure flawed to begin with?