Professional Documents
Culture Documents
SoftwareDesignArchitectue LabSession 04
SoftwareDesignArchitectue LabSession 04
SoftwareDesignArchitectue LabSession 04
Exercise Questions:
1. Define a set of domain concepts and terminology that will form the ubiquitous language for your e-commerce
platform. Include terms related to products, orders, customers, and any other relevant domain concepts.
1|Page
Lab Session 4 Software Design Architecture
2. Identify and define at least two bounded contexts within your e-commerce platform. Describe the scope and
purpose of each bounded context, along with the domain concepts and terminology specific to each context.
Java
// Order class
public class Order {
private String orderId;
private List<OrderItem> orderItems;
private OrderStatus status;
private Customer customer;
// Other attributes and methods...
}
2|Page
Lab Session 4 Software Design Architecture
// OrderItem class
public class OrderItem {
private String productId;
private int quantity;
// Other attributes and methods...
}
// OrderStatus enum
public enum OrderStatus {
PENDING, SHIPPED, DELIVERED;
}
// PaymentTransaction class
public class PaymentTransaction {
private String transactionId;
private double amount;
// Other attributes and methods...
}
// ShippingAddress class
public class ShippingAddress {
private String addressLine1;
private String addressLine2;
private String city;
private String postalCode;
// Other attributes and methods...
}
Java
// Product class
public class Product {
private String productId;
private String name;
private double price;
// Other attributes and methods...
}
// Stock class
public class Stock {
private String productId;
private int quantity;
3|Page
Lab Session 4 Software Design Architecture
// StockAdjustment class
public class StockAdjustment {
private String adjustmentId;
private String reason;
private int quantityChange;
// Other attributes and methods...
}
// ReorderPoint class
public class ReorderPoint {
private String productId;
private int minimumQuantity;
// Other attributes and methods...
}
// Supplier class
public class Supplier {
private String supplierId;
private String name;
// Other attributes and methods...
}
3. Develop a simple domain model for the core functionality of the e-commerce platform. This should include
entities, value objects, and relationships between them. Use the ubiquitous language defined earlier to ensure
consistency and clarity in your domain model.
4|Page
Lab Session 4 Software Design Architecture
4. Define explicit contextual boundaries between different parts of your system, including bounded contexts,
modules, aggregates, and services. Explain why each boundary is necessary and how it helps manage
complexity and promote modularity.
5|Page
Lab Session 4 Software Design Architecture
// Order class
// OrderItem class
// OrderStatus enum
// PaymentTransaction class
// ShippingAddress class
6|Page
Lab Session 4 Software Design Architecture
Inventory Management:
// Product class
// Stock class
// StockAdjustment class
7|Page
Lab Session 4 Software Design Architecture
// ReorderPoint class
// Supplier class
5. Describe strategies for ensuring continuous collaboration with domain experts throughout the development
process. How will you involve domain experts in refining requirements, validating the domain model, and
providing feedback on the evolving software solution?
8|Page
Lab Session 4 Software Design Architecture
9|Page