In books about DDD, there are so many emphasis on making the code model and analysis model the same (or related). I'm currently reading Patterns, Principles, and Practices of Domain-Driven Design, here's some quotes:
...the code model and analysis model are one, and a change in one will result in a change to the other.
Domain experts and business analysts understand the code model and help to shape it.
Use the [ubiquitous] language to drive the design of your code.
I find this a little bit confusing because sometimes the model in code can be quite different with the analysis model. There are things like design patterns and software architecture. If those can be used, does that mean that business analysts have to understand about it as well and use it in their analysis model?
In the code, the developer is focused on technical abstractions, design patterns, and design principles, whereas the domain expert is focused on business process and work flow. This is problematic. Developers should think in domain terms and concepts, not technical terms, to avoid the need to translate from business jargon into technical jargon.
This seems to suggest to avoid design patterns altogether and to code based on the model that's agreed within the team. What if the analysis model is not performant when implemented in the code?
How much the code model have to resemble the analysis model?
No, it's not the intention. They emphasize using domain terms. For example, ProductFactory is wrong, and ProductCreator is correct. Using pattern names in domain models leaks technical aspects. Just use a name for objects that is natural for them so that domain experts can understand them. It's hard to choose the right name because naming things is one of the hardest things in software development and when you make it more restricted, it gets even harder.