devermind.com
Adrian Grigore’s software development weblog. Motto: I will not waste my time looking for a clever motto.
  • Home
  • About
  • Contact me
  • Privacy Policy

ASP.NET MVC Tip #2: Turn on compile-time View Checking

ASP.NET, ASP.NET MVC 52 Comments »

I like the compiler to catch as many errors as possible before I start debugging or release my application. This also applies to code nuggets in ASP.NET MVC views, especially since these are not easily unit-testable. But views are not validated at compilation, at least not when using the standard settings for ASP.NET MVC projects.

Tools like Resharper can notify you of syntax errors within your views, but you can still build the project and not get a single error. Instead, your application will crash when trying to evaluate the buggy view.

Fortunately you can easily make Visual Studio compile your views along with the rest of your code. Read the rest of this entry »


May 3rd, 2009 |

Tags: ASP.NET MVC, MSBuild




ASP.NET MVC Tip #1: Using Custom ViewModels with POST action methods

ASP.NET MVC, LINQ 21 Comments »

One of the top good practices for ASP.NET MVC is not to use the ViewData Dictionary, but to put your data in a strongly typed ViewModel instead. Many people seem to be using Linq to SQL entities as a ViewModel, because it’s a very comfortable approach. But what do you do if your view should contain data that is not included in any of your linq entities? Scott Gu’s chapter 1 preview of his upcoming ASP.NET MVC book recommends using a custom-shaped ViewModel for those cases. Read the rest of this entry »


April 18th, 2009 |

Tags: ASP.NET MVC, binding, custom, mvc, POST, viewmodel




ASP.NET MVC Beginner’s Guide

ASP.NET MVC 3 Comments »

I’ve decided take Microsoft’s brand new ASP.NET MVC framework for a small test drive by building a small proof of concept application with it. The frame work sure looks promising, even despite it’s early stage of development and relatively small features as compared to ASP.NET web forms.

It seems there are no good books available on the subject yet. The few that are already in stock at Amazon are based on the community preview, and it seems that there have been quite a few changes in the the framework since then.

Fortunately, ScottGu hat just released a free sample chapter of his upcoming “Professional ASP.NET” (Wrox) book. It contains a 200-page walkthrough guide on how to build a simple ASP.NET MVC application.

The chapter is available for download here.


March 17th, 2009 |

Tags: ASP.NET, guide, LINQ, mvc, tutorial




Interview on Shareware Radio

Business No Comments »

Mike Dulin has just published an interview we recorded at last year’s European Shareware Conference. We talked a bit about shareware games vs. casual games, how I got into the games business and the current market climate in both areas. The Interview is available here.


March 4th, 2009 |

Tags: Business, games, shareware




Updated: Generic base class for LINQ2SQL data layers

LINQ 30 Comments »

Hi,

It’s been a while since I posted the first version of my generic base class for LINQ2SQL data layers. The idea behind this class was to provide a quick and simple way to implement a repository with LINQ2SQL and therefore also a solid foundation for implementing your n-tier architecture data layer. If you missed the article, you can read more about the base class here.

The version I previously posted has worked fine for me, but it was still lacking a way to retrieve the ID and version attributes of saved entities. Due to a typo, it also did not work with entities that have more than one unique identity column. Thanks to Mike and Fabrizio for pointing out these limitations!

Version 0.2 available here fixes both of these issues:

Download RepositoryBase Demo Website

Download RepositoryBase Source Code Only


February 26th, 2009 |

Tags: ASP.NET, CSharp, DAL, LINQ, multi-tier




Previous Entries
Next Entries
  • Feeds

    • RSS feed iconAll Entries
    • RSS feed iconAll Comments
  • About Adrian Grigore

    Adrian Grigore Adrian is a software developer from Fulda, Germany. Adrian has been programming C++ applications since 1998. Recently he has been implementing a Web 2.0 SaaS website, so his current development-related interests are ASP.NET MVC, C#, and jQuery.


  • Adrian's (German language) book

    XSLT XUpdate BuchXUpdate mittels XSLT - Ein XUpdate-Prozessor auf XSLT-Basis


  • Pages

    • About
    • Contact me
    • Privacy Policy
  • Links

    • Lobstersoft
    • SonicWeasel
  • Tags

    ASP.NET ASP.NET MVC binding Business client-side form validation client-side validation codedui selenium testing test CSharp custom DAL dataannotationsmodelbinder form validation games guide jQuery jQuery.validate LINQ MSBuild multi-tier mvc POST remote validation shareware tutorial viewmodel visual-studio asp.net xVal
  • Archive

    • May 2010 (2)
    • January 2010 (2)
    • June 2009 (1)
    • May 2009 (1)
    • April 2009 (1)
    • March 2009 (2)
    • February 2009 (1)
    • October 2008 (2)
Copyright © 2010 devermind.com All Rights Reserved
RSS XHTML CSS Log in
Wp Theme by n Graphic Design
Powered by Wordpress