I am trying to do the architecture of a new application we are building. We wanted something quite modular. Considering we are open source and we want other people to be able to easily add new features, we opted for a component based architecture.
We have a back end that is made in Java, and a front end that will be made with JavaFX and an other front end which is a website. We want the back end to be the same for users that use our application through a website or through a mobile/desktop device (JavaFX). All of my team, including me, are students and do not have a lot of experience designing new software.
The problem I am facing is that I want to split main features in packages, so they form components that work independently of the front end and can be easily be modified. The thing is that sometimes, different components will interact with the same model. Let me illustrate my problem so you can understand better.
This would be a very partial overview of my IntelliJ project structure:
-/src/main/java/com/ourDomainName/ourAppName -/ApplicationCore -/DriversCore -/LoggingCore -/Signal.Java -/ParsersCore -/Signal.Java
ApplicationCore would be the package that holds all the back end.
ParsersCore are packages that all represent a feature. They are components. I want
LoggingCore to both use a certain
Signal. My question is where should I put said file? This situation doesn't just apply to one file, there are many files in my
model that I want different components to use. I know many will just say that I should have a package called
model and put all my
model there, but from what I've seen, I should keep all the model relative to a component in the same package as that component. So, what exactly is the procedure when you have many
model classes that you want to be shared across different components?