Posts

Showing posts from January 14, 2019

Ninja

Image
.mw-parser-output .nota-disambigua{clear:both;margin-bottom:.5em;border:1px solid #CCC;padding-left:4px}.mw-parser-output .nota-disambigua i{vertical-align:middle} Disambiguazione – Se stai cercando altri significati, vedi Ninja (disambigua) . Disambiguazione – Se stai cercando ninja di sesso femminile, vedi Kunoichi . Disambiguazione – "Shinobi" rimanda qui. Se stai cercando altri significati, vedi Shinobi (disambigua) . Questa voce o sezione sull'argomento Giappone non cita le fonti necessarie o quelle presenti sono insufficienti . Puoi migliorare questa voce aggiungendo citazioni da fonti attendibili secondo le linee guida sull'uso delle fonti. Segui i suggerimenti del progetto di riferimento. Disegno di un ninja archetipico, da una serie di schizzi di Hokusai manga di Katsushika Hokusai, xilografia su carta, volume sei, 1817 I Ninja ( 忍者 ? ) erano spie o mercenari del Giappone feudale. Le funzioni del ninja includevano: lo sp

Preventing external object to call methods on entity inside an aggregate

Image
0 According to DDD principles, external objects should only call methods on an aggregate root, not on other entities in the aggregate, right ? In case of nested entities, for example: SeatingPlan -> Sections -> Rows -> Seats SeatingPlan is the aggregate root, while sections, rows and seats are entities that are meaningless outside its parent entity. Lets say I want to add seats in the seating plan. I would create SeatingPlan.AddSeat(sectionId, rowId, seatNo) in order to prevent external objects to call SeatingPlan.Sections[x].Rows[y].Seat[s].Add , which is bad, right ? But still, the AddSeat method of SeatingPlan must delegate the seat creation to the row object, because the seat is a composite of the row, the row owns the seats. So it has to call Sections[x].Rows[y].AddSeat(seatNo) . Now