Nicolas Metaye

.NET SENIOR DEVELOPER

The main technologies I'm working with are .NET, Azure, JavaScript and SQL Server. I'm always happy to learn new patterns, concepts, technologies and languages (and not only the programming ones!). You will find on this web site my resume and some of my personal projects / mockups /experiments.

Tilburg, Netherlands

nicolas.metaye@gmail.com

MVC

SOURCE CODE
PREVIEW

This project is a simple MVC project. I took an example of a book library with the following requirements:

  • A book is defined by the ISBN, a title, and an author.
  • A book can be added, edited and deleted.
  • An author can be added, edited and deleted.
  • All the fields have to be validated.
  • A list of the books has to be displayed. A search on the ISBN and the title has to be provided.
  • A list of the authors has to be displayed.
  • Persistence is not mandatory
Razor

For this project I've chosen to use MVC (actually MVC 3 Razor).
The choice came naturally to use MVC as it's definitely a great alternative to the good old ASP.NET Webforms.

Using MVC makes the developer come back to the "roots" of web development and that's really a good thing. It forces us to understand more what's going on with the web requests and it also forces us to keep things simple and more readable.
I almost didn't use Javascript in this project(coming soon as I want to play with Knockout.js) but I can see that the MVC way of making server requests using JavaScript is far more simple than using the UpdatePanel from the WebForms.

As I explained in the project requirements, I didn't care about persistence. The objects (authors and book) are stored in memory. Have a look at the Repository class to see how I managed it.

An other point from this project I can talk about is unit testing. I tried to follow the unit testing approach, testing all the independent units of my code I use in the project.
I didn't do what I would call integration tests (testing UI and the business logic contained in the controllers) as I believe these kind of tests should be made with some Behavior Driven Development (BDD) tools like Specflow. It will come in a later project.

Get in touch !