just java2008 - java meets agile

38
Java Meets Agile A survival guide Java Meets Agile A survival guide to adopt Agile inside Java teams Daniel Wildt Software Developer / Agile Coach Giovani Salvador Software Developer / Architect Software Developer / Agile Coach [email protected] http://weblogs.java.net/blog/dwildt/ Software Developer / Architect [email protected] http://weblogs.java.net/blog/giovanisalvador

Upload: daniel-wildt

Post on 13-Jan-2015

2.638 views

Category:

Technology


0 download

DESCRIPTION

A survival guide to adopt Agile inside Java teams. Check an introduction to Agile Methodologies, Agile Practices and Tools that can help your team to improve testing techniques.

TRANSCRIPT

Page 1: Just Java2008 - Java Meets Agile

Java Meets Agile – A survival guideJava Meets Agile – A survival guide to adopt Agile inside Java teams

Daniel Wildt Software Developer / Agile Coach

Giovani SalvadorSoftware Developer / ArchitectSoftware Developer / Agile Coach

[email protected] http://weblogs.java.net/blog/dwildt/

Software Developer / [email protected]

http://weblogs.java.net/blog/giovanisalvador

Page 2: Just Java2008 - Java Meets Agile

AgendaAgenda

• Agile IntroAgile Intro• What is Agile?• Agile Manifesto• What is Scrum

• Agile PracticesR f• References

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile2

Page 3: Just Java2008 - Java Meets Agile

Agile Intro

Page 4: Just Java2008 - Java Meets Agile

What is Agile? Some thoughtsWhat is Agile? Some thoughts...

• A set of MethodologiesA set of Methodologies• A set of principles and values• A new way of thinking about Software

Development and delivery of business value• Pure Discipline

C i ti d f db k• Communication and feedback• +Trust

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile4

Page 5: Just Java2008 - Java Meets Agile

Communication may be like this soCommunication may be like this so...

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile5

Page 6: Just Java2008 - Java Meets Agile

... look for better ways to findcustomer needs! Adapt!

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile6

Page 7: Just Java2008 - Java Meets Agile

Agile ManifestoAgile Manifesto

• Agile Methodologies are based on disciplinesAgile Methodologies are based on disciplines and practices that focus on principles like these (from Agile Manifesto principles):• Satisfy the customer as highest priority, through early and continuous

delivery of valuable software.• Business people and developers working together daily throughout the

projectproject• Measure the progress of a project based on working software, its

primary measure• Self organizing teams, motivated individuals, communication and

simplicity as strong values• Technical excellence is wanted to enhance agility.• Continuous improvement, to tune and adjust teams to become more

effective.

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile7

effective.

Page 8: Just Java2008 - Java Meets Agile

Agile ManifestoAgile Manifesto

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile8

Page 9: Just Java2008 - Java Meets Agile

So It’s easy Join the team andSo... It s easy. Join the team and...

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile9

Page 10: Just Java2008 - Java Meets Agile

work as a team! Teamwork! Trust!... work as a team! Teamwork! Trust!

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile10

Page 11: Just Java2008 - Java Meets Agile

Give power to the team! AndGive power to the team! And...

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile11

Page 12: Just Java2008 - Java Meets Agile

find ways to improve! Be creative!... find ways to improve! Be creative!

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile12

Page 13: Just Java2008 - Java Meets Agile

A way to develop using Agile = SCRUMA way to develop using Agile = SCRUMProduction Delivery

The Scrum Process:

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile13

Business Analysis Planning

Page 14: Just Java2008 - Java Meets Agile

Agile Practices

Page 15: Just Java2008 - Java Meets Agile

Agile PracticesAgile Practices

• Remember: What is to be Agile?Remember: What is to be Agile?• Focus on business priorities

• You need to add value at each iteration• Open Communication

• You need to receive feedback constantly• You provide feedback constantlyYou provide feedback constantly

• Find problems early in the process• Why do we need to test?

D i i ti t li i t bi it• Drive communication to eliminate ambiguity • Create knowledge• Build Quality in• Every test is a new opportunity for learning and discuss

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile15

• Every test is a new opportunity for learning and discuss business needs and knowledge

Page 16: Just Java2008 - Java Meets Agile

Agile PracticesAgile Practices

• From Architecture Perspectivep• Avoid creating generic architectures

• They can solve some of your problems but what about complexity? p y

• Take care with Big Design Up Front.• Don’t make your project a laboratory for new

technologiestechnologies.• Remember you don’t walk on the water.• Get your hands dirty. Prove your architecture with a

P f f C (P C)Proof of Concept (PoC)

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile16

Page 17: Just Java2008 - Java Meets Agile

Agile PracticesAgile Practices

• From Architecture Perspectivep• Adherence to standards.

• From both inside the company or the industry• Spend some time with scripts to build yourSpend some time with scripts to build your

environment and automate repetitive work• Some tools help you to deal with that.

• Eg. WebLogic Scripting Toolsg eb og c Sc pt g oo s

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile17

Page 18: Just Java2008 - Java Meets Agile

Agile PracticesAgile Practices

• From Architecture PerspectiveFrom Architecture Perspective• Use an Enterprise Service Bus.

System A System CSystem B

System X System ZSystem Y

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile18

Page 19: Just Java2008 - Java Meets Agile

Agile PracticesAgile Practices

• From Architecture PerspectiveFrom Architecture Perspective• Use an Enterprise Service Bus.

System A System CSystem B

Enterprise Service Bus

System X System ZSystem Y

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile19

Page 20: Just Java2008 - Java Meets Agile

Agile PracticesAgile Practices

• From Developer PerspectiveFrom Developer Perspective• Start coding the most complex tasks from the

highest priority user story.• Unit test to implement the concept of “done”.• Code the business logic or the persistence

fi t? Whi h t d fi t?first? Which one to code first?

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile20

Page 21: Just Java2008 - Java Meets Agile

Agile PracticesAgile Practices

• From Developer PerspectiveFrom Developer Perspective• Discussions:

• Peer review: Manual x Automated?• Pair programming x Peer Review?• Use the most appropriate technique for your team

• Estimates? Who, How and Why?Estimates? Who, How and Why?• Focus: Create Knowledge• Who? The whole team!

How? WideBand Delphi / Planning Poker• How? WideBand Delphi / Planning Poker• Why? Remember the focus

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile21

Page 22: Just Java2008 - Java Meets Agile

Agile PracticesAgile Practices

• From Developer PerspectiveFrom Developer Perspective• Create tasks in user stories to search for new

technologies• Give the team the bandwidth to try new

technologies. • Use Spike Solutions practice from XP, for instance.p p ,

• But don’t forget the goal of the task/user story.• Estimate the task properly.

• Business Logic in POJOs Don’t place logic in• Business Logic in POJOs. Don t place logic in EJBs or container-dependent objects.

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile22

Page 23: Just Java2008 - Java Meets Agile

Agile PracticesAgile Practices

• From Developer Perspectivep p• First make it work, then refactor it

• “Refactoring is a disciplined technique for restructuring an existing body of code altering itsrestructuring an existing body of code, altering its internal structure without changing its external behaviour” – Martin Fowler

• “It it stinks change it”• It it stinks, change it• Refactor when you add a function• Refactor when you fix a bug

R f t d d i• Refactor as you do code review• When to refactor?

• Right after first green bar

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile23

g g

Page 24: Just Java2008 - Java Meets Agile

Prove your code with Unit TestsProve your code with Unit Tests

• As you also prove your design with code• Source grow together with source• Refactor without fear. You own the code!

JUnit

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile24

Page 25: Just Java2008 - Java Meets Agile

Write effective documentation – Prove acceptance tests

• Easy integration forEasy integration for Business - FIT

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile25

Page 26: Just Java2008 - Java Meets Agile

Integrate and isolate with mock objects

• You don’t have it?Mock!Mock!

public class ExampleTest {@Beforepublic void setup() {public void setup() {

mock = createMock(Collaborator.class);classUnderTest = new ClassUnderTest();classUnderTest.addListener(mock);

}}@Testpublic void addDocument() {

mock.documentAdded("New Document");replay(mock);replay(mock);classUnderTest.addDocument("New Document",

new byte[0]);verify(mock);

}

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile26

}}

Page 27: Just Java2008 - Java Meets Agile

Drive acceptance criterias with testsDrive acceptance criterias with tests

• Functional TestFunctional TestSelenium IDE

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile27

Page 28: Just Java2008 - Java Meets Agile

Ensure your capacity and performanceEnsure your capacity and performance

• Stress TestingStress Testing• JMeter

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile28

Page 29: Just Java2008 - Java Meets Agile

Understand your code. Find gaps and improve!

• Netbeans ProfilerNetbeans Profiler

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile29

Page 30: Just Java2008 - Java Meets Agile

Are you testing what you need?Are you testing what you need?

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile30

Page 31: Just Java2008 - Java Meets Agile

Continuous Integration: integrated / working code 100% of time

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile31

Page 32: Just Java2008 - Java Meets Agile

Review your code properly!Review your code properly!

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile32

Page 33: Just Java2008 - Java Meets Agile

Find your way on testing. Why? To improve communication withimprove communication withcustomers and team!

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile33

http://www.ambysoft.com/essays/floot.html

Page 34: Just Java2008 - Java Meets Agile

ReferencesReferences

• Beck, Kent; Andres, Cynthia. ExtremeBeck, Kent; Andres, Cynthia. Extreme Programming explained: embrace change. 2ª edition.

• Pressman, Roger S. Software Engineering.• Agile Manifesto

http://www agilemanifesto orghttp://www.agilemanifesto.org• Semler, Ricardo. Você está louco.

http://en.wikipedia.org/wiki/Ricardo_Semlerp p g _

• Kniberg, Henrik. Scrum and XP from the trenches.

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile34

http://www.infoq.com/minibooks/scrum-xp-from-the-trenches

Page 35: Just Java2008 - Java Meets Agile

ReferencesReferences

• Tinkha, Andy; Kaner, Cem. ExploringTinkha, Andy; Kaner, Cem. Exploring Exploratory Testing. http://www.testingeducation.org/a/explore.pdfS tt A bl b t FLOOT• Scott Ambler essay about FLOOT. http://www.ambysoft.com/essays/floot.html

• Ciclomatic Complexity. p yhttp://www.sei.cmu.edu/str/descriptions/cyclomatic_body.html

• Mark Richards podcast about FDD and Agile ArchitectureArchitecturehttp://agiletoolkit.libsyn.com/index.php?post_id=89891

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile35

Page 36: Just Java2008 - Java Meets Agile

LinksLinks

• JUnit – Unit TestingJUnit Unit Testing• http://www.junit.org

• JMeter – Stress Testing• http://jakarta apache org/jmeter/• http://jakarta.apache.org/jmeter/

• Emma – Code Coverage• http://emma.sf.net

• Selenium –Functional testing• http://www.openqa.org/selenium/

• PMD – Code AuditPMD Code Audit• http://pmd.sf.net

• NetBeans Profiler• http://profiler netbeans org/

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile36

• http://profiler.netbeans.org/

Page 37: Just Java2008 - Java Meets Agile

LinksLinks

• CheckStyle –Code Audity• http://checkstyle.sf.net

• Easy Mock• http://www.easymock.org/p y g

• FIT• http://fit.c2.com/

• Cruise ControlCruise Control• http://confluence.public.thoughtworks.org/display/CC

• DDSteps• http://www.ddsteps.org/p p g

• Refactoring - Martin Fowler• http://www.refactoring.com/catalog/index.html

JUSTJAVA 2008 – Daniel Wildt & Giovani Salvador – Java Meets Agile37

Page 38: Just Java2008 - Java Meets Agile

Questions?

Daniel Wildt Software Developer / Agile Coach

Giovani SalvadorSoftware Developer / ArchitectSoftware Developer / Agile Coach

[email protected] http://weblogs.java.net/blog/dwildt/

Software Developer / [email protected]

http://weblogs.java.net/blog/giovanisalvador