Timeboxed Modeling (Timeboxed Modeling)

ตอนนี้ที่คุณมี estimates สำหรับแต่ละ component type คุณสามารถ base tasks ของคุณโดยตรงปิด components เหล่านั้น คุณอาจเลือก keep แต่ละ component เป็น single task ที่มี number ของชั่วโมงหรือ fraction thereof หรือคุณอาจเลือกที่จะเบ่ tasks ของคุณลง a bit ไกลออกไป อย่างไรก็ตาม ผมแนะนำจะระวัง breaking tasks down ที่จะเป็น too fine-grained ดังนั้นจึงไม่ทำให้ task board overly complex ตามที่แสดงไว้ก่อนหน้านี้ อาจจะดีที่สุดแม้กระทั่ง combine ทั้งหมด Commands และทั้งหมด Domain Events ใช้โดย Aggregate เดียว เป็น single task

Image

How to Implement (วิธีนำไปใช้)

แม้กระทั่งกับ artifacts ระบุโดย Event Storming คุณจะไม่นั่นจำเป็นต้องมี all the knowledge ที่คุณต้องการทำงาน specific domain scenario story และ use case หากมีความต้องการเพิ่มเติม โปรแกรม include time สำหรับการได้มา knowledge เพิ่มเติมใน estimates ของคุณ แต่เวลาสำหรับอะไร Recall ว่าใน Chapter 2 ผม introduced you เพื่อสร้าง concrete scenarios รอบ domain model ของคุณ นี้ สามารถเป็นหนึ่งในวิธีที่ดีที่สุดที่จะ acquire knowledge เกี่ยวกับ Core Domain ของคุณ นอกเหนือ what you can get out Event Storming. Concrete scenarios และ Event Storming เป็นเครื่องมือสองตัวที่ควร used together ต่อไปนี้คือวิธี:

• ดำเนิน quick session ของ Event Storming บางทีเพียงหนึ่งชั่วโมงหรือแล้ว คุณจะเกือบจะแน่นอนค้นพบ ว่าคุณต้อง develop more concrete scenarios รอบ some of your quick modeling discoveries

• Partner with a Domain Expert เพื่อสนทนา one or more concrete scenarios ที่ need เพื่อ refined นี้ identifies how software model will be used Again เหล่านี้ ไม่ใช่เพียง procedures แต่ should stated ด้วยเป้า identify actual domain model elements (ตัวอย่างเช่น objects) how elements collaborate และ how they interact with users (Refer ถึง Chapter 2 ตามต้องการ)

• สร้าง set ของ acceptance tests (หรือ executable specifications) ที่ exercise แต่ละ scenarios (Refer ถึง Chapter 2 ตามต้องการ)

• สร้าง components ที่จะอนุญาต tests/specifications เพื่อดำเนิน Iterate (อย่างรวดเร็ว และอย่างรวดเร็ว) เมื่อคุณ refine tests/specifications และ components จนกว่า they do สิ่งที่ Domain Expert ของคุณ expects

• Very likely some of the iteration (สั้น และอย่างรวดเร็ว) will cause you เพื่อพิจารณา other scenarios สร้าง additional tests/specifications และ refine existing และสร้าง new components

ดำเนินต่อ จนกว่า you acquired all knowledge ที่จำเป็น เพื่อบรรลุ limited business objective หรือ until your timebox expires หาก haven't ถึง desired point ให้ make sure เพื่อ incur modeling debt ดังนั้นนี้ สามารถ addressed ใน (ideally near) future

Yet วิธี much time will you need จาก Domain Experts ?

Image

Interacting with Domain Experts (การโต้ตอบกับ Domain Experts)

หนึ่งใน major challenges ของการใช้ DDD คือการได้รับ time ด้วย Domain Experts และ ไม่โดยการทำให้มากเกินไป Many times ผู้ที่ Domain Experts ในโครงการจะมี loads ของ responsibilities อื่นๆ ชั่วโมง ของการประชุม และอาจจะ travel ด้วย ด้วยเช่นนั้น potential absences จากแบบจำลอง environment มันอาจจะ difficult ที่จะ find enough time กับ them ดังนั้นเรา had better ทำให้ time เรา use count และ limit to it จึง necessary Unless คุณ make modeling sessions fun and efficient คุณ stand ดี chance ของ losing their help ที่ประเด็นสำคัญมากที่สุด หาก they find it valuable enlightening และ rewarding you จะ likely establish strong partnership ที่ you will need

ดังนั้นคำถามแรกให้ answer are "When ทำเรา need time ด้วย Domain Experts ? What tasks do they need เพื่อ help เรา perform?"

• Always include Domain Experts ใน Event Storming activities Developers จะ always มี lot ของ questions และ Domain Experts จะมี answers ให้ make sure they are ใน Event Storming sessions together

• คุณจะ need Domain Experts' input บน discussions และ creation ของ model scenarios see Chapter 2 สำหรับ examples

• Domain Experts จะ needed เพื่อ review tests เพื่อ verify model correctness นี่ assumes ว่า developers ได้ made conscientious effort เพื่อ adhere ถึง Ubiquitous Language และเพื่อ use quality realistic test data

• คุณจะ need Domain Experts เพื่อ refine Ubiquitous Language และ its Aggregate names Commands และ Domain Events ซึ่ง determined โดย entire team Ambiguities are resolved through review questions และ discussion Even so Event Storming sessions should have แล้ว resolved most ของ questions เกี่ยวกับ Ubiquitous Language.

ดังนั้นตอนนี้ ว่าคุณรู้ what you will need จาก Domain Experts วิธี much time should you require ของ them สำหรับ each ของ responsibilities เหล่านี้?

• Event Storming sessions should be limited เพื่อ a few hours (สอง หรือ สาม) each You may need เพื่อ hold sessions ใน consecutive days such as สำหรับ สาม หรือ สี่ days

• Block out generous amounts ของ time สำหรับ scenario discussion และ refinement แต่ try เพื่อ maximize time สำหรับ each scenario คุณ should be able เพื่อ discuss และ iterate บน one scenario over perhaps 10 ถึง 20 minutes ของ time

• สำหรับ tests you จะ need some time ด้วย Domain Experts เพื่อ review what have you written แต่ don't expect them เพื่อ sit there เมื่อ you write code Maybe they will และ นั่นคือ bonus แต่ don't expect นั่น Accurate models require less time เพื่อ review และ verify Don't underestimate ability ของ Domain Experts เพื่อ read through test ด้วย your help They can do นั่น especially ถ้า test data คือ realistic your tests should allow Domain Expert เพื่อ understand และ verify around one test ทุก ๆ one เพื่อ สอง minutes หรือ thereabouts

• During test reviews Domain Experts สามารถ provide input ใน Aggregates Commands และ Domain Events และ perhaps other artifacts เช่นไรพวกเขา adhere เพื่อ Ubiquitous Language. นี้ สามารถ accomplished ใน brief amounts ของ time

guidance นี้ should help you use just right amount ของ time ด้วย Domain Experts และเพื่อ limit amount ของ time ที่ you need เพื่อ spend ด้วย them