35
Continuous Feature Development

Continuous feature-development

Embed Size (px)

DESCRIPTION

This is about encouraging our audience about known good practices. let them introduced why continuous feature development is essential and why that adds value over following rigid processes.

Citation preview

Page 1: Continuous feature-development

Continuous Feature Development

Page 2: Continuous feature-development

What is feature ?

Page 3: Continuous feature-development

“A set of client's expected functional

behaviors”

Page 4: Continuous feature-development

Feature development ?

Page 5: Continuous feature-development

“Incrementally building expected functional

behaviors”

Page 6: Continuous feature-development

Why it is continuous ?

• Client’s expectation changed• Business changed• User’s perception changed• Competitive advantages • Rebranding

Page 7: Continuous feature-development

Yes! That’s why we call Continues Feature Development

Page 8: Continuous feature-development

Continuous Feature Development Challenges ?

• Integrating new feature• Maintaining existing stability• Maintaining new development • Making sure of seamless integration• Managing trust

Page 9: Continuous feature-development

How we are managing them ?

Page 10: Continuous feature-development

we leave the broken system alone and let the

client shout on us.

Page 11: Continuous feature-development

Really!

YES!, due to client’s fault since they pushed and wanted faster release

Page 12: Continuous feature-development

How about you guys ?

May be ? Not always!

Page 13: Continuous feature-development

How it should be (buzz words) ?

• Acceptance test driven development• Test Driven Development• Behavior Driven Development• Continuous Integration

Page 14: Continuous feature-development

How we are practicing instead!

Page 15: Continuous feature-development

#1 Collecting acceptance criteria

• Know what exactly client wants• Ask lotta questions to get full picture• Ask for mockup• Split story into several acceptance criteria• For example – User wants to login– Which user ? – any user– Requires what ? – user id and password– How many attempts ? – probably 3

Page 16: Continuous feature-development

Available tools

• Pivotal tracker – http://pivotaltracker.com/• You can use any issue tracker• Trello Board - http://trello.com• Trac (or any wiki)• Or notepad

Page 17: Continuous feature-development

#2 Test first developmentdescribe ’Login' with valid email and password it should say 'Login successful' it should create user session

with wrong email address it should say ‘unsuccessful login' it should not create user session

with wrong password it should say ’unsuccessful login' it should not create user session

Page 18: Continuous feature-development

Available PHP solutions

• BDD framework– Cuke4php http://rubygems.org/gems/cuke4php– Behat http://behat.org/– PHPUnit http://bit.ly/9McVAs

• Unit testing framework– PHPUnit http://www.phpunit.de/– SimpleTest http://simpletest.org/

Page 19: Continuous feature-development

BDD using Behat 1Feature: ls In order to see the directory structure As a UNIX user I need to be able to list the current directory's contents

Scenario: List 2 files in a directory Given I am in a directory "test" And I have a file named ”file1.txt" And I have a file named ”file2.txt" When I run "ls" Then I should get: """ file1.txt file2.txt """

Page 20: Continuous feature-development

BDD using Behat 2

class FeatureContext extends BehatContext{ /** * @Given /^I am in a directory "([^"]*)"$/ */ public function iAmInADirectory($dir) { if (!file_exists($dir)) { mkdir($dir); } chdir($dir); }} Source - http://docs.behat.org/quick_intro.html

Page 21: Continuous feature-development

Unit test using PHPUnitclass ArrayTest extends PHPUnit_Framework_TestCase { public function testNewArrayIsEmpty() {

$fixture = array(); $this->assertEquals(0, sizeof($fixture)); } public function testArrayContainsAnElement() {

$fixture = array();$fixture[] = 'Element';$this->assertEquals(1, sizeof($fixture));

}}

Source - http://www.phpunit.de/manual/3.2/en/writing-tests-for-phpunit.html

Page 22: Continuous feature-development

#3 Don’t say “Hello it’s done” without running all tests

Page 23: Continuous feature-development

Available PHP solutions

• Almost all standard IDEs– PhpStorm– NetBeans– Eclipse

Page 24: Continuous feature-development

#4 Code in feature branch NOT in master!

• Master (Main code stream)– Branches• Fix_bug_with_validation• Add_xyz_module• Migrate_to_php_5_3

Page 25: Continuous feature-development

Example using GIT

• Create new branch– $ git branch < branch name >

• Checkout specific branch– $ git checkout < branch name >

• Update branch from master– $ git rebase master

Page 26: Continuous feature-development

#5 Code review

Page 27: Continuous feature-development

Available solutions

• Github provides pull request based code review – http://github.com

• Retrospectiva - https://github.com/dim/retrospectiva

• Trac code review module• Crucible -

http://www.atlassian.com/software/crucible/overview

• http://code.google.com/p/gerrit/

Page 28: Continuous feature-development

#6 Maintain production branch

Page 29: Continuous feature-development

#7 Use staging server

• Deploy in staging server first• Run test suites• If not passes test go through – Fix again – write supporting test – deploy in

staging server - Retest – Human test

Page 30: Continuous feature-development

#8 Continuous Integration

Page 31: Continuous feature-development

Available PHP solutions

• Jenkins - http://jenkins-ci.org/• phpUnderControl -

http://phpundercontrol.org/• Xinc - http://code.google.com/p/xinc/

Page 32: Continuous feature-development

#9 Ensure revertible deployment

Page 33: Continuous feature-development

Let’s summarize our talk

• #1 Collecting acceptance criteria• #2 Test first development• #3 Don’t say “Hello it’s done”

without running all tests• #4 Code in feature branch NOT in master• #5 Code review• #6 Maintain production branch• #7 Use staging server• #8 Continuous Integration• #9 Ensure revertible deployment

Page 34: Continuous feature-development

I guess that’s all for today !

Thanks for joining us.

Page 35: Continuous feature-development

Who are we ?

nafi ul karimsenior software engineer,somewhere in…[email protected]

passion – new stuffs, diversity on work, challenges, learning new things, open to all languages.

nhm tanveer hossain khan (hasan)head of technology, somewhere in…founder, [email protected]

work for fun! Code on rails, java, node.js, php