Letters from Readers

ViewModel Questions

Benjamin Day's exploration of leveraging the ViewModel in Silverlight and Windows Phone 7 development ("6 MVVM Tips") generated plenty of feedback.

Really great article overall, but I must advise caution with Tip 6. I agree completely that it's well worthwhile to create a design where you can have a custom entry control that displays the prompt, input control, validation message and so on in a consistent and reusable way. However, I see way too many architecture models where the business rules are coded in the ViewModel, and that's the only place they exist. Well, except for the next UI that uses the same data, and the one after that, and the service API after that and so on.

We must be vigilant to keep that code pushed well down the stack, deep into the Model where it belongs. Then, a model like the one described in Tip 6 can be a way to automate and facilitate the UI discovering and honoring them. It should not be a way to make doing the wrong thing easier.

Dan

Love for LINQ
Peter Vogel's Practical .NET column in the April issue on using Language Integrated Query ("Why You Really Should Be Using LINQ") produced a discussion of the performance of LINQ and, in particular, LINQ-to-SQL.

In my opinion, the best thing about LINQ is it speeds development. The best thing about LINQ-to-SQL is it speeds development without getting tied to an all-encompassing OR/M. If you build line-of-business solutions where the client states that every feature is vital, then building the features with LINQ and LINQ-to-SQL gives speed and agility. And when the client starts using the app and works out what the truly important features are, then it's easy to get in and optimize the plumbing that supports them.

Mike
Brisbane, Australia

Peter Vogel responds:
Interesting view: "LINQ as a rapid application development tool." I'm not as much of a fan of LINQ-to-SQL as you are, but that probably reflects that I'm an independent consultant: Not all of my clients use SQL Server and I miss LINQ when working on their projects. I'm really looking forward to seeing Oracle deliver LINQ support in the spring. LINQ-to-SQL has, however, a major feature that the Entity Framework does not: With the Entity Framework, only LINQ keywords that can be directly translated into SQL are supported. LINQ-to-SQL is far more flexible on that ground.

About the Author

This story was written or compiled based on feedback from the readers of Visual Studio Magazine.

comments powered by Disqus

Featured

  • .NET 11 Preview 5 Focuses on Performance, Productivity and Safer Code

    .NET 11 Preview 5 focuses on under-the-hood runtime performance gains, streamlined APIs and language features that reduce boilerplate, plus built‑in security checks and incremental ASP.NET Core and EF Core improvements aimed at everyday developer productivity.

  • VS Code 1.124 Focuses on Agent Autonomy and Parallel Sessions

    Microsoft's June 2026 VS Code update turns on Autopilot by default and adds background sending for agent sessions.

  • Developing Agentic Systems in .NET: From Concept to Code

    ZioNet founder Alon Fliess previews his Visual Studio Live! San Diego session on building true agentic systems in .NET -- covering the cognitive loop, MCP tool integration, multi-agent orchestration and enterprise hosting and governance with the Microsoft Agent Framework.

  • Mastering AI Development and Building AI Apps with GitHub Copilot

    Two Microsoft experts explain how GitHub Copilot is evolving from a coding assistant into a broader platform for building, customizing and testing AI-powered developer workflows.

Subscribe on YouTube