BDD with F# at DDDScot
-
Upload
phillip-trelford -
Category
Technology
-
view
1.810 -
download
4
description
Transcript of BDD with F# at DDDScot
BDD with F#Phillip Trelford
@ptrelfordhttp://trelford.com/blog
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
Fun and Profit
0 Introduction0Fun with F#
0 Intro -> Code -> What next0Profit with BDD
0 Intro -> Code -> What next0Q & A
Functional
Myth 1
“F# is a purely functional
programming language”
F# is more a mix of
F#
C#
OCamlPython
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
Myth 2
“FP is slow”
Performance
Myth 3
“F# is Academic”
Commercial Users
We could not have developed 200 models in two years without F# and Visual Studio. It would have taken us at least twice as long with our previous tools.
Directorlarge European financial services firm
F# Books
Meet the F#ers
@rickasaurus
@tomaspetricek
@dmohl
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
User Stories
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
Behaviour Driven Development
“Acceptance criteria should be executable”- Dan North in Introducing BDD Article
First Steps in BDD on .Net
•Shell•C# &
F#
StorEvil•Visu
al Studio
•C#SpecFlow
•F# & C#
•VS & Shell
?
?
Visual Studio
NUnitGherkin
Look no hands
Look no hands
TickSpec
Demo
BDD Books
Lifetime BDD Awards
@tastapod
@lunivore
@gojkoadzic
@jbandi
#chtd Quote from "future of .net " Have a look at F# for two days and you will find yourself two years ahead of your peer .net devs. #fsharp
Q & A
Or contact me in confidence:0Twitter: @ptrelford0E-mail: phil(at)trelford.com0 In-person: http://meetup.com/FSharpLondon