Your SlideShare is downloading. ×
TDD with ASP.NET MVC 1.0
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

TDD with ASP.NET MVC 1.0


Published on

TDD with ASP.NET MVC 1.0

TDD with ASP.NET MVC 1.0

Published in: Technology

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Test Driven Development with ASP.NET MVC 1.0 Shiju Varghese
  • 2. Session Objectives
    • Introduction to ASP.NET MVC
    • Introduction to TDD
    • Demonstrate TDD with ASP.NET MVC
  • 3. What’s wrong with ASP.NET WebForm
    • ViewState
    • Page life cycle
    • Limited control over rendered HTML
    • Lack of Separation of Concerns (SoC)
    • Untestable
  • 4. What is MVC
    • A design pattern
    • Acronym for Model View Controller
    • Isolating business logic from UI
    • Layering for UI layer
    • Separation of Concerns (SoC)
      • Separate content from presentation and data-processing (model) from content
  • 5. What is MVC
    • View is just concerned about presentation logic
    • Models represent the data
    • Controllers just handle application flow
    • You write less code and end up with a more maintainable application.
  • 6. What is ASP.NET MVC
    • An alternative framework to ASP.NET Web Forms.
    • More control over your HTML
    • A more easily testable framework
    • Simply an option
      • Will not a replacement for Web Form
      • Build on top of ASP.NET
    • Opinionated Framework
      • Community Driven Framework
  • 7. Goals of ASP.NET MVC Framework
    • Enable clean separation of concerns
      • Each component has one responsibility
        • Single Responsibility Principle (SRP)
        • Highly testable and maintainable application
    • Testable by default (built with TDD in mind)
      • Red/Green/Refactor TDD
    • Enable full control over the rendered HTML
    • Enable clean URLs and HTML
      • SEO and REST friendly URL structures
  • 8. Goals of ASP.NET MVC Framework
    • Extensible and Pluggable framework.
      • Interface-based architecture
      • Support replacing any component of the system
      • Support third-party view engines such as NVelocity, Brail, NHaml
      • Support user-provided front controller that enable Inversion of Control containers
    • Build on top of ASP.NET
    • Support static and dynamic languages
    • Conventions and Guidance
  • 9. Test Driven Development
    • Requirement identified
    • Write an automated test
    • Run tests and make sure new one FAILS
    • Write some code
    • Run tests to make sure all PASS
    • Refactor
    • Repeat
  • 10. Test Driven Development
    • Unit Test Frameworks for .NET:
      • NUnit
      • Visual Studio Test Framework
      • xUnit.NET
  • 11. Mock Objects
    • In object-oriented programming, mock objects are simulated objects that mimic the behavior of real objects in controlled ways.
      • Moq
      • Rhino Mocks
  • 12. Demo
  • 13. Questions?
  • 14. Thanks Shiju Varghese E-Mail : [email_address] Blog : http:// Twitter : http://