17
Test Driven Learning Learning ColdBox through Testing ColdBox Koans Presented by Gavin Pickin

Test Driven Learning - Learning Coldbox through Testing

Embed Size (px)

Citation preview

Page 1: Test Driven Learning - Learning Coldbox through Testing

S

Test Driven Learning Learning ColdBox through Testing

ColdBox Koans

Presented by Gavin Pickin

Page 2: Test Driven Learning - Learning Coldbox through Testing

Who is Gavin Pickin?

S  Been developing in ColdFusion since CF 4.5 back in 90s

S  Moved to the USA from New Zealand in 2000

S  Currently work for Net Connection (soon to be re-branded)

S  I recently reached out into the community @gpickin

S  New to ColdBox, Not a ColdBox Team Member J

Page 3: Test Driven Learning - Learning Coldbox through Testing
Page 4: Test Driven Learning - Learning Coldbox through Testing

What is TDL - Koans

S  Test Driven Learning is commonly known as Koans

S  Where did Koans Begin? From what I can tell, it started with Ruby Koans (originally by EdgeCase now rebranded as Neo)

S  There are Koans for many languages including Ruby Python Javascript etc – search GitHub and see them all https://github.com/search?q=Koans&type=Repositories&s=stars

S  ColdFusion Koans, created by Ryan Anklam @bittersweetryan, the inspiration for this project, is listed on the 2nd page.

Page 5: Test Driven Learning - Learning Coldbox through Testing
Page 6: Test Driven Learning - Learning Coldbox through Testing

Koan Mission Statement

S  The Koans walk you along the path to enlightenment in order to learn XXXX. The goal is to learn the XXXX language, syntax, structure, and some common functions and libraries. We also teach you culture. Testing is not just something we pay lip service to, but something we live. It is essential in your quest to learn and do great things in the language.

S  This is taken from Ruby Koans project, and most Koans repeat this as their Mission.

Page 7: Test Driven Learning - Learning Coldbox through Testing
Page 8: Test Driven Learning - Learning Coldbox through Testing

Red, Green, Refractor In test-driven development the mantra has always been red, green, refactor. Write a failing test and run it (red), make the test pass (green), then look at the code and consider if you can make it any better (refactor). While walking the path to enlightenment you will need to run the koan and see it fail (red), make the test pass (green), then take a moment and reflect upon the test to see what it is teaching you and improve the code to better communicate its intent (refactor).

Page 9: Test Driven Learning - Learning Coldbox through Testing
Page 10: Test Driven Learning - Learning Coldbox through Testing

Let’s Look at ColdFusion Koans

S  On Github: https://github.com/bittersweetryan/ColdFusion-Koans

S  Website: http://bittersweetryan.github.io/ColdFusion-Koans/

S  On My Local Machine http://cfkoans.local.com:8080/

Page 11: Test Driven Learning - Learning Coldbox through Testing

Why ColdBox Koans?

S  ColdFusion Koans was a fun way to test my ColdFusion Knowledge

S  ColdFusion Koans taught me about Unit Testing and MX Unit

S  I think I learn better through examples and writing code – Koans are a great tool for the job.

S  I think new developers coming to ColdBox would learn better with some structure and guidance on a step by step basis

S  I think it will be useful to train future devs coming to work with me, about ColdBox, but also about Conventions and Best Practices.

Page 12: Test Driven Learning - Learning Coldbox through Testing

ColdBox Koans – The Project

S  This is my first Open Source Project, so be gentle.

S  I am new to ColdBox, so I am learning as I go… I think that building this will help. So corrections and advice are welcome J

S  The project has a foundation, but has a lot planned and you can help shape its future.

Page 13: Test Driven Learning - Learning Coldbox through Testing

Ok, let’s get into it Star, Fork, Clone, and get into it.https://github.com/gpickin/Coldfusion-Coldbox-Koans

Lets See it on my local machine: http://cbkoanscbdw.local.com:8080/

Page 14: Test Driven Learning - Learning Coldbox through Testing

Future of ColdBox Koans

S  We will be adding the Pop Quiz piece of ColdBox Koans into the ColdFusion Koans, as a Introduction to the ColdBox Framework and feeder to the full ColdBox Koans project.

S  Adding a lot more Koans, including but not limited to: CB Config, Models, Caching, Logging, Mocking

S  Koans will help you build a mini app… Step by step… much like Bootcamp.

Page 15: Test Driven Learning - Learning Coldbox through Testing

More Information S  More great sessions from CBDW 2013 – Including Koans relevant topics:

Testing, Mocking & Pull Requests (GitHub) http://www.coldbox.org/media/cbdw2013

S  ColdFusion Koans http://bittersweetryan.github.io/ColdFusion-Koans/

S  Ryans Blog Post about ColdFusion Koans: http://blog.bittersweetryan.com/2011/10/introducing-coldfusion-koans-learn.html

S  CFHour - Interview with Ryan Anklam http://cfhour.com/post.cfm/show-123-coldfusion-koans-with-ryan-anklam

S  Tim Cunningham’s Bolt Talk with Ryan Anklam http://cfmumbojumbo.com/cf/index.cfm/bolttalks/coldfusion-koans-with-ryan-anklam/

S  MX Unit Presentations, Talks and Meetups http://wiki.mxunit.org/display/default/Presentations%2C+Talks%2C+and+Meetups

Page 16: Test Driven Learning - Learning Coldbox through Testing

Thanks for coming

•  Q&A? •  Any feedback,

constructive criticism? (Be gentle)

•  What would you like to see in the Koans?

•  Who is going to volunteer to add some sections?

•  Thank you everyone for watching.

Page 17: Test Driven Learning - Learning Coldbox through Testing

Thank you Team ColdBox

S  This was an awesome week, awesome content.

S  Thanks to all the presenters, I really enjoyed watching each and every session, except mine J

S  L Back to work now everyone… well, you can have tomorrow off, just this once.

S  See you at CF Summit in Vegas J