diff --git a/Sessions/DDD.md b/Sessions/DDD.md new file mode 100644 index 0000000..f49727e --- /dev/null +++ b/Sessions/DDD.md @@ -0,0 +1,97 @@ +# Domain + +> subject area in which we build an application + +> We have some core domains and some sub domains + + +> Working out all domains is an iterative process + +Bounded Context -> Each subdomain has its own bounded context so that they can each have their own "language" + +Context Map -> outlines which domains communicate with each other and how + +Anti-Corruption Level + +Tactical Design + + +Domain Objects -> 1. Entity Objects 2. Value Objects +![[Pasted image 20250306182113.png]] +![[Pasted image 20250306182209.png]] +![[Pasted image 20250306182246.png]] +![[Pasted image 20250306182324.png]] + + +## **Solution Name: MyApp (or your project name)** + +πŸ“‚ **MyApp.sln** (Solution file) + +### **1. Presentation Layer** (πŸ“‚ `MyApp.API`) + +- **Purpose:** Exposes the application via a web API. + +πŸ“‚ `MyApp.API` +- πŸ“‚ **Controllers** – Defines API endpoints. +- πŸ“‚ **Middlewares** – Implements custom middleware (logging, exception handling). + + +--- + +### **2. Application Layer** (πŸ“‚ `MyApp.Application`) + +- **Purpose:** Contains the application logic, use cases, and service abstractions. + +πŸ“‚ `MyApp.Application` +- πŸ“‚ **Interfaces** – Defines services like `IUserService`, `IOrderService`, etc. +- πŸ“‚ **Services** – Defines services like `IUserService`, `IOrderService`, etc. +- πŸ“‚ **DTOs** – Data Transfer Objects for input/output models. +- πŸ“‚ **Mappers** – Maps domain models to DTOs (using AutoMapper or manual mapping). +- πŸ“‚ **Validators** – Contains validation rules using FluentValidation. +>- πŸ“‚ **Queries** – Handles read operations (CQRS pattern). +>- πŸ“‚ **Commands** – Handles write operations (CQRS pattern). +>- πŸ“‚ **Exceptions** – Defines application-layer exceptions. +>- πŸ“‚ **UseCases** – Implements application logic (e.g., `CreateOrderHandler`). +--- + +### **3. Core Domain Layer** (πŸ“‚ `MyApp.Domain`) + +- **Purpose:** Represents the core business logic and entities without dependencies on infrastructure or frameworks. + +πŸ“‚ `MyApp.Domain` + +- πŸ“‚ **Aggregates** – Groups related entities following DDD principles. +- πŸ“‚ **Framework** - **Interfaces** – Contains domain-level abstractions like repository interfaces and entity interface. +- πŸ“‚ **Framework** - **Interfaces** – **Repositories** +- πŸ“‚ **Framework** - **Base** +- πŸ“‚ **Enums** – Defines domain-specific enumerations. +- πŸ“‚ **Factories** +>- πŸ“‚ **ValueObjects** – Defines immutable objects that don’t have an identity. +>- πŸ“‚ **Exceptions** – Custom exceptions related to domain logic. +>- πŸ“‚ **Specifications** – Encapsulates domain rules and query logic. + +--- + +### **4. Infrastructure Layer** (πŸ“‚ `MyApp.Infrastructure`) + +- **Purpose:** Implements external dependencies such as databases, logging, APIs, and caching. + +πŸ“‚ `MyApp.Infrastructure` + +- πŸ“‚ **Framework** - **Base** – Implements `IRepository` for data access. +- πŸ“‚ **Configurations** – Stores EF Core entity configurations. +- πŸ“‚ **Services** - Repositories +- πŸ“‚ **Migrations** - Auto Created +- **DB-Context** +>- πŸ“‚ **Persistence** – Implements repositories and EF Core DbContext. +>- πŸ“‚ **Logging** – Implements logging strategies (e.g., Serilog, NLog). +>- πŸ“‚ **Identity** – Manages authentication and authorization. +>- πŸ“‚ **Caching** – Implements caching strategies (Redis, MemoryCache). +>- πŸ“‚ **Email** – Handles email services (SMTP, SendGrid). +>- πŸ“‚ **ExternalServices** – Integrations with third-party APIs. +--- + +### **Additional Projects (Optional)** + +- πŸ“‚ `MyApp.Tests` – Unit and integration tests. +- πŸ“‚ `MyApp.Shared` – Shared utilities (cross-cutting concerns like constants, helpers). \ No newline at end of file diff --git a/Sessions/Project Notes.md b/Sessions/Project Notes.md index f8b5cd3..75070de 100644 --- a/Sessions/Project Notes.md +++ b/Sessions/Project Notes.md @@ -40,7 +40,7 @@ companyId id title -### Base +### Location id location type @@ -50,8 +50,10 @@ cityId id typeId -### Company -### Type + +### LocationType +id +typeId ### Ticket tranportationId @@ -90,3 +92,24 @@ Not Mapped ### DB Management of person sub classes ### Should we complete the whole db ### How to handle tickets + +## Tasks + +- [x] Review ERD +- [ ] Create a Project +- [ ] Name + Structure +- [x] Talk about the privacy +- [x] Should we all fork the structure? +- [x] We should keep the site and keep it running +- [x] Picking the react course +- [ ] A quick talk about the plans and timing. + + +[https://www.youtube.com/watch?v=SqcY0GlETPk](https://www.youtube.com/watch?v=SqcY0GlETPk) + +[https://www.youtube.com/watch?v=g3is3wQK70Q](https://www.youtube.com/watch?v=g3is3wQK70Q) + + + + + diff --git a/Sessions/Upcoming_Session06/06_Notes.md b/Sessions/Session06/06_Notes.md similarity index 100% rename from Sessions/Upcoming_Session06/06_Notes.md rename to Sessions/Session06/06_Notes.md