architecture - why so serious?

19

Click here to load reader

Upload: barbara-fusinska

Post on 28-Jun-2015

381 views

Category:

Software


1 download

DESCRIPTION

DDD East Anglia slides

TRANSCRIPT

Page 1: Architecture - why so serious?

Architecture – why so serious?

Barbara Fusinska@BasiaFusinska

Page 2: Architecture - why so serious?

About me

[email protected]@BasiaFusinska

http://basiafusinska.com

Page 3: Architecture - why so serious?

Agenda

• What is architecture?• Let’s Go Out survey– Infrastructure– Domain– DB access

Page 4: Architecture - why so serious?

What is architecture?

• Network distribution• Software components• Services APIs• Infrastructure• Domain Design

Page 5: Architecture - why so serious?

Here & Now

• ASP.Net MVC Web Application• Approaches & Patterns• Components/Infrastructure/Domain

Page 6: Architecture - why so serious?

App demonstration

• Let’s Go Out• Scheduling

Page 7: Architecture - why so serious?

Basics – how to start?

• Configuration• IoC container• You don’t have to inject everything

Page 8: Architecture - why so serious?

DB access

DBCode

Page 9: Architecture - why so serious?

CRUD Hell

• ADO.Net• ORM

Page 10: Architecture - why so serious?

Chose ORM strategy

• Micro ORMs– CRUD– SQL brought to the front

• Full-fledged ORMs– Change tracking– Unit of Work– Identity map– DDD

Page 11: Architecture - why so serious?

Repositories… just don’t

• CRUD in Repository or FindBy… wrappers• Used only once• Save

Page 12: Architecture - why so serious?

DB schema

Page 13: Architecture - why so serious?

Read model

• Leave the work to DB• Don’t be afraid of plain SQL• Separate entities

Page 14: Architecture - why so serious?

Command Part

• Insert & Update• Identity Pattern• Unit of Work

Page 15: Architecture - why so serious?

Services

• Unit of Work• DTOs objects• Transactions

Page 16: Architecture - why so serious?

Commands

• Only one controller dependency• Clean domain API• Easier controller testing (only binding or

validation)• Logging in bus

Page 17: Architecture - why so serious?

Transactions

• Connection closing• Saving changes/Commiting• Per request

Page 18: Architecture - why so serious?

Summary

• IoC containers• ORMs• Separating ReadModel from Domain• Commands• Transactions

Page 19: Architecture - why so serious?

Q & A

Thank you@BasiaFusinska

http://basiafusinska.com