satisfy your technical curiosity essentials of architectural analysis – requirements /...
TRANSCRIPT
Satisfy Your Technical Curiosity
Essentials of Architectural Analysis – Essentials of Architectural Analysis – Requirements / ContstraintsRequirements / Contstraints
Ron JacobsRon JacobsArchitect EvangelistArchitect Evangelist
http://www.ronjacobs.comhttp://www.ronjacobs.com
What are What are requirements and requirements and constraints?constraints?
Where do I get the Where do I get the requirements from?requirements from?
What does a good What does a good requirement look requirement look like?like?
What are What are requirements and requirements and constraints?constraints?
Where do I get the Where do I get the requirements from?requirements from?
What does a good What does a good requirement look requirement look like?like?
Suppose you came to this field play a gameSuppose you came to this field play a game
Only to find that on this field…Only to find that on this field…
There are no goals and no boundariesThere are no goals and no boundaries
Would people run around aimlessly Would people run around aimlessly expending a lot of energy but never really expending a lot of energy but never really
accomplishing accomplishing anythinganything? ?
To win the game you have to scoreTo win the game you have to score
To score you have to know where the goal isTo score you have to know where the goal is
What is the goal of your project?What is the goal of your project?
Requirements define the goalRequirements define the goal
When you play the game there are rulesWhen you play the game there are rules
You have to keep the ball inside the boundariesYou have to keep the ball inside the boundaries
You have a limited amount of time to score goalsYou have a limited amount of time to score goals
You have a fixed set of playersYou have a fixed set of players
Only the goalkeeper can use their handsOnly the goalkeeper can use their hands
Constraints define the limits on the way you Constraints define the limits on the way you can meet the requirementscan meet the requirements
Requirements Influence ArchitectureRequirements Influence Architecture
FundingFunding
EstimationEstimation
Prioritization Prioritization
Product SelectionProduct Selection
TestingTesting
“The hardest single part of building a software system is deciding precisely
what to build”
-Frederick Brooks
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
Requirements are an InvestmentRequirements are an InvestmentPercent of Percent of Budget spent on Budget spent on requirementsrequirements
Number of Number of projectsprojects
Average Project Average Project Cost OverrunCost Overrun
Less than 5Less than 5 55 125%125%
5 to 105 to 10 77 83%83%
More than More than 1010
66 30%30%
Based on a study of NASA projectsBased on a study of NASA projects
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
What are What are requirements and requirements and constraints?constraints?
Where do I get the Where do I get the requirements from?requirements from?
What does a good What does a good requirement look requirement look like?like?
Levels of RequirementsLevels of Requirements
BusinessBusinessRequirementsRequirements
Vision & Scope DocumentVision & Scope Document
UserUserStoriesStories
Use Case DocumentUse Case Document
FunctionalFunctionalRequirementsRequirements
What game are we What game are we playing?playing?
What do the players What do the players need to do?need to do?
The game planThe game plan
BusinessBusiness
UserUser
SystemSystem
Two Types of RequirementsTwo Types of RequirementsFunctionalFunctional Non FunctionalNon Functional
BusinessBusinessRequirementsRequirements
Vision & Scope DocumentVision & Scope Document
UserUserStoriesStories
Use Case DocumentUse Case Document
FunctionalFunctionalRequirementsRequirements
Business RulesBusiness Rules
Quality Quality AttributesAttributes
External InterfacesExternal Interfaces
ConstraintsConstraints
Software RequirementsSoftware RequirementsSpecificationSpecification
BusinessBusiness
UserUser
SystemSystem
Satisfy Your Technical Curiosity
Where do I get Where do I get Requirements?Requirements?
User StoriesUser StoriesSurveysSurveysObservationObservationStakeholder interviewsStakeholder interviewsEnd user interviewsEnd user interviewsSimilar ProjectsSimilar ProjectsProblem reportsProblem reportsEnhancement requestsEnhancement requestsEnterprise ArchitectureEnterprise Architecture
Satisfy Your Technical Curiosity
John RahaimJohn RahaimPlanning DirectorPlanning Director
City of SeattleCity of Seattle
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
Enterprise Enterprise ArchitectureArchitecture
A comprehensive A comprehensive master plan or policymaster plan or policySupports the Supports the interests of the interests of the whole Enterprisewhole EnterpriseIntroduces Introduces requirements and/or requirements and/or constraints on the constraints on the solution architecturesolution architecture
Enterprise Architecture EnforcementEnterprise Architecture Enforcement
May have to justify deviation from policy during May have to justify deviation from policy during project reviewproject review
Sometimes like zoning ordinances these policies Sometimes like zoning ordinances these policies carry “force of law”carry “force of law”
Often just a collection of policy “suggestions”Often just a collection of policy “suggestions”
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
What are What are requirements and requirements and constraints?constraints?
Where do I get the Where do I get the requirements from?requirements from?
What does a good What does a good requirement look requirement look like?like?
Attributes of a good goalAttributes of a good goal
SS SpecificSpecific
MM MeasurableMeasurable
AA ActionableActionable
RR RealisticRealistic
TT Time-BoundTime-Bound
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
User StoriesUser Stories
Describes something the user wants to doDescribes something the user wants to doShort and to the pointShort and to the pointWritten by the user in non-technical languageWritten by the user in non-technical language
As a <role>I want to <feature>So that <benefit>
Satisfy Your Technical Curiosity
As a cowboy…As a cowboy… I want to I want to Rope a calf Rope a calf From my From my horsehorse
So that I can bring it back to the barn forSo that I can bring it back to the barn forwithout having to chase it on my ownwithout having to chase it on my own
User Story: Calf ropingUser Story: Calf roping
Satisfy Your Technical Curiosity
User Story: Withdraw cashUser Story: Withdraw cash
As a cardholderAs a cardholder
I want to I want to WithdrawWithdrawCashCash
So that I don’t have to wait for the bank So that I don’t have to wait for the bank to open or wait in line inside.to open or wait in line inside.
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
Planning GamePlanning Game
A way to get the A way to get the business and business and development to agree development to agree on and scope the on and scope the projectprojectBusiness describes what Business describes what they want as user they want as user stories and assigns a stories and assigns a business valuebusiness valueDevelopment estimates Development estimates the cost to implement the cost to implement the storythe story
Withdraw CashWithdraw Cash Value: 10
Value: 10Cost: 4 daysCost: 4 daysAs a cardholder
As a cardholderI want to withdraw cash
I want to withdraw cashSo that I don’t have to wait for the bank
So that I don’t have to wait for the bank
To open or wait in line inside.
To open or wait in line inside.
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
ScenariosScenarios
Think through the story Think through the story and describe variations on and describe variations on how the story could turn how the story could turn outoutHelps you to find Helps you to find interesting aspects of the interesting aspects of the story that the user failed story that the user failed to mentionto mentionWhat happens if…?What happens if…?
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
Scenario TemplateScenario Template
Scenarios define the behavior that the user Scenarios define the behavior that the user story introduces to the systemstory introduces to the system
Given that <Condition(s)>When <Action>
Then <Behavior>
Satisfy Your Technical Curiosity
Scenario: Account has credit balanceScenario: Account has credit balance
Given the account is in creditGiven the account is in creditAnd the card and pin-code are validAnd the card and pin-code are validAnd the dispenser contains cashAnd the dispenser contains cash
When the customer requests cashWhen the customer requests cash
Then ensure the account is debitedThen ensure the account is debitedAnd cash is dispensedAnd cash is dispensedAnd the card is returnedAnd the card is returned
Satisfy Your Technical Curiosity
User stories beget scenarios
Scenarios beget acceptance criteria
Acceptance criteria beget completed features
Completed features begetFinished iterations
Finished iterations begetUser stories….
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
Requirements ChecklistRequirements Checklist
Does the project have a clear vision?Does the project have a clear vision?Do the team members believe the vision is Do the team members believe the vision is realistic?realistic?Does the project have a business case that Does the project have a business case that details the business benefit and how it can be details the business benefit and how it can be measured?measured?
Software Project Survival Guide – Steve McConnellSoftware Project Survival Guide – Steve McConnell
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
Requirements ChecklistRequirements Checklist
Does the project have a UI prototype?Does the project have a UI prototype?Does the project have a detailed written Does the project have a detailed written specification of what the software is supposed specification of what the software is supposed to do?to do?Did the project team interview people who Did the project team interview people who will actually use the software early in the will actually use the software early in the project and continue to involve them project and continue to involve them throughout?throughout?
Software Project Survival Guide – Steve McConnellSoftware Project Survival Guide – Steve McConnell
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
TraceabilityTraceability
For every *thing* in the project we ought to For every *thing* in the project we ought to be able to answer the questionbe able to answer the question
Why is this (code, feature, etc.) in there?Why is this (code, feature, etc.) in there?
Good AnswersGood AnswersUser Stories “X” and “Y” require itUser Stories “X” and “Y” require itIt insures that the requirement “Foo” is satisfiedIt insures that the requirement “Foo” is satisfied
Bad AnswersBad AnswersUm… Not sureUm… Not sureSam thought that it would be really coolSam thought that it would be really cool
Satisfy Your Technical Curiosity
Essentials of Architecture AnalysisEssentials of Architecture AnalysisPart 2: Patterns / FrameworksPart 2: Patterns / Frameworks
Ron JacobsRon JacobsArchitect EvangelistArchitect Evangelistwww.ronjacobs.comwww.ronjacobs.com
How can I as an architect How can I as an architect leverage the experience leverage the experience of others?of others?
What do I need to know to What do I need to know to understand patterns and understand patterns and Anti-Patterns?Anti-Patterns?
What about frameworks What about frameworks and reference and reference implementations?implementations?
How can I as an architect How can I as an architect leverage the experience leverage the experience of others?of others?
What do I need to know to What do I need to know to understand patterns and understand patterns and Anti-Patterns?Anti-Patterns?
What about frameworks What about frameworks and reference and reference implementations?implementations?
4000 years ago an architect 4000 years ago an architect named Imhotep faced a problemnamed Imhotep faced a problem
How to provide Pharaoh Khufu How to provide Pharaoh Khufu an eternal home to insure his “Ka”an eternal home to insure his “Ka”would be at peace in the afterlifewould be at peace in the afterlife
And to insure that Khufu’s monument would be And to insure that Khufu’s monument would be greater than any greater than any mastabamastaba built by his predecessors built by his predecessors
A mastaba was a flatroofed, mudbrick, A mastaba was a flatroofed, mudbrick, rectangular building with sloping sides rectangular building with sloping sides that marked the burial site of many eminent that marked the burial site of many eminent Egyptians of Egypt's ancient period.Egyptians of Egypt's ancient period.
The oldest pyramid was built for Pharaoh DjozerThe oldest pyramid was built for Pharaoh Djozer
Imhotep built this one by stacking six mastabasImhotep built this one by stacking six mastabas
King Sneferu, the father of Khufu, built the initial true pyramids
They initially started with 60° walls but when the pyramids collapsed they changed to 55 ° and later to a standard 43° pyramid.
……PatternsPatterns
The Egyptians dominated their The Egyptians dominated their region for 3000 years. What region for 3000 years. What made them better competitors made them better competitors than their rivals?than their rivals?
Knowledge is hard to acquireKnowledge is hard to acquire
Transfer of and building on the Transfer of and building on the knowledge acquired by others knowledge acquired by others provides significant advantagesprovides significant advantages
How can I as an architect How can I as an architect leverage the experience leverage the experience of others?of others?
What do I need to know to What do I need to know to understand patterns and understand patterns and Anti-Patterns?Anti-Patterns?
What about frameworks What about frameworks and reference and reference implementations?implementations?
PatternsPatterns
FrameworksFrameworks
Reference ImplementationReference Implementation
PlatformPlatform
AbstractAbstract
ConcreteConcrete
Patterns are mind sized chunks of knowledgePatterns are mind sized chunks of knowledge
They seek to provide a solution They seek to provide a solution To a specific problemTo a specific problem
Patterns use a form to describe the problemPatterns use a form to describe the problemand solutionand solution
Patterns are often grouped or related Patterns are often grouped or related in various ways to provide larger solutionsin various ways to provide larger solutionsand often implemented into frameworksand often implemented into frameworks
The The classic classic work that work that started the started the patterns patterns movement movement in softwarein software
Data Application
Deployment
Infrastructure
Architecture
Design
Implementation
http://www.patternshare.orghttp://www.patternshare.org
ContextContext
• Provides a basis for understanding where the pattern is Provides a basis for understanding where the pattern is applicableapplicable
• Is this pattern relevant to my work?Is this pattern relevant to my work?You are serving as a You are serving as a high priest in the high priest in the court of Pharaoh court of Pharaoh Kufu who has asked Kufu who has asked you to insure that he you to insure that he will have a smooth will have a smooth journey into journey into immortality allowing immortality allowing him to assume his him to assume his place among the place among the gods.gods.
ProblemProblem
• A concise statement of the problem you are solving in the A concise statement of the problem you are solving in the stated contextstated context
You are serving as a You are serving as a high priest in the high priest in the court of Pharaoh court of Pharaoh Kufu who has asked Kufu who has asked you to insure that he you to insure that he will have a smooth will have a smooth journey into journey into immortality allowing immortality allowing him to assume his him to assume his place among the place among the gods.gods.
ForcesForces
• Requirements and Constraints that will impact the Requirements and Constraints that will impact the possible solutionspossible solutions
• You must build the monument on the west bank of the Nile as this is the direction where the sun god “Ra” departs every evening
• The monument will require a complex of buildings including a mummification temple where the body will be prepared for eternity just as Anubis prepared the body of Osiris at the direction of Isis after he was killed by his brother Set
• Ongoing celebrations and funerary rituals must be performed at the site to insure the “Ka” or spirit of the king would take up residence in the statue of him at the site.
• Your Pharaoh wants his monument to be bigger, better and more glorious than any previous monuments or temples built for previous Pharaohs.
SolutionSolution
• Describes the solution to the problem in detail including Describes the solution to the problem in detail including code examples and diagramscode examples and diagrams
You create a monument worthy of Pharaoh Kufu by adapting a previous design of stacked mastabas (known as the step pyramid of Pharaoh Djoser) but even better with smooth sides perfectly level, square and aligned to the stars… the Great Pyramid of Pharaoh Kufu!
ExamplesExamples
• Refer to known examples of this pattern being Refer to known examples of this pattern being implemented implemented
See pyramids of See pyramids of Dojzer and Senferu for Dojzer and Senferu for inspirationinspiration
Resulting ContextResulting Context
• What is the impact of using this pattern?What is the impact of using this pattern?
• What are the benefits and liabilities?What are the benefits and liabilities?
You will need about 25,000 You will need about 25,000 workers over the course of workers over the course of about 20 years at what will be about 20 years at what will be a staggering cost to the a staggering cost to the economy but Egypt is doing economy but Egypt is doing well so hey – give the Pharaoh well so hey – give the Pharaoh a royal send-off to the a royal send-off to the afterlife… he deserves it.afterlife… he deserves it.
Anti-PatternsAnti-Patterns
• Avoid pitfalls by learning the common mistakes that others Avoid pitfalls by learning the common mistakes that others make over and over againmake over and over again
ContextContextProblemProblemSolutionSolutionSymptomsSymptoms
How do you know when you see it?How do you know when you see it?
ConsequencesConsequencesWhat if you don’t fix it?What if you don’t fix it?
Root CauseRoot CauseWhat is really causing this?What is really causing this?
Suggested SolutionsSuggested SolutionsWhat you can do about itWhat you can do about it
How can I as an architect How can I as an architect leverage the experience leverage the experience of others?of others?
What do I need to know to What do I need to know to understand patterns and understand patterns and Anti-Patterns?Anti-Patterns?
What about frameworks What about frameworks and reference and reference implementations?implementations?
PatternsPatterns
FrameworksFrameworks
Reference ImplementationReference Implementation
PlatformPlatform
AbstractAbstract
ConcreteConcrete
FrameworksFrameworks
• A partial implementation of one or more patterns focused A partial implementation of one or more patterns focused on helping you build a solutionon helping you build a solution
.NET Framework.NET FrameworkASP.NETASP.NETADO.NETADO.NETEnterprise LibraryEnterprise LibraryCSLA.NETCSLA.NETOpenNETCFOpenNETCF
PatternsPatterns
FrameworksFrameworks
Reference ImplementationReference Implementation
PlatformPlatform
AbstractAbstract
ConcreteConcrete
Mobile Client Software FactoryMobile Client Software FactoryRI: AdventureWorks2GoRI: AdventureWorks2Go
Business Logic
Data and Web Svc
Occasionally Connected Web Services
Data Synchronization
Business Logic
Management
Deployment
Logging
User Experience
WinForms CAB Extensions for Mobile
Views
Presenters
Business Logic Controllers
Business Workflows
CAB
Configuration
Replication Web Services Calls
Gateway
Staging DBBusiness DataConfiguration DataDeployment Data
Web Services
Admin Console
VS.NET
Mobile Designer
Form FactorDot Density (DPI)Orientation
Mobile Device
Business TransactionsLogging
QueuesManaging Subscriptions
Business Entities
User Experience
Security
Web Service Credentials
Authorization
Connectivity
Managing Connection
Physical Addresses
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
Software FactoriesSoftware Factories
A combination of patterns, frameworks and A combination of patterns, frameworks and tooling designed to make implementation a tooling designed to make implementation a repeatable processrepeatable processWeb Services Software FactoryWeb Services Software FactorySmart Client Software FactorySmart Client Software FactoryWeb Client Software FactoryWeb Client Software Factoryhttp://msdn.microsoft.com/practices
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
IssuesIssues
Software factory and framework designers Software factory and framework designers must carefully balance generated code vs. must carefully balance generated code vs. framework code.framework code.Generated code is easier to understand and Generated code is easier to understand and follow but more difficult to change laterfollow but more difficult to change laterFramework code is easier to change but more Framework code is easier to change but more difficult to understanddifficult to understand
Satisfy Your Technical CuriositySatisfy Your Technical Curiosity
AdviceAdvice
Consider carefully the patterns and Consider carefully the patterns and frameworks you will useframeworks you will use
Complexity and learning curve is an issueComplexity and learning curve is an issueApplicability to context is crucialApplicability to context is crucial
Own the frameworks you useOwn the frameworks you useMerge changes and Bug fixes into new releasesMerge changes and Bug fixes into new releasesTraining and supportTraining and support