DZone recently had a chance to sit down with Simone Chiaretta and Keyvan Nayyeri, authors of Wrox' Beginning ASP.NET MVC 1.0 and DZone's ASP.NET MVC 1.0 Refcard. We discuss Microsoft's first release of ASP.NET MVC, their book, and the future of MVC.
DZone - Tell us a little about your web development background.
Simone Chiaretta - I’m doing web development since 1996 (actually I started with being a web designer) and I always worked mainly on high-traffic public-facing websites for media and publishing companies. Started with ASP Classic/VB6 and then fully embraced ASP.NET. Also did a bit of Coldfusion, Java Struts and Flash development.
Keyvan Nayyeri - When I was a kid, I started with ASP classic with some small fun projects but my real web development experience began with ASP.NET in 2002 when I was 18 and continued with an ongoing progress to now. In these years I’ve been trying to learn new stuff about .NET and ASP.NET development and enhance my knowledge and expertise. I’ve had some experiences with RoR as well.
DZone - What was your motivation for writing this book?
Simone - First of all because I immediately got in love with ASP.NET MVC, and then because there were only “pro” and I wanted to teach ASP.NET MVC starting from the basics to try and spread the word on how good this framework is to most developers as possibile.
Keyvan - Generally there are many reasons to motivate someone to write a book specifically a programming book that requires much effort from the author and can eat his time for almost a year (as it did for us both). I love to share my knowledge and there was a great idea behind ASP.NET MVC (to deliver quality to web projects) that attracted me. Besides, I was very interested to write a book about ASP.NET after writing 3 other titles. And the last major reason was the lack of a beginner book for ASP.NET MVC in the market that Simone and I tried to resolve.
DZone - What is the MVC pattern and how is it implemented by Microsoft in ASP.NET MVC?
Simone - I’d say... read the book :)
Just joking: the MVC pattern is UI pattern that splits the application in 3 main components: Model, View and Controller. Each with their own concerns and responsibilities.
Keyvan - MVC is a pattern to split the application implementation in three separate components to improve the level of separation of concerns that brings lots of benefits to a project. In ASP.NET MVC View and Controller are implemented with great features but the Model part is left to developers to choose from several data interaction options (like LINQ to SQL, Entity Framework, NHibernate, and …).
DZone - How should developers choose between WebForms and MVC when planning a new ASP.NET application?
Simone - As always in IT there is no Silver Bullet, and both the two technologies have their scenarios. There many things to consider, but one that I think can influence the decision is that with ASP.NET MVC, at least for version 1, you have to use a lot of 3rd party, opensource libraries. So if you love opensource you’ll love that, but I know many big companies have policies that makes the usage of OSS in their projects.
Keyvan - This is an important yet a tricky question that doesn’t have a single answer. It varies from project to project based on requirements, business plans, time, and effort. However, in general WebForms is suitable for small and medium scale projects that should be implemented quickly, while ASP.NET MVC is a great choice for professional projects where quality matters and there are enough resources available and allocated. No one can recommend a single guide to choose between these two technologies and it strongly depends on the level of knowledge that an individual has.
DZone - The .NET community really seems to be embracing MVC. What do you think they are most excited about?
Simone - I think it’s because it shows a big mind shift in the way Microsoft is approaching web development, and because it address most of the pain-points the community had with WebForms.
Keyvan - I can say that the great quality that ASP.NET MVC delivers to developers is the most important factor, but the name of prominent developers in the ASP.NET MVC team and the number of community projects around it are also notable parameters. Moreover, ASP.NET MVC is the technology that has gathered a group of professional developers together and many of the motivated software developers who love to work with these talents prefer this technology.
DZone - Can I use ASP.NET AJAX in my ASP.NET MVC application?
DZone - Based on what you have seen in v1, what are your top three wish list items for future releases of the framework?
Simone - Client-side validation, something to make componentization easier, a view engine that is not so tied to the WebForm lifecycle.
Keyvan - One of the areas is the AJAX development where they can improve things by adding more tools for AJAX features to make the AJAX development faster. Better validation and UI helper templates are two other items that are already added to the first preview of ASP.NET MVC 2.0.
DZone - What are some of your favorite online resources for ASP.NET MVC guidance/information?
Simone - I usually read blogs of community members that talk usually talk about ASP.NET MVC, like Steven Sanderson, Eric Hexter, Jimmy Bogard, Maarten Balliauw, and obviously ScottGu, Phil Haack, Rob Conery. There is a nice aggregator that collects everything about ASP.NET MVC, from blogs, to tweets: AspDotNetMVC.com.
Keyvan - I don’t like the activity around ASP.NET MVC by online communities but there are some great blogs being published such as those by Simone Chiaretta, Steve Sanderson, Maarten Balliauw, and Jimmy Bogard. Of course, I’m assuming that everybody reads some MSFT blogs such as Scott Guthrie, Phil Haack, Scott Hanselman, and Rob Conery.
DZone - Do you highlight any best practices in the book?
Simone - We cover inversion of control, dependency injection, ORMs, and unit testing. We also encourage the readers to experiment with external 3rd party libraries since it’s the only way to get the most out of ASP.NET MVC.
Keyvan - Yes, ASP.NET MVC is tied to some best practices that are a default part of its learning process and we teach them in the book as well. Test-Driven Development, Dependency Injection, and Inversion of Control are common practices used with ASP.NET MVC applications.
DZone - Who should buy your book?
Simone - ASP.NET developers with little no specific knowledge on the ASP.NET MVC framework. But since we cover some advanced topics, also developers that know the basics but want to approach the advanced topics with Worx’s Beginning series approach: big focus on samples and hands-on experience.
DZone - Do you have any new book projects on the horizon?
Simone - I really loved the experience of writing a book, and the experience I had with Wrox was great. I’m thinking about writing some short eBooks and then, of course, Beginning ASP.NET MVC v2.
Keyvan - No, not at the moment, After writing four books for Wrox in the past four years that kept me busy with writing most of times, I decided to stop writing for a while and concentrate on other stuff. However, I may get involved in the new edition of Beginning ASP.NET MVC for version 2.0.