Chapter 19. Case Study 2

In the previous chapter, you went through all the parts of a simple blog engine written on ASP.NET MVC, where you got a taste of what writing a full database-driven application involves. But it lacked some of the little utility components that are possible, thanks to the MVC framework and its many extensibility points.

This case study covers the missing points and does it while developing a photo gallery, which takes it contents not from a local storage, but from Flickr (http://flickr.com).

This case study addresses the following points:

  • Using the TDD approach

  • Designing for testability

  • Using action filters

  • Setting up authentication

  • Using AJAX and jQuery

If you are not familiar with these topics, we encourage you to go back to the relevant chapters (chapters 8, 9, 11, 12 and 15) and give them a quick read.

Another issue we try to emphasize is the importance of using a clean HTML markup structure.

Let's get into the analysis of the WroxGallery application, starting from the first thing that a project should have: the requirements.

User Stories (aka Requirements)

Because WroxGallery adopts a Test Driven Development approach, the first thing you have to decide is what does the application have to do? In TDD jargon, the requirements are called User Stories.

This application has to:

  • Allow any user to see the five most recent photos on the home page.

  • Allow any user to see all the albums in a sidebar on the all the pages.

  • Allow any user to search for photos based on their tags. ...

Get Beginning ASP.NET MVC 1.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.