11. 限界上下文解析
“Explicitly define the context within which a model applies. Explicitly set boundaries in terms of team organization,
usage within specific parts of the application, and physical manifestations such as code bases and database schemas.
Keep the model strictly consistent within these bounds, but don’t be distracted or confused by issues outside.”
--wikipedia
在應用程式中的某一部份
設定一個顯示的邊界
讓模型可以有強一致性
避開無謂的干擾
領域的概念
11
31. REST描述
REST與DDD
31
Representational State Transfer (REST) is a software architectural style that defines a set of constraints to be used for
creating Web services. Web services that conform to the REST architectural style, called RESTful Web services (RWS),
provide interoperability between computer systems on the Internet.
RESTful Web services allow the requesting systems to access and manipulate textual representations of Web resources by
using a uniform and predefined set of stateless operations.
Other kinds of Web services, such as SOAP Web services, expose their own arbitrary sets of operations.
--wikipedia
它是Architectural style
資源+表現型式+狀態變化
一組基本的操作
32. REST操作
REST與DDD
32
Route
name
URL HTTP
Verb
描述 是否為
冪等
Index /blogs
GET
顯示blogs資訊
New /blog/new 顯示新增blog的表單資訊
Show /blogs/:id 顯示指定的blog資訊
Edit /blogs/:id/edit 顯示編輯blog的表單資訊
Create /blogs POST 新增blog
Update /blogs/:id PUT 異動已存在的blog資訊
Patch /blogs/:id PATCH 異動已存在的部份blog資訊
Destroy /blogs/:id DELETE 刪除已存在的blog