Eric Evans (http://domaindrivendesign.org)。“领域驱动设计”概念的提出者。这次讲座，他将带来这几年他对于领域驱动设计的新理解。
(09:10:27)ydong与所有人说:才起来，听 evans 讲座要紧，在家上了
(09:25:54)ericevans与所有人说:Hello. Thank you for joining me here.
(09:28:00)*umlchina_seminar与ericevans说:Eric, type something?
(09:28:06)ericevans与所有人说:If someone would like to discuss a particular topic, please type that.
(09:28:39)[*umlchina2]与所有人说:FanShen's question: There are many fields in some of our domain model objects, about 20-50 fields
(09:28:51)[*umlchina2]与所有人说:I’m not sure whether it’s because we didn’t split the model well enough or it’s just a normal pheno
(09:28:54)ydong与所有人说:the voice is still too low
(09:29:02)[*umlchina2]与所有人说:Currently we are using the configuration pattern which is mentioned in Practical API Design to ease
ydong与所有人说:would you please amplify it?
(09:29:48)ericevans与所有人说:It is not unusual. However, it is more desirable to break down the model more
(09:29:49)[*umlchina2]与所有人说:wear your earphone
(09:30:16)ericevans与所有人说:One thing that helps withthis is to emphasize more the value objects
(09:30:34)[*umlchina2]与所有人说:Haitao Zhu's question:How about DDD eXchange this year. I have read some of last year's ppt, how
(09:30:54)[*umlchina2]与所有人说:how can I download this year's ppt
(09:31:03)ericevans与所有人说:I will be gone for a moment to try to find a better earphone.
(09:31:39)ericevans与所有人说:The videos from DDD exchange are available and the power point is there with them the address is
(09:32:04)[*umlchina2]与ericevans说:No, Eric, I mean they wear earphone
(09:32:30)[*umlchina2]与ericevans说:you just talk to the phone when you want to talk
(09:32:54)ruth与*umlchina_seminar说:maybe we can change to next website to start
(09:34:33)beautyshop2010与*umlchina_seminar说:the sound is too low,so I couldn't hear anything
(09:35:06)ericevans与所有人说:I am going to find my better headset. I will return in just two minutes. /Sorry
(09:37:09)ydong与所有人说:windows audio management allows you to amplify your microphone by 30+db, maybe you can try that
(09:38:21)[*umlchina2]与ericevans说:we can hear
(09:39:32)之魂与beautyshop2010说:i can't hear
(09:40:17)[*umlchina2]与之魂说:if you can't here
(09:40:19)beautyshop2010与*umlchina_seminar说:yeah ,but the voice is still too little
(09:40:31)ydong与所有人说:we can here, it's just the voice is intermittent
(09:42:30)[*umlchina2]与ericevans说:eric, your voice is still low.....
(09:44:00)ericevans与所有人说:In the current issue of our newsletter I wrote about my impressions of ddd exchange.
(09:44:19)ruth与*umlchina_seminar说:no voice now
(09:44:27)[*umlchina2]与ericevans说:Eric, maybe there is trouble with my phone, sorry, you can answer by text
(09:44:53)ericevans与所有人说:You can find that at http://domainlanguage.com/newsletter/
(09:45:08)ericevans与所有人说:I will just use text!
(09:45:34)ericevans与所有人说:Let's discuss the question of too many fields in an object
(09:45:55)ruth与*umlchina_seminar说:i can't hear
(09:45:55)ericevans与所有人说:We need to think about what this object represents and what it is for.
(09:46:13)ericevans与所有人说:It usually does not take many fields to capture the basic identity of an entity
(09:46:13)ydong与ruth说:evans's gonna type manually
(09:46:55)ericevans与所有人说:For example, you can identify a person with some name fields, an id ...
(09:47:06)ericevans与所有人说:This is not all you want to know about this person, of course
(09:47:22)ericevans与所有人说:But those things do not have to go into the same object
(09:47:33)ericevans与所有人说:A typical example might be address
(09:47:41)[*umlchina2]与ericevans说:Sherry Lin's question: What is the difference between traditional OOA/OOD and DDD?
(09:47:58)ericevans与所有人说:We could put street, number, city, postal code, etc. into the Person object
(09:48:22)ericevans与所有人说:We don't do that. We make an address object and put those fields there.
(09:48:42)ericevans与所有人说:Many of the fields on these over-grown objects can be taken out into other objects
(09:49:06)ericevans与所有人说:An interesting question about the difference between traditional OOA/OOD and DDD
(09:49:43)ericevans与所有人说:It is true we do OOA/OOD within DDD
(09:50:02)ruth与*umlchina_seminar说:what is the whole pronouce about DDD?
(09:50:27)ericevans与所有人说:Yet we frame it quite differently. It is more focused on establishing the shared language
(09:50:41)ericevans与所有人说:Collaboration with business people in modeling
(09:51:08)ericevans与所有人说:More emphasis on the context boundaries, where distinct models are separated
(09:51:31)ericevans与所有人说:Less emphasis on the diagrams and more on the model as a language
(09:52:23)ericevans与所有人说:I don't quite understand the last message from ruth. Could you rephrase that?
(09:53:03)[*umlchina2]与ericevans说:WW Sun's question: I want to study design patterns, any sugeestion?
(09:53:06)ydong与ericevans说:is it true that usually one context serves for one app?
(09:53:32)ydong与ericevans说:i mean, one app shouldn't have more than one context, is that so?
(09:53:35)ericevans与所有人说:Question about one context serves one app.
(09:53:46)ericevans与所有人说:This is oversimplified
(09:54:06)ericevans与所有人说:We try to be very clear about which context different parts of an app are in.
(09:54:31)ericevans与所有人说:Still, typical apps draw on multiple contexts. Any integration with other systems, for example
(09:54:59)ericevans与所有人说:Question a few minutes ago about studying design patterns.
(09:55:39)ericevans与所有人说:It depends on the area you are interested in.
(09:56:05)ericevans与所有人说:There are the original design patterns of the book "Design Patterns"
(09:56:24)ericevans与所有人说:There are all the architectural patterns from the POSA books. And the ones from Martin Fowler
(09:56:51)ydong与ericevans说:allow me back to the context thing. on the multiple contexts situation,
(09:57:18)ericevans与所有人说:Multiple contexts. Very important.
(09:57:19)ydong与ericevans说:one app should have one `main' context, and others are just relatively not important, right?
(09:57:31)ydong与ericevans说:to that app
(09:57:54)ericevans与所有人说:When you are working on an app, generally there is a "main" context for that app
(09:58:14)ericevans与所有人说:It isn't more important overall, but more central to that project.
(09:58:31)ericevans与所有人说:When we say "ubiquitous language' we mean ubiquitous within a context
(09:58:53)ydong与ericevans说:al right, that answered my question, thank you
(09:59:25)ericevans与所有人说:So you want to be working mostly in one context so that you can have a shared language
(09:59:30)[*umlchina2]与ericevans说:lijun cai's question: we are using php in our project(online shop), can we turn to DDD?
(09:59:33)ericevans与所有人说:for most of what you are doing
(10:00:07)[*umlchina2]与ericevans说:which book should I read or there are any examples?
(10:00:07)ericevans与所有人说:For DDD you do need some ability to abstract
(10:00:20)ericevans与所有人说:In the early versions of php, there was very little abstraction.
(10:00:36)ericevans与所有人说:It was hard to express things in the ubiquitous language
(10:00:53)ericevans与所有人说:now I think php has more power to express things
(10:01:13)ericevans与所有人说:Still not the abstractions that Java might have
(10:01:34)ericevans与所有人说:Probably sufficient to gain many of the benefits of DDD in the collaboration with business people
(10:01:45)ericevans与所有人说:and the evolution of a conceptual model
(10:01:56)ericevans与所有人说:That is the basis of a language for the project
(10:02:12)ericevans与所有人说:Books I recomend or examples:
(10:03:02)ericevans与所有人说:If you look at http://dddcommunity.org/examples there are two interesting ones
(10:03:20)ericevans与所有人说:One is a library for time and money objects I wrote a few years ago (in Java)
(10:03:45)ericevans与所有人说:One is called "DDD Sample App" it is not meant to be used
(10:04:08)ericevans与所有人说:Rather it shows how all the parts fit together
(10:04:31)ericevans与所有人说:So it has a server and a remote component that send messages. And it has O-R mapping and a UI
(10:04:56)ericevans与所有人说:All the tricky things people have to do. And it uses the Cargo shipping example from my book
(10:05:17)chenzhan与所有人说:can we use functional programme language for DDD, e.g. Lisp,haskell?
(10:05:17)ericevans与所有人说:I assume you all know my book is available in Chinese ;)
(10:05:24)chenzhan与所有人说:And how different
(10:05:58)ericevans与所有人说:Can you use a functional language like Lisp for DDD? Yes
(10:06:05)Lingo与所有人说:How to improve the ability of abstraction?
(10:06:19)ericevans与所有人说:The style changes and some of the "Building Block" patterns don't apply so much
(10:06:39)chenzhan与所有人说:And how different from OO language?
(10:06:43)ericevans与所有人说:The emphasis shifts to the way we tend to express concepts in those languages
(10:07:18)ericevans与所有人说:Lisp variants are especially good at making DSLs -- little specialized languages for a domain
(10:07:39)ericevans与所有人说:These can be aligned with the ubiquitous language. In some ways this is better than objects
(10:08:14)chenzhan与所有人说:thanks, I got it
(10:08:19)ericevans与所有人说:I still love objects.:-) However, the key is the ability to express your model abstractions in code
(10:08:54)ericevans与所有人说:Object languages and functional languages can definitely do this. Php has some limits there
(10:09:00)chenzhan与所有人说:we can also use CLOS in common lisp
(10:09:37)ericevans与所有人说:Also, the relational database with SQL has some abstraction power
(10:09:41)ericevans与所有人说:when you are dealing with set-oriented domain problems
(10:10:05)ericevans与所有人说:Unfortunately, when we have combined objects and relational databases,
(10:10:13)Lingo与所有人说:How to improve the ability of abstraction?
(10:10:16)ericevans与所有人说:we have lost the best aspects of both
(10:10:30)ericevans与所有人说:How to improve the ability of abstraction?
(10:10:48)ericevans与所有人说:I assume you mean of people
(10:11:09)ericevans与所有人说:I was speaking earlier of the ability to express abstraction in a programming language
(10:11:20)ericevans与所有人说:But for people there are some considerations
(10:11:35)Lingo与所有人说:Mr. Pan teach me peter coad's color modeling
(10:11:36)chenzhan与ydong说:帮我问一下，建立一层domain entity然后在其上 建立一层dsl，做定制化的需求，或者说经常变动的需求，流程什么的，是否可行？
(10:11:43)ericevans与所有人说:First some people are naturally better at it than others. We must recognize this
(10:12:03)ericevans与所有人说:Those who naturally have the talent, they can benefit from patterns like those in my book.
(10:12:04)muchan与Lingo说:who's that guy?山水城林
(10:12:24)ericevans与所有人说:Abstraction is making concepts. Categories to guide that, such as entities, value objects
(10:12:47)ericevans与所有人说:Patterns to make those abstractions more self-contained like "Closure of Operations"
(10:12:55)ericevans与所有人说:These add to the abstraction skills
(10:13:19)ericevans与所有人说:Plus, being more aware of context. People tend to reach for "the" model
(10:13:56)ericevans与所有人说:Good modelers know there are many possible models for the same thing and more than one in use
(10:14:28)ericevans与所有人说:They keep them distinct in their minds and are aware what context each is meant to be used in
(10:14:44)ericevans与所有人说:They also don't get too attached to a model. Even their most proud work
(10:15:04)ericevans与所有人说:Because this is an obstacle to finding the model that replaces that one
(10:15:28)ericevans与所有人说:Another thing to practice, I think, is clarity
(10:15:51)ericevans与所有人说:If you cannot explain your model concisely to a business person, it is probably not clear
(10:16:07)ericevans与所有人说:The abstractions are not well enough defined or are too complex
(10:16:28)ericevans与所有人说:An object can be described by listing all its fields,true
(10:16:37)ericevans与所有人说:But that is not the abstraction it represents
(10:17:14)ericevans与所有人说:You know it is not a good abstraction if you want to list all the fields every time
(10:18:07)ericevans与所有人说:By the way, this is a difference from traditional OOA.
(10:18:13)ydong与ericevans说:is it possible that creating a dsl layer on top of domain entities and serving some frequently
(10:18:15)ericevans与所有人说:They thought of models as something for the technical team
(10:18:31)ericevans与所有人说:In DDD the model is shared with the business experts. Therefore, they must understand it
(10:18:52)ericevans与所有人说:Not the implementation, of course. They must understand its business meaning.
(10:19:34)ericevans与所有人说:Question about DSL layer on top of entities for frequently changing requirements
(10:19:37)Lingo与ericevans说:How to communicate with business person, they do not want to read my model and they can not know
(10:19:53)ericevans与所有人说:A good set of domain objects gives you something almost like a DSL
(10:19:59)Lingo与ericevans说:the meaning of my diagram
(10:20:10)ericevans与所有人说:Martin Fowler calls it an "Internal DSL"
(10:20:39)ericevans与所有人说:Putting another layer over that might be useful especially if different people wrote that part
(10:21:10)ericevans与所有人说:When I am communicating with a business person, I do not start with diagrams or even models
(10:21:27)chenzhan与ydong说:Sometime, our bussiness person not clearly understand what they really want.....
(10:21:42)ericevans与所有人说:I start with scenarios. A sequence of business events and information that is a concern to them
(10:21:57)ericevans与所有人说:And walking through that and how the system would help resolve it.
(10:22:12)ericevans与所有人说:In the process, we have to clarify terms. This is modeling
(10:22:22)ericevans与所有人说:We have to define rules. This is modeling
(10:22:47)ericevans与所有人说:We eventually, in working through a problematic scenario, will draw a diagram to explain something
(10:23:25)ericevans与所有人说:They are often interested then. Models without the motivating scenario are hard to talk about
(10:24:04)ericevans与所有人说:Business people sometimes do not clearly understand what they want
(10:24:18)ericevans与所有人说:Then you need exploration.
(10:24:56)ydong与ericevans说:it's the constraints/rules that matter, right?
(10:25:13)ericevans与所有人说:DDD can help here, because the language and concepts you are cultivating tend to be applicable
(10:25:19)ericevans与所有人说:(in a continuously changing form)(in a continuously changing form)
(10:25:34)ericevans与所有人说:even as they change their minds
(10:25:47)ericevans与所有人说:A quick prototype can help a lot, of course
(10:26:07)ericevans与所有人说:You are welcome.
(10:26:52)ydong与ericevans说:recently i'm reading category theory, it says it's the arches(behaviors) that matter
(10:27:05)ydong与ericevans说:so i think, objects are just containers
(10:27:08)ydong与ericevans说:would you agree?
(10:27:22)ericevans与所有人说:This session got started late, with many problems, but has turned out very interesting
(10:27:27)ericevans与所有人说:(for me anyway)
(10:27:49)ericevans与所有人说:I don't think of objects as just containers
(10:27:58)ericevans与所有人说:Of course, a good object has behavior
(10:28:21)ericevans与所有人说:"Responsibility Driven Design" is an important influence on me
(10:28:34)ericevans与所有人说:From the 1980s
(10:29:03)ericevans与所有人说:It says to think about what an object is responsible for accomplishing or managing
(10:29:16)Lingo与ericevans说:There are any tools help(force) our team walk on the road of DDD
(10:29:18)ericevans与所有人说:And identify the behaviors needed for that.
(10:29:35)ericevans与所有人说:Finally, some data is also needed to accomplish the responsibiliyt
(10:29:56)ericevans与所有人说:So I think an emphasis on behavior is not new to OO
(10:30:23)ericevans与所有人说:Question about tools to help (force) team to walk down DDD
(10:30:36)ericevans与所有人说:No, I don't think there really are.
(10:30:43)Lingo与ericevans说:Responsibility Driven Design -- this book? www.wirfs-brock.com/Design.html
(10:31:08)ericevans与所有人说:It comes more from the team and trying to learn DDD
(10:31:22)ericevans与所有人说:Yes, RDD was Wirfs-Brock
(10:31:40)ericevans与所有人说:She was a real pioneer in OOA/OOD
(10:31:53)ericevans与所有人说:Influential on me when I was learning OO
(10:33:37)[*umlchina2]与ericevans说:Eric, It's 22;30 your time, maybe you need to have sleep, of course, if you want to stay you can )
(10:33:51)ydong与ericevans说:i have a question on the anti-corruption layer
(10:33:52)[*umlchina2]与ericevans说:you can quit anytime )
(10:34:05)ericevans与所有人说:I will stay a little longer to compensate for the very slow start
(10:34:28)ericevans与所有人说:On the subject of introducing a team to DDD, I think it helps to choose a few things
(10:34:42)ericevans与所有人说:Beginning by focusing on concrete scenarios
(10:35:17)ericevans与所有人说:Think of it this way. Can you put together 5 stories, concrete examples that show
(10:35:30)ericevans与所有人说:why your software is needed and why it is difficult?
(10:35:54)ericevans与所有人说:Then you try to generate many model ideas. You walk through these scenarios with each one
(10:36:12)ericevans与所有人说:Does this model idea make the scenario clearer and easier to explain and solve?
(10:36:22)ericevans与所有人说:This is how I begin with a team
(10:36:30)ydong与ericevans说:we have a system A which provides some services, and B uses them. And two walls actually got built.
(10:36:35)ydong与ericevans说:One is inside A and one is inside B. Is it unavoidable?
(10:37:11)ericevans与所有人说:Can you explain the two walls a little more?
(10:37:35)ydong与ericevans说:the wall in A segregate the api layer from the domain
(10:37:56)ydong与ericevans说:and the wall in B separates B from the api in A
(10:38:10)ericevans与所有人说:A yes, this is a fairly common thing. Not necessarily bad
(10:38:37)ericevans与所有人说:In my book there is a pattern "open-host-service" and "published language"
(10:38:50)ericevans与所有人说:Your system A seems to be using this pattern
(10:39:26)ericevans与所有人说:Sometimes the difficulty of solving a problem calls for one model while the difficulty of
(10:39:27)chenzhan与所有人说:question is, the api abstraction level
(10:39:47)ericevans与所有人说:offering that functionaly clearly calls for another. Also, you don't want the users of the API
(10:40:16)ericevans与所有人说:constraining your ability to change the inner workings. So it is common for the API to be
(10:40:31)ericevans与所有人说:model from the interior. These are two contexts then
(10:40:54)ericevans与所有人说:Now, the "System B" could be built in a way to use the API natively. We call this "Conformist"
(10:41:22)ericevans与所有人说:However, this may not allow them to build B the way they need to to solve their problems
(10:41:47)ericevans与所有人说:So they build the wall. We call this the "anticorruption layer"
(10:42:25)ericevans与所有人说:The system B people, early on, had to decide how much their context would be independent of A
(10:42:31)ericevans与所有人说:(Or the API of A)
(10:43:03)ydong与ericevans说:thank you. i have one final question
(10:43:17)ericevans与所有人说:Also, when a preexisting system is being integrated with A you do not have much choice
(10:44:02)ericevans与所有人说:By the way, the API might be more abstract, but not necessarily. A might have abstractions
(10:44:02)Lingo与ericevans说:I bought your Chinese DDD books 3 years ago. Is there any plan to write a new edition?
(10:44:20)ericevans与所有人说:internally. But different ones, not so suited to intersystem communications
(10:44:39)ericevans与所有人说:I do not have any plan to write a new edition
(10:44:51)ericevans与所有人说:In some ways, I see that it would be good.
(10:45:10)ericevans与所有人说:But so much of the book is my story and my viewpoint
(10:45:46)ericevans与所有人说:I may write a new book. More of a companion book
(10:46:02)ericevans与所有人说:For example, I might write a new (shorter) book about Strategic Design
(10:46:49)ericevans与所有人说:This way, the original book keeps its integrity.
(10:47:35)ydong与ericevans说:i have one final question, may i proceed?
(10:47:52)Lingo与ericevans说:about "Strategic Design", any recommend article besides the chapter in your book
(10:47:59)ericevans与所有人说:Yes, please. Let's have one final question and then we can finish for the night/morning
(10:48:05)ydong与ericevans说:Our company is marching towards multiple vertical markets.
(10:48:10)Lingo与ericevans说:me too, this one
(10:48:13)ydong与ericevans说:As a result, the trade system is forced to deal with various sources of orders.
(10:48:20)ydong与ericevans说:And to us, the potential impacts on our trade system coming from those vertical markets is unknown.
(10:48:25)ydong与ericevans说:I know you have built various financial systems before.
(10:48:31)ydong与ericevans说:To your experience, is it possible to build one single trade system which provides
(10:48:36)ydong与ericevans说:some kind of RPC services that can deal with various markets?
(10:49:10)ericevans与所有人说:On Strategic Design, I could suggest two things: My presentations on InfoQ
(10:49:29)ericevans与所有人说:And two or three of the practitioners reports on dddcommunity.org
(10:49:39)ericevans与所有人说:On the subject of the trading system.
(10:50:38)ericevans与所有人说:These orders from different sources, do they have the same semantics? Are they all in FIX?
(10:51:11)ericevans与所有人说:If you can develop a model that can accurately express all the types of orders you might receive
(10:51:12)ydong与ericevans说:the basic semantics remain the same, but the vertical markets all have their unique properties
(10:51:30)ericevans与所有人说:And then translate the incoming orders into your model, then you may be able to do it
(10:51:43)ericevans与所有人说:The question to start, though, is what is the desired benefit of this
(10:52:06)ericevans与所有人说:Is there a special advantage of bringing these orders together?
(10:52:48)ydong与ericevans说:yes, so we can have single trading system, and no data corruption would occur
(10:52:54)ericevans与所有人说:It might be that, with a focus on the desired advantage, that a narrower kind of integration
(10:53:06)ericevans与所有人说:might acheive much of what you want with less difficulty
(10:53:35)ericevans与所有人说:I see you said that the semantic are the same but each with additional properties
(10:53:57)ericevans与所有人说:I'm sure you could bring these into a system together. The question is
(10:54:12)ericevans与所有人说:What is it you want to do with them that you couldn't do separately?
(10:54:27)ericevans与所有人说:Does this thing you want to do involve those properties?
(10:54:52)ericevans与所有人说:If so, you would have to translate the properties somehow so that you could combine/compare them
(10:55:12)ericevans与所有人说:This might be difficult. You have to find new abstractions that can span all the verticles
(10:55:35)ericevans与所有人说:Perhaps the things you are combining/comparing are in the common part of their order types
(10:56:11)ericevans与所有人说:In that case, you don't need to worry about the special properties *in this context*
(10:56:59)ericevans与所有人说:Here is part of the "domain-driven" philosophy
(10:57:18)ericevans与所有人说:We are not looking for fully general models
(10:57:40)ericevans与所有人说:We need to have an important set of business cases which can be helped by our model
(10:58:09)ericevans与所有人说:This can sometimes lead us to an easier solution
(10:58:34)ericevans与所有人说:The modeling rigor and the effort to make it minimal and elegant makes up for it :-)
(10:58:42)ericevans与所有人说:So we still work at least as hard!
(10:59:11)ericevans与所有人说:I know I have not actually answered your question, but of course I would need to know more
(10:59:22)ericevans与所有人说:I hope this will give you some ideas, though
(10:59:34)ydong与ericevans说:yeah, that helped
(11:00:16)ericevans与所有人说:Remember, in the application that does valuable analysis X using data from A, B, and C,
(11:00:37)ericevans与所有人说:You don't have to have everything from A B and C. Only the parts needed by X
(11:00:59)ericevans与所有人说:You can deal with management of the full A and the full B and the full C
(11:01:22)ericevans与所有人说:potentially in different subsystems geared specifically to them
(11:01:39)ericevans与所有人说:Or maybe you don't really need those other parts at all except to display them
(11:02:06)ericevans与所有人说:If it is only for display, you can put it in a very generic representation
(11:02:22)ericevans与所有人说:in your model. Something not suited to computation and analysis, but fine for display
(11:02:36)ericevans与所有人说:So, I suppose I should go.
(11:02:50)ydong与ericevans说:Thank you very much
(11:02:58)ericevans与所有人说:Thank you especially to those who wrote questions
(11:03:15)ericevans与所有人说:I hope you will all continue in your interest in DDD
(11:04:17)ericevans与所有人说:Good night. I am glad I came tonight. Good bye.