mercredi 21 février 2018

Seperation of UI Laye from the domain layer

In the book Applying UML and Design Patterns, it is written that in a layered system, we delegate requests from the UI layer to the domain layer. An example of this is: If someone enters something in window and requests an operation on this newly input then this request should be delegated to domain/logical layer.

This is ok but suppose i want to show the result back in a window after adding two numbers for example, in this case , my domain/logical layer must know about the UI layer interface and then my representation is not independent of the view.

How do i solve this problem?

enter image description here

Is it possible to avoid birectional association between UI and Domain Layer? The problem is that the requests from users are caught in GUI and then these must do some calculations and update GUI.

Aucun commentaire:

Enregistrer un commentaire