Why should I isolate my domain entities from my presentation layer?

后端 未结 14 2773
南旧
南旧 2020-12-02 04:07

One part of domain-driven design that there doesn\'t seem to be a lot of detail on, is how and why you should isolate your domain model from your interface. I\'m trying to c

14条回答
  •  情书的邮戳
    2020-12-02 04:50

    Perhaps you are not conceptualizing the UI layer in broad enough terms. Think in terms of multiple forms of response (web pages, voice response, printed letters etc) and in terms of multiple languages (English, French etc.).

    Now suppose that the speech engine for the telephone call-in system runs on a completely different type of computer (Mac for example) from the computer that runs the website (Windows perhaps).

    Of course it is easy to fall into the trap "Well in my company we only care about English, run our website on LAMP (Linux, Apache, MySQL and PHP) and everyone uses the same version of Firefox". But what about in 5 or 10 years?

提交回复
热议问题