Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
STORY DRIVEN
WEB DEVELOPMENT
MICHAEL KOUKOULLIS
PROGRAMMER
DESIGN
BUILD
WEB APPLICATIONS
STYLE OF DEVELOPMENT
SET OF TOOLS
WE FIND USEFUL
STORY DRIVEN DEVELOPMENT
CODE
RUBY
RAILS
CUCUMBER
HAPPY HAPPY SAD
WHAT I REALLY WANT?
WHY IT WORKS FOR US!
EVOLVING METHOD
DELIVERING BETTER SOFTWARE
ELEGANCE
ENJOYABLE
CREATIVE
STANDS ON ITS FEET
FOCUS. PEOPLE. TOOLS.
ON WITH THE SHOW
STORY DRIVEN DEVELOPMENT
EXAMPLE. FEATURE.
 Feature: Article tags
   In order to work with article tags
   As a site user
   I want to both create ...
EXAMPLE. FEATURE.


  Scenario: Creating a tag
    Given an article exists with no tags
    When I submit a new tag for th...
EXAMPLE. FEATURE.


  Scenario: Creating a tag
    Given an article exists with no tags
    When I submit a new tag for th...
EXAMPLE. FEATURE.
 Feature: Article tags
   In order to work with article tags
   As a site user
   I want to both create ...
DECLARATION OF INTENTION
NATURAL LANGUAGE
IMMENSELY POWERFUL
BEST THING YOU CAN DO AS A
PROGRAMMER?
CODE LESS.
EXAMPLE. FEATURE.
 Feature: Article tags
   In order to work with article tags
   As a site user
   I want to both create ...
WRITE PROSE
AVOID GETTING PROGRAMMATIC
MAKE IT A ‘REAL’ STORY
ITS EXECUTABLE!
WORKFLOW
RUNNING THE STORY
FEATURE. RUNNER.
DEFINING. STEPS.
DEFINING. MODELS.
DEFINING. MODELS.
class Article < ActiveRecord::Base
  has_many :taggings, :dependent => :destroy
  has_many :tags, :throu...
DEFINING. MODELS.
class Article < ActiveRecord::Base
  has_many :taggings, :dependent => :destroy
  has_many :tags, :throu...
DEFINING. MODELS.
class Article < ActiveRecord::Base
  has_many :taggings, :dependent => :destroy
  has_many :tags, :throu...
RERUNNING. FEATURE.
DEFINING. ROUTES.
ActionController::Routing::Routes.draw do |map|
  map.home quot;quot;, :controller => quot;pagesquot;, :...
RERUNNING. FEATURE.
DEFINING. CONTROLERS.
class TaggingsController < ApplicationController
  def create
    article = Article.find(params[:art...
RERUNNING. FEATURE. SUCCESS!
JUST IN TIME
APP DEV
WORKFLOW
SHARED STEPS
REGEX
DRY IT UP
DRY IT UP. REGEX MATCHING.
Given /^an article exists with no tags$/ do
  @article = Article.create!(:title => quot;Beautif...
DRY IT UP. REGEX MATCHING.
Given /^an article exists with no tags$/ do
  @article = Article.create!(:title => quot;Beautif...
DRY IT UP. REGEX MATCHING.
Then /^the article should have one tag$/ do
  @article.taggings.length.should == 1
end

Then /^...
DRY IT UP. REGEX MATCHING.
Then /^the article should have one tag$/ do
  @article.taggings.length.should == 1
end

Then /^...
DRY IT UP. REGEX MATCHING.
Feature: Article tags
  In order to work with article tags
  As a site user
  I want to both cr...
DRY IT UP. REGEX MATCHING.


  Given an article exists with 0 tags

  Then the article should have 1 tags




  Given an a...
WHAT ABOUT VIEWS?
RESPONSE.SHOULD
WEBRAT
VIEWS. RESPONSE.SHOULD
Feature: Viewing an article
  In order to read an article
  As a site user
  I want access the arti...
VIEWS. RESPONSE.SHOULD
When /^I view the article$/ do
  get article_path(@article)
end

Then /^I should see the page$/ do
...
VIEWS. WEBRAT
Scenario: Submitting the add tag form
  Given an article exists with 0 tags
  When I visit the article page
...
VIEWS. WEBRAT
Scenario: Submitting the add tag form
  Given an article exists with 0 tags
  When I visit the article page
...
STORY DRIVEN DEVELOPMENT
NATURAL LANGUAGE SPECS
ELEGANT
CHANCE TO CODE LESS
ENJOYABLE
THANK
YOU
MICHAEL KOUKOULLIS
twitter: kouky
email : m@agencyrainford.com
VIEWS. RESPONSE.SHOULD Feature: Viewing an
VIEWS. RESPONSE.SHOULD Feature: Viewing an
Upcoming SlideShare
Loading in …5
×

VIEWS. RESPONSE.SHOULD Feature: Viewing an Story Driven Web Development

17,162 views

Published on

VIEWS. RESPONSE.SHOULD
Feature: Viewing an article
In order to read an article
As a site user
I want access the article

Scenario: Viewing an article
Given an article exists with 1 tags
When I view the article
Then I should see the page
And I should see the article title
And I should see the article tag

Published in: Technology, Education

×