BDD with F# at DDD9

26
BDD with F# Phillip Trelford @ptrelford http://trelford.com/blog

Transcript of BDD with F# at DDD9

Page 1: BDD with F# at DDD9

BDD with F#Phillip Trelford

@ptrelfordhttp://trelford.com/blog

Page 2: BDD with F# at DDD9

Jargon Buster

0FP = Functional Programming0 Immutable = Doesn’t change0 Idempotent = Free from side effects0DSL = Domain Specific Language 0BDD = Behaviour Driven Development

0Agile Acceptance Testing0Acceptance-Test Driven Development 0Story-Testing0Specification by Example

Page 3: BDD with F# at DDD9

Fun and Profit

0 Introduction0Fun with F#

0 Intro -> Code -> What next0Profit with BDD

0 Intro -> Code -> What next0Summary0Q & A

Page 4: BDD with F# at DDD9

Fun and Profit

F# BDD

Page 5: BDD with F# at DDD9

Functional

Page 6: BDD with F# at DDD9

Myth 1

“F# is a purely functional

programming language”

Page 7: BDD with F# at DDD9

F# is more a mix of

F#

C#

OCamlPython

Page 8: BDD with F# at DDD9

Code Samples

1: // Declare a local value (inferred type is string)2: let world = "world"3: 4: // Using '%s' format specifier to include string parameter

5: printfn "Hello %s!" world

 

Page 9: BDD with F# at DDD9

Myth 2

“FP Will Solve Multi-Core”

Page 10: BDD with F# at DDD9

Parallel Haskell

Page 11: BDD with F# at DDD9

Myth 3

“C/C++ is always faster”

Page 12: BDD with F# at DDD9

Performance

Page 13: BDD with F# at DDD9

Applications

F#Explorative

Succinct

Language Orientated

Integrated

Concurrent

Page 14: BDD with F# at DDD9

F# Books

Page 15: BDD with F# at DDD9

Meet the F#ers

@rickysaurus

@tomaspetricek

@dmohl

Page 16: BDD with F# at DDD9

Agile Manifesto

0 Individuals and interactions over processes and tools

0 Working software over comprehensive documentation

0 Customer collaboration over contract negotiation

0 Responding to change over following a plan

Page 17: BDD with F# at DDD9

User Stories

Page 18: BDD with F# at DDD9

Acceptance Test Scenario

Refunded items should be returned to stock0Given a customer buys a black jumper0And I have 3 black jumpers left in stock0When he returns the black jumper for a refund0Then I should have 4 black jumpers in stock

Page 19: BDD with F# at DDD9

Behaviour Driven Development

“Acceptance criteria should be executable”- Dan North in Introducing BDD Article

Page 20: BDD with F# at DDD9

BDD Frameworks

General .Net specific

0Concordion0Cucumber0 JBehave0 JSpec0RSpec (Ruby)

0NBehave0Racounteur0SpecFlow0StorEvil0TickSpec (F#)

Page 21: BDD with F# at DDD9

TickSpec

Page 22: BDD with F# at DDD9

Demo

Page 23: BDD with F# at DDD9

BDD Books

Page 24: BDD with F# at DDD9

Lifetime BDD Awards

@tastapod

@lunivore

@gojkoadzic

Page 25: BDD with F# at DDD9

IT Alignment Trap

Page 26: BDD with F# at DDD9

Q & A

Or contact me in confidence:0Twitter: @ptrelford0E-mail: phil(at)trelford.com0 In-person: http://meetup.com/FSharpLondon