Take Razor for a test drive and discover first hand how this scripting syntax simplifies the way you create dynamic, data-driven websites. With this concise guide, you’ll work with Razor syntax by building example websites with Microsoft WebMatrix and ASP.NET MVC. You'll quickly learn how Razor lets you combine code and content in a fluid and expressive manner on Windows-based servers.
Programming Razor also explores components of the Razor API, and shows you how Razor templates are turned into rendered HTML. By the end of this book, you'll be able to create Razor-based websites with custom extensions that meet the specific needs of your projects.
Use Razor with Microsoft WebMatrix to build a working blog, complete with data
Organize and manage your web application, using Razor features for layouts, sections, and partial views
Create clean and effective ASP.NET MVC views with the Razor View Engine
Learn how the Razor API interprets Razor templates and turns them into executable .NET code
Implement advanced techniques for exposing reusable code and sharing ASP.NET MVC views across projects
Chapter 1 Introduction
A Brief History of Microsoft’s Web Development Platforms
Differentiating Code and Markup
Chapter 2 Razor and Microsoft WebMatrix
Introducing ASP.NET Web Pages
Your First WebMatrix Website
Data Access with WebMatrix
Chapter 3 Organizing Razor Templates
Razor Helper Packages
Razor Helpers versus Partial Views
Executing Common Code
Chapter 4 Razor and ASP.NET MVC
Installing ASP.NET MVC
ASP.NET MVC View Engines
Implementing a Blog Site Using ASP.NET MVC
Authoring ASP.NET MVC Views with the Razor Syntax
Changing the Base Class
Layouts and Content Pages
Razor View File Locations
Html and Url Helper Classes
ASP.NET MVC’s Razor View Page Rendering Life Cycle
Jess Chadwick is an independent software consultant specializing in web technologies. He has over a decade of development experience ranging from embedded devices in start-ups to enterprise-scale web farms at Fortune 500s. He is an ASPInsider, Microsoft MVP in ASP.NET and is an avid community member, frequently delivering technical presentations as well as leading the NJDOTNET Central New Jersey .NET user group. Jess lives in the Philadelphia, PA area with his wonderful wife, baby daughter, and black lab.
The first part of this book explaining Razor with Web Pages and WebMatrix is very good but the material on Razor with MVC is hopelessly out of date and the sample code won't run because of updates and changes to MVC3. It would be nice if this were updated. As it is it has limited usefulness.
Bottom Line No, I would not recommend this to a friend
This book is about Microsoft Razor view engine. If you do not know anything about Razor view engine then this is the right book to start with. It covers fundamentals of Razor view engine - how it works, what can be done, how can you use it, etc. Only this book does not cover other view engines like Castle and ASPX. In my opinion there should be at least one chapter about other view engines. However, I am working with Razor engine this book was useful because I learned about lot of useful tools , for example, RazorGenerator, PrecompiledMvcEngine, aspnet_compiler.exe, etc. Only sometimes when reading this book is feeling that something could be explained a little better. For example, there should be a little bit longer explanation about MVC Areas for novice who is not familiar with MVC it would be difficult to understand it. One of the things which I really liked about this book was RazorPad. RazorPad - a light-weight WPF application or online application for learning Razor syntax.
Bottom Line Yes, I would recommend this to a friend