How umrikhin/book-blazor works
Major Components
• Presentation Layer: Representing the Blazor UI with client projects – these are the “RealtyWeb_Client” (or “AspNetBlazor” in some chapters) projects. Mark this layer as the interactive front-end running in the browser (either WebAssembly or server-hosted).
• Server/Backend Layer: Represented by “RealtyWeb_Server” projects. This layer encapsulates server-side logic, component rendering, API endpoint management, handling of routes, and integration with JavaScript.
• Business Logic Layer: Some chapters include a “Realty_Biz” project (or similar) where business logic and repository implementations reside.
• Domain/Models Layer: The “Realty_Models” projects hold the domain entities (for example, Phone, Tenant, Owner, House, Region, etc.). This layer is used by both the business logic and data access layers.
• Additional Components: For later chapters you might also see API projects (labeled “RealtyWeb_API”) and host apps (“Realty_HostApp”), which focus on exposing endpoints to external services and handling authentication and cross-cutting concerns. There are also InputboxComponents libraries (frequently found under chapters 10, 11, 12, 13, 14, and 15) that encapsulate reusable UI components.
Relationships and Data Flow
• The Client projects (UI) send user interactions and API requests toward the Server projects.
• The Server layer processes the incoming data, renders components (using its own sub-components like Layout, Pages, etc.), and interacts with the business logic.
Architectural Patterns and Technologies
• The separation into Client and Server projects shows a clear MVC/MVVM or component-based design pattern typical to Blazor.
• Dependency Injection is implied by the use of shared services across projects (e.g., ILocalStorageService, StateContainerService).
• The layered structure (Presentation → Business → Data Access) reinforces separation of concerns.