Real-world software design practices when developing ASP.NET web systems by Bojan Veljanovski
1. Bojan Veljanovski
Software Development Engineer | Technical Architect
HASELT
Ready
Real-world software design
practices when developing
ASP.NET web systems
3. A quick chat
• Users interact with apps by INTENT
• Server processes ACTIONS
• Who triggers those ACTIONS?
Ready
4. Example of User Intent in medical institution
• Actor: Patient
Ready
– Request an appointment with the doctor
– Cancel appointment
– Re-schedule appointment
• Actor: Doctor
– Confirm requested patient’s appointment
– Deny requested patient’s appointment
– Check schedule
– Look into historical medical records for the patient
5. Example of a System Action
• Patient Actions
Ready
– RequestNewAppointment
– CancelRequestedAppointment
– RequestAppointmentReschedule
• Doctor Actions
– ConfirmRequestedAppointment
– DenyRequestedAppointment
– GetSchedule
– GetHistoricalRecordsForPatient
6. Example of a System Action
• Patient Actions
Ready
– RequestNewAppointment
– CancelRequestedAppointment
– RequestAppointmentReschedule
• Doctor Actions
– ConfirmRequestedAppointment
– DenyRequestedAppointment
– GetSchedule
– GetHistoricalRecordsForPatient
• WRITE
• WRITE
• WRITE
• WRITE
• WRITE
• READ
• READ
7. Example of a System Action
• Patient Actions
Ready
– RequestNewAppointment
– CancelRequestedAppointment
– RequestAppointmentReschedule
• Doctor Actions
– ConfirmRequestedAppointment
– DenyRequestedAppointment
– GetSchedule
– GetHistoricalRecordsForPatient
• Command
• Command
• Command
• Command
• Command
• Query
• Query
8. Evolving Architecture
Users work with apps by INTENT.
Your UI should capture it!
Your system should process it!
Ready
10. Bojan Veljanovski
Ready
• Software Development Engineer and Technical Architect
at HASELT
• HyperLAB Coordinator
• Technical Speaker
• Microsoft Certified Professional
• Former Microsoft Student Partner
Favorite topics:
– Software Architectures and Design
– Code. Code. Code.
– Emerging technologies
12. Evolving Architecture
Classical Layered Architecture
Ready
UI
DTO
ASP.NET
DTO
App Services
Domain Object
Data Access Logic
Data Structure
DB
Validation
Business Logic
Data Reads
Data Writes
13. Evolving Architecture
Adding Query
Ready
UI
DTO
ASP.NET
DTO
App Services
Domain Object
Data Access Logic
Data Structure
DB
Validation
Business Logic
Some Data Reads
Data Writes
Query
Handler
Data Reads
Query Result
Domain Object
14. Evolving Architecture
Going further with the Query
Data Reads
Ready
UI
DTO
ASP.NET
DTO
App Services
Domain Object
Data Access Logic
Data Structure
DB
Validation
Business Logic
Some Data Reads
Data Writes
Query Result
Query
Handler
Denorm
Structure
15. Evolving Architecture
Adding Command
Data Reads
Ready
UI
DTO
ASP.NET
DTO
App Services
Domain Object
Data Access Logic
Data Structure
DB
Validation
Business Logic
Some Reads
Writes
Query Result
Query
Handler
Denorm
Structure
Command
Command
Handler
Domain Object
16. Evolving Architecture
Some cleaning
Data Reads
Ready
UI
ASP.NET
Data Access Logic
Data Structure
DB
Validation
Business Logic
Some Reads
Writes
Query Result
Query
Handler
Denorm
Structure
Command
Command
Handler
Domain Object
17. Evolving Architecture
Some cleaning
Data Reads
Ready
UI
ASP.NET
Data Access Logic
Data Structure
DB
Validation
Business Logic
Some Reads
Writes
Query Result
Query
Handler
Denorm
Structure
Command
Command
Handler
Domain Object
Query Result Command
31. Evolutionary Database Development
Evolutionary Database
Development
• A DB consist of Schema and Test Data
• Schema is Source Code
• Schema changes are tracked over-time
• Version it in GIT
• Every dev gets its own db instance
• Devs make frequent integrations into shared master
db
• FluentMigration mechanisms help us build our db in
any RDMS system we want
Ready
33. Summary
• Users work with apps by INTENT
• System processes ACTION triggered by INTENT
• READS are different from WRITES
Ready
– Treat them as so, in your code, yo
• Components are simple, inter-components communication
is hard
• Database schema is source code too – it evolves
– Version it
• Don’t fall into the tech hype hole
– Think
• There are no ‘best practices’, only ‘good practices in
context’
34. Questions
Ready
Complete the
evaluation and earn the
chance to win valuable
prizes from our
sponsors