I've got a Java application that is using a layered architecture, we have: presentation layer, business layer and data access layer. Our business layer uses the models to process the "requests". We are using the concept of "ViewModel", so every View-Action relation has its View. What is happening is that we have a lot of ViewModels. The number of files are kind of confusing but the real problem is that we are facing a name conflict problem.
This raised some questions:
- In this case we are using ViewModels in a layered architecture. Is this approach OK?
- Is it normal to face a high number of files?
- Is there any naming convention you use to make it clear to which View the model "belong" to?
- If a model is exactly the same for two views, should they be shared or should I have two different models that have exactly the same content?