Showing posts with label MVP. Show all posts
Showing posts with label MVP. Show all posts

Tuesday, January 22, 2013

Ben's Unit Testing &TDD Courseware for Visual Studio 2010 (for free)

Benjamin Day Consulting, Inc. - Unit Testing & Test-Driven Development Courseware for Visual Studio 2010

Well, like I mentioned in my last post, I’m planning to publish a lot of the old courseware that I’ve developed over time.  The idea is to share the materials that I’m no longer using with the good folks on the internet rather than to have it all sitting around collecting virtual dust on my laptop.

This time, I’m pushing out the labs and slides for my 2-day unit testing & test-driven development (TDD) course for Visual Studio 2010.  A few months ago, I started looking at upgrading the VS2010 course to Visual Studio 2012 and decided that it was actually time for a re-write because I don’t really write tests the same way anymore.   

The labs for this course focus on process and software architecture patterns for how to:

  • Create unit tests for a Deck of Cards using TDD
  • Unit test the Adapter pattern
  • Unit test the Repository pattern
  • Using mock objects to test in isolation
  • Unit testing a user interface using the Model-View-Presenter (MVP) pattern

Here are the materials for the course:

  • Course description and syllabus
  • Slides in PDF format
  • Slides in PowerPoint format
  • Labs in PDF format
  • Code for the labs (before and after) [GD:Click through for the download links]

Course description and syllabus

Unit Testing & Test-Driven Development with Visual Studio 2010

Unit testing enables you and your team to write high-quality software with fewer bugs. It also allows you say with confidence when something in your code is working and – more importantly – know when it is not working. Test-Driven Development (TDD) is a methodology for writing software that ensures that your application and your application code are testable and tested from the very start. This course is designed to give the student hands-on experience and knowledge for writing and maintaining applications using Test-Driven Development. Throughout the course we will discuss the options, process, and motivations for unit testing and TDD and reemphasize these concepts using hands on labs.

What you’ll learn:
· What is a unit test?
· What is Test-Driven Development (TDD)? Why is TDD important?
· What is the TDD process?
· Common (bogus) excuses for NOT doing Unit Testing & TDD
· How do I sell my team on Unit Testing & TDD?
· Create and write unit tests
· Test types in Visual Studio 2010
· Architect your application for testability
· Testing user interfaces
· Test non-public methods
· Strategies for unit testing legacy code
· The RhinoMock Framework – Mocks & Stubs
· Using Mocks & Stubs to avoid The Huge Integration Test pitfall
· Dealing with databases and test data in your unit tests
· Mocking web services, back-end systems, and database calls
· Design Patterns for testability: Repository, Adapter, N-Tier Architecture, Model-View-Presenter (MVP), Model-View-Controller (MVC), and Model-View-ViewModel (MVVM)
· Best Practices for fixing bugs & defects using TDD
· Refactor for testability
· What is Code Coverage and why do I care?
· What other non-TDD test types are available? Web Testing, Load Testing, and Coded UI Tests

This looks like a great learning resource, and since there's still a great many people on VS2010 (Yes, I'm looking at you...) I thought you all might find this useful. And even if you've moved forward, there's a good deal you can learn... :) Sure, it's only the "resources" and not the actual training, but that's still pretty cool. :)

Tuesday, December 18, 2012

Aidan's "Beginners Guide To The MVP Summit"

Aidan Finn, IT Pro - A Beginners Guide To The MVP Summit

For the past few years I’ve been sending my “Guide to the MVP Summit” to friends who were newly minted MVPs. This year, I thought I’d share my guide (with hush-hush stuff removed) so everyone could get an idea of what goes on.

What’s an MVP?

What is the MVP Summit?

We get a number of benefits as MVPs but this is the crown jewel. The MVP Summit is a conference, held usually in Microsoft HQ at Redmond and in nearby Bellevue, where MVPs and members of product groups get together for several days. The contents of the conference are under NDA … it’s kind of like Fight Club: the first rule is not to talk about Summit, and the second rule is not to talk about Summit.



I thought this a great write-up for those going to this year's Microsoft MVP Summit. One day, if/when I become a MVP, this might come in handy...

Friday, February 24, 2012

WinForms MVP! (No, not that kind of MVP, MVP as in Model View Presenter...)

Moot Points - WinForms and MVP: Making a testable application

"With modern frameworks available that were built with loose coupling and separation of concerns in mind, working in WinForms may seem like a testability wasteland. But there are times when the options of WPF with MVVM or MVC on the web are not available, and you’re stuck with WinForms. But fear not, the Mode-View-Presenter pattern is here to save the day!

If you are not familiar with the MVP pattern, the idea is that you have a presenter, which handles all the interactions between the user and the model. The presenter “Talks” to the UI through an abstraction. There are a couple ways of doing the MVP pattern. I’m going to explore the Passive View style, meaning all logic is taken out of the view and moved into the presenter. I’m not going to go into differences in the styles, but if you’re interested, Martin Fowler has in depth descriptions of the Passive View, and Supervising Controller patterns, which are both derivatives of MVP.

I’m going to do a walkthrough for creating a simple MVP application. We need a premise for our demo. I’ll go with something simple, an application that organizes notes. Here our note will be a bit of textual data with a title. Lets implement it.



I'll say it, WinForms can rock! THERE! HA! Said it!

Seriously, I still find it so much easier to use WinForms when knocking out a test harness, PoC form, etc. Some of the simple things are just so much easier...  I know, I know, they are "dead" and have no future, but still sometimes they really are the right tool for the job.

Now marry that up with a good model like MVP...