Question: Should I have a common data access API between various cross platform applications or keep the data access specific to the UI even though it would result in duplication?
Background: I’ve been developing various applications many with sub applications to interact with various pieces of our internal services. I basically have a desktop application that holds all these smaller applications / features and allows them to be used in a Launcher – almost MDI (but not) style and a web application that has various subset applications inside for our mobile devices. We’re getting to the point where many of our applications will have a desktop and mobile version of them and I’m curious about the best way to structure this. Currently I have a large common class library that stores all my data access in the form of an API which basically interacts with an internal DATA CONNECTIONS class inside the common class library alongside various common helper methods.
Additional: Primary data access is Entity Framework which requires a NuGet package for each project using the common class although I also have various manual data access methods as well. One of the concerns I have is that my naming scheme is messy I feel like by having the UI structured by “Application Name” and then having duplicate folders in my common classes also structured by the same name. Basically, looks like this: