Esta palestra fornece orientação prática e recomendações sobre arquitetura, tecnologias, ferramentas e frameworks. Vamos examinar estratégias para organizar seus projetos, pastas e arquivos. Nós projetaremos um sistema que seja simples de construir e manter - desde o desenvolvimento até a produção. Você sairá desta palestra inspirado e preparado para levar o desenvolvimento do seu aplicativo corporativo ao próximo nível. Key Points: - Camadas de Arquitetura - SOLID e CQRS - Injeção de Dependencias (baixo acoplamento) - MediatR - Swagger (Contract First)
11. Globalcode – Open4education
Persistence
Domain Driven Design
App Services
Infrastructure
Domain
Application Core
App Services
Overview
Entities
Value Objects
Enumerations
Aggregate Root
Logic
Exceptions
Key Points
- Use data annotations sparingly
- Use commands for logic
- Use events for data propagation
only when necessary
- Use immutable VO and commands
12. Globalcode – Open4education
Persistence
Application Services
App Services
Infrastructure
Domain
Application Core
App Services
Overview
Key Points
- Use CQRS to simply your overall design
- MediatR to manage requests, responses,
commands, queries, notifications and
events
- Work with VMs and DTOs
- FailFast with FluentValidation and Valit
- Create custom application exceptions
Interfaces
View Models
Events
Validators
Logic
Exceptions
13. Globalcode – Open4education
Persistence
Persistence
App Services
Infrastructure
Domain
Application Core
App Services
Overview
Key Points
- Independent of the database
- Conventions over configuration
- Use Fluent API configuration over data
annotations
- CodeFirst and Migrations
- Use an extension to automatically apply all
entity type configurations
Repository
Cache
Seeding
Configurations
Transactions
Migrations
14. Globalcode – Open4education
Persistence
Infrastructure
App Services
Infrastructure
Domain
Application Core
App Services
Overview
Key Points
- Implement interfaces(contracts) from
Application Layer
- No layer depends on Infrastructure Layer
- Move configuration outside the code
repository (e.g.: Consul or Azure KeyVault)
Clients
Email
System Clock
File System
Queue
Anything External
16. Globalcode – Open4education
Any fool can write code that a
computer can understand.
Good programmers write code
that humans can understand.
Martin Fowler
17. Globalcode – Open4education
Evolutionary Architecture
Incremental :
• Small and quick increments
• Hide implements behind interfaces
• Become reactive over predictive
An Attitude:
• Bring the pain forward
• Frequent releases
• Guide improvements based on Fitness Functions
Infrastructure
• Immutability
• Replaceability
• Assembility (container)
• Solid infra to deliver and
rollback product versions