Click here to Skip to main content
15,887,083 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: General "design patterns" usage questions Pin
Gerry Schmitz20-Dec-17 5:51
mveGerry Schmitz20-Dec-17 5:51 
AnswerThank you Pin
MikeTheFid15-Nov-17 0:49
MikeTheFid15-Nov-17 0:49 
AnswerRe: General "design patterns" usage questions Pin
jschell15-Nov-17 7:15
jschell15-Nov-17 7:15 
GeneralRe: General "design patterns" usage questions Pin
Eddy Vluggen15-Nov-17 14:57
professionalEddy Vluggen15-Nov-17 14:57 
GeneralRe: General "design patterns" usage questions Pin
jschell16-Nov-17 11:19
jschell16-Nov-17 11:19 
QuestionWhich programing code to use Pin
Member 1346643415-Oct-17 9:37
Member 1346643415-Oct-17 9:37 
GeneralRe: Which programing code to use Pin
PIEBALDconsult15-Oct-17 9:57
mvePIEBALDconsult15-Oct-17 9:57 
QuestionReview DDD solution for a car manufacturing station Pin
Praveen Raghuvanshi1-Oct-17 12:20
professionalPraveen Raghuvanshi1-Oct-17 12:20 
I have recently started exploring DDD and planning to use it. I am looking for some clarifications for which I have created a sample problem and designed a solution using DDD followed by some questions. Please go through it and revert should you need further details.

Problem Statement: Architecture a manufacturing station for Vehicles which allows assembling of different parts and creating a vehicle.

Architecture Style: Domain Driven Design (DDD)

Domain terms and relationships
- Manufacturing Station may have 0…* vehicles
- Vehicle may be a Car/Truck etc.
- Vehicle may have Engine, Transmission, Wheels, Music Player, Rear View Camera, etc
- Engine could be of Petrol/Diesel
- Transmission could be Auto or Manual
- Wheel may have Tube or Tubeless Tyre
- There may be millions of parameters within a vehicle such as Speed, RPM, Tyre Pressure.
- A group of parameter belong to a certain component (Engine, Transmission, Wheels, etc).

Hierarchical representation of System
- Manufacturing Station
o Vehicles
 Car/Truck
• Engine (E)
o Petrol/Diesel
• Transmission (T)
o Auto/Manual
• Wheels (W)
o Tube/Tubeless
• Parameters (Could range upto millions)
o Speed - E
o RPM - E
o Coolant - E
o Tyre Pressure - W
o Audio Level
o RearCameraOn
o DoorLocked

DDD Solution


Bounded Contexts (Identified)
Station
Vehicle
Engine
Transmission
Wheels

Bounded Context Details

Bounded Context – Station
Aggregate Root
o Station
 Slots : List<slot>
Entities
o Slot
o Vehicle : Car/Truck
Value Objects
Repositories
o StationRepository
Services
o SlotService
Events
o VehicleAllocatedToSlot
o VehicleDeallocatedFromSlot

Bounded Context – Vehicle
Aggregate Root
o Vehicle : Car/Truck - How to manage inheritance and new vehicle types such as Bus
 Parameters: List<parameter>
Entities
o Registration
o Chassis
Value Objects
o Manufacturer
o Model
o Parameter
 Name
 Value
 Type
 Default Value
 Unit
o Audio System
Repositories
o VehicleRepository
Services
o AssemblingService
Events
o VehicleCreated
o VehicleDeleted
o VehicleRegistered
o VehicleDeregistered
o AudioSystemAdded
o AudioSystemRemoved

Bounded Context – Engine
Aggregate Root
o Engine
 Parameters: List<parameter>
Entities
o ElectronicControllingUnit
Value Objects
o Gas Pump
o Valve
o Filter
o Fan
o Parameter
 Name
 Value
 Type
 Default Value
 Unit
Repositories
o EngineRepository
Services
Events
o EngineCreated
o EngineRemoved
o FilterAdded
o FilterRemoved
o FilterReplaced
o GasPumpAdded
o GasPumpRemoved
o GasPumpReplaced
o FanAdded

o FanRemoved
o FanReplaced

Questions:
  • DRY is violated. We could see Parameter defined in almost all the services.
    o Is it advisable to have a separate service for Parameters? In that case, does a component(Engine Or Wheel) keep a list of parameter id within itself OR each parameter hold a parent Id?
  • How does a client create a Car with Engine,Transmission and 4 wheels in a single call?
  • How does the relationship between different components achieved? Fo e.g how does a specific engine know to which car/truck it belongs to? How can we reconstruct a car/truck?
  • How to manage inheritance depth using DDD?
    o Vehicle -> Car -> Ford/Toyota?
  • How to manage deep level composition using DDD? How do we flatten the aggregates?
    o Station -> Car -> Engine -> Fan -> Parameter(Fan Sped) -> value
     Station.Car.Engine.Fan.Speed  How to retrieve Speed(Parameter) value in other Bounded context
Thanks in advance!
AnswerRe: Review DDD solution for a car manufacturing station Pin
jschell2-Oct-17 11:37
jschell2-Oct-17 11:37 
AnswerRe: Review DDD solution for a car manufacturing station Pin
Gerry Schmitz3-Oct-17 6:56
mveGerry Schmitz3-Oct-17 6:56 
GeneralRe: Review DDD solution for a car manufacturing station Pin
Praveen Raghuvanshi3-Oct-17 22:31
professionalPraveen Raghuvanshi3-Oct-17 22:31 
GeneralRe: Review DDD solution for a car manufacturing station Pin
Gerry Schmitz4-Oct-17 6:16
mveGerry Schmitz4-Oct-17 6:16 
QuestionUnable to connect SSMS to an Azure SQL server Pin
Stephen Holdorf28-Sep-17 13:48
Stephen Holdorf28-Sep-17 13:48 
SuggestionRe: Unable to connect SSMS to an Azure SQL server Pin
Richard Deeming29-Sep-17 1:55
mveRichard Deeming29-Sep-17 1:55 
GeneralRe: Unable to connect SSMS to an Azure SQL server Pin
Stephen Holdorf29-Sep-17 3:23
Stephen Holdorf29-Sep-17 3:23 
AnswerRe: Unable to connect SSMS to an Azure SQL server Pin
jschell29-Sep-17 7:29
jschell29-Sep-17 7:29 
QuestionReference Material for creating/documenting Software architecture Pin
Member 1341762119-Sep-17 2:28
Member 1341762119-Sep-17 2:28 
AnswerRe: Reference Material for creating/documenting Software architecture Pin
Afzaal Ahmad Zeeshan19-Sep-17 3:10
professionalAfzaal Ahmad Zeeshan19-Sep-17 3:10 
AnswerRe: Reference Material for creating/documenting Software architecture Pin
Eddy Vluggen19-Sep-17 4:07
professionalEddy Vluggen19-Sep-17 4:07 
AnswerRe: Reference Material for creating/documenting Software architecture Pin
Henrik Jonsson19-Sep-17 7:43
Henrik Jonsson19-Sep-17 7:43 
AnswerRe: Reference Material for creating/documenting Software architecture Pin
jschell20-Sep-17 7:34
jschell20-Sep-17 7:34 
QuestionDesign Pattern : Queue Pin
Joel Palmer31-Aug-17 3:21
Joel Palmer31-Aug-17 3:21 
AnswerRe: Design Pattern : Queue Pin
jschell4-Sep-17 7:55
jschell4-Sep-17 7:55 
AnswerRe: Design Pattern : Queue Pin
Gerry Schmitz9-Sep-17 13:06
mveGerry Schmitz9-Sep-17 13:06 
Questionbulk data should be in executable Pin
Erhy23-Aug-17 9:51
Erhy23-Aug-17 9:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.