For a performance monitor I've implemented a MVC in Java and have decided to split up my Model into separate classes, now I'm torn between sorting its attributes and functions into Client
, Server
and Connection
Model classes or Benchmark
, Logging
and Specs
Model classes.
The former Models would match the real life counterparts as "objects", as they are the separate entities the application will monitor. Due to how the MVC works with an observer, a benchmark function from my controller would trigger updates in all my Models.
The latter would solve this wide-spread updating by making Models match the functionality(requirements) more, thus only updating models that need to be updated, triggering only View-updates that need to be modified. I think this approach would decrease my Model's re-usability though.
Classes should touch reality, but not reach it. If you were to stay on an absolute abstract level, your model would not be able to reach some kind of realization. When you model your domain you start with business objects that directly relate to (physical) objects in reality. Once you start designing a system you will derive a class model from the business model which is somehow linked. Usually you create dependencies from your system class design to the according business objects and you will also find a naming-parallel. The coupling between business and design model is loosely (dependencies) but existent. Each business object must have some trace to the design model. There will likely be more classes in the design model than in the business model.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With