Steve Michelotti

A .NET Developer's Toolbox

  Home  |   Contact  |   Syndication    |   Login
  201 Posts | 0 Stories | 1110 Comments | 51 Trackbacks

News

View Steve Michelotti's profile on LinkedIn

profile for Steve Michelotti at Stack Overflow, Q&A for professional and enthusiast programmers




Google My Blog

What I'm Reading:

Shelfari: Book reviews on your book blog

Tag Cloud


Archives

Post Categories

Code

Publications

C# 3.0

Portable Areas from MvcContrib provide a great way to build modular and composite applications on top of MVC. In short, portable areas provide a way to distribute MVC binary components as simple .NET assemblies where the aspx/ascx files are actually compiled into the assembly as embedded resources. I’ve blogged about Portable Areas in the past including this post here which talks about embedding resources and you can read more of an intro to Portable Areas here. As great as Portable Areas are, the ......

Recently I had an interesting task to consume a particular XML document and populate a C# object from it. The structure of the XML document looked roughly like this: 1: <root xmlns="http://www.w3.org/20... 2: <entry> 3: <id>1</id> 4: <title>abc</title> 5: <content> 6: <div xmlns="http://www.w3.org/19... 7: <table> 8: <tr> 9: <td>Item1</td> 10: <td>111</td> 11: </tr> 12: <tr> 13: <td>Item2</td> ......

Recently my company just released the first version of a new MVC web site: AlbumCredits.com. This project, led by Oskar Austegard, is was I consider a highly successful real-world implementation of MVC. In a time when most music these days is downloaded, the production and performance engineers, and recording professionals that work on the music don’t always get credit because there is no CD booklet to look through. Album Credits is almost like a LinkedIn for recording professionals. From the about ......

Thanks to everyone who attended my LINQ to SQL presentation at RockNUG last night. The code samples can be downloaded here: LINQ to SQL demo code. As a point of clarification from last night’s Q&A session after the presentation regarding using LINQ to SQL with true POCO classes that do not even have [Column] mapping attributes, you can have a class like this: 1: public class Contact 2: { 3: public int ID; 4: public string FirstName { get; set; } 5: public string LastName { get; set; } 6: public ......

Since MVC has been released I have observed much confusion about how best to construct view models. Sometimes this confusion is not without good reason since there does not seem to be a ton of information out there on best practice recommendations. Additionally, there is not a “one size fits all” solution that acts as the silver bullet. In this post, I’ll describe a few of the main patterns that have emerged and the pros/cons of each. It is important to note that many of these patterns have emerged ......

The Enterprise Library Validation Application Block (VAB) is a great library for putting your validation in your business layer where it belongs rather than in the UI. It allows us to apply attributes to the properties of our business objects like this: 1: public class Person 2: { 3: [StringLengthValidator(1, 20, MessageTemplate="First Name must be between 1-20 characters.")] 4: public string FirstName { get; set; } 5: 6: [StringLengthValidator(1, 20, MessageTemplate="Last Name must be between 1-20 ......

UPDATE: This post is now out of date as of the CTP5 release of the MVC framework. For the lastest version, see this post here. One of the areas of MVC that is still an open area in development is how best to handle UI validations. There are numerous approaches currently being examined. MVCContrib Validator Toolkit for MVC The Enterprise Library's VAB is great because it allows you to specify all your validation logic in your business layer where it belongs rather than in your UI. Additionally, it ......

This Saturday I'll be giving a presentation on LINQ to SQL at the Spring 2008 Maryland CMAP Code Camp:  www.cmap-online.org/CodeCamp/

Tomorrow night I’ll be at RockNUG presenting LINQ to SQL. Yes, LINQ to SQL. Again. In the last 2 years I have presented LINQ to SQL numerous times at various user groups and code camps. Why do I keep getting asked to present LINQ to SQL? Isn’t LINQ to SQL dead? Answer: No. LINQ to SQL is not dead! This confusion all started back in October 2008 with a seemingly innocuous post on the ADO.NET team blog discussing the emphasis that Microsoft was going to put into the Entity Framework going forward. ......

Thanks to everyone who attended my presentation last night at CapArea on C# 3.0 and C# 4.0. You can download the C# 3.0 code samples, C# 4.0 code samples, and the PowerPoint presentation from here. Several people asked me about some of the tools I was using during the presentation. A list of the tools that I use (and more) can be found here. Feel free to email me with any questions ......

Full C# 3.0 Archive