lets focus on business value
DESCRIPTION
A talk I presented at Southern California Team System, 26th of February 2013 about the importance of delivering business value and how you as a developer can much easier meet the requirements of the end user by applying practices like DDD and utilizing things like CQRS and MVVM to help decouple your software and focus better.TRANSCRIPT
Lets focus on business value
Power point template by Colin Eberhardt
Agenda
How to focus on business value
Domain Driven Design
Concrete patterns; CQRS, MVVM
Bifrost – an open-source framework to cover it all
Who am I
Einar Ingebrigtsen
[email protected]@einari
http_//www.dolittle.comhttp://blog.dolittle.com
http://www.ingebrigtsen.info
Statistics
Software projects2009:- 32% successful- 24% failed- 44% challenged
2004:- Cancelled projects cost $55 Billion
Annually http://www.projectsmart.co.uk/docs/chaos-report.pdf
Statistics
http://www.typemock.com/blog/2012/07/18/the-severity-of-bugs-are-we-doomed/
What are we getting paid to do?
Use the most fancy technology out there
C# 5.0, Roslyn, F#, TPL, ASP.net MVC 3, SignalR, RavenDB
Join the alpha geek crew and use all the latest buzz words and create an architecture around that showcase our technical skills?
DELIVER BUSINESS VALUE!
What is business value?
Helping the business achieve its objectives
The short answer
Simpler Cheaper Better MoreFaster
Why is this hard to do?
Developers don’t understand what the business needs
The Business doesn’t understand what the business needs
Why is this hard to do?
Even if we do understand what they want, we can’t build it because of ...
Race conditions
Transactions Logging SerializationEager
loadingPerformance
Caching Mapping Auditing Concurrency StalenessLazy
loading
Why is this hard to do?
If somehow we’ve managed to get our infrastructure in place and give the
business what it needs, it’s TOO LATE!
Market Changes
New CompetitorAcquisitions
Legal Changes
New Priorities
New Requirements
Be agile!
Not just in terms of process (Scrum, Kanban, XP)
We need to be able to changedecisionsprioritiesCODE!!
Understand who your user is
Feedback loop
Talk to users regularly
TestTDD / BDDExecutable SpecificationsTesters
Please fail!
Fail regularly and fail fast
Be Agile and really iterate
Be honest!
Domain Driven Design
Focus on the core domain
Creative collaboration between domain experts and software practitioners
Create a common language and common understanding of the domain
Domain Driven Design
Building blocksAggregate RootsValue ObjectsServicesRepositoriesEntities… and more…
http://domaindrivendesign.org/books/evans_2003
Bounded Contexts
Different representations in different contexts
Bounded Contexts - Shopping
Bounded Contexts – Shift Management
EmployeePlays a central role – identified by Social Security Number
SubstituteIt refers to the Employee by concept, but we do not need its address – only its availability and possibly its name for display purposes
Decoupling
Application LevelMake many applications
Unit LevelInterchangeable components
New CodeVelocity
The opposite of decoupling
DRY – Don’t Repeat Yourself
Use of concrete implementations
Single Responsibility Principle
Types represent one thing
Methods do only one thing
Be fine grained and clear
Easier to name
http://en.wikipedia.org/wiki/SOLID_(object-oriented_design)
CQRS
Command
Domain Event Handlers
Persist
Publish
Update
Domain Persistence
Read Model
Client
Queries
Command
Expresses what should happen
Should express intentAddItem- / AddAccessory- ToCart - maps to AddProduct() on the AggregateRoot
EventSource
The source of events
The place that events originate from
Aggregate Root
Holds only internal state, if needed - no public state
Exposes behavior as methods
Event
Represents the truth in the system; “... this is what happened...”
Simple DTO with primitive properties only!
MVVM
Model
View
ViewModel Observable
Observes
Get from server
bifrost
Bifrost
Full end to end framework for line-of-business application development
Promotes good practices such as CQRS, MVVM through high focus on DDD
You don’t need the entire thing, but will get benefits for every component you add
Bifrost
Our motivationA platform for us to build LOB applications onMake us focus on delivering business valueEasy to use, hard to use wrong“It just works!”
Bifrost
Client focusJavaScriptASP.netSingle Page ApplicationsWeb in generalSilverlightWinRT (Experimental)
Bifrost
BackendCQRSCloud scale
Realtime applicationsClients persistently connected to the server
Bifrost - Architecture
Client
Server
DomainQueries
Meta DataRead
Models
Results /Meta Data
Invoke Behavior
Result that affectQueries and Read Models
CQRS – Bifrost Style
Command
Command Coordinator
Client
Command Handler(s)
Aggregate Root
Events
EventStore
Event Subscriber(s)Read Model
User story
Persona: HannahWorks with human resources, she is responsible for hiring of permanent employees but also for finding substitutes when people are on sick leaves
As Hannah I need to be able to quickly register any employees coming in before we got all the details about the person
User story
RequirementsFirst Name - RequiredLast Name - RequiredSocial Security Number – Required
This is what identifies a person uniquely
Where are we??
Command
Client
Command Handler(s)
Aggregate Root
Events
EventStore
Event Subscriber(s)Read Model
ViewModel ViewModel
Bifrost – What did we solve?
DecouplingCommands representing the behaviorEvents are the contractRead and behavior are two different things
Working in parallel
Making it easier to apply agile principles
Bifrost - Roadmap
Realtime applicationsClients persistently connected to the server
Refine client model
FormalizationsBounded Context, Modules …
Simplifications
Scale out optionsRedis, Azure ++
Getting started
Summary
OUR SOFTWARE CAN GET BETTER!WE CAN DO BETTER!
Domain Driven DesignWill help you establish a language and understand what you’re creating
CQRSLets you establish a set of good patterns and practices, mind opener
BifrostOne incarnation – but not look at it as a CQRS implementation, it is so much more
Please rate the talk athttp://tinyurl.com/BusinessValue2
http://blog.dolittle.com http://bifrost.dolittle.com http://github.com/dolittle/bifrost
Thanks for your
attention