Tag: MVC
All the articles with the tag "MVC".
-
Form validation with ASP.NET MVC release candidate
Last week, the ASP.NET MVC framework release candidate was released (check ScottGu’s post). Apart from some great new tooling support, form validation has never been easier. Here’s a quick introduction. Imagine we have a LINQ to SQL data model, containing an Employee from the Northwind database. As you may know, LINQ to SQL will generate this Employee class as a partial class, which we can use to extend this domain object’s behaviour. Let’s extend this class with an interface implementation for IDataErrorInfo. [code:c#] public partial class Employee : IDataErrorInfo { #region IDataErrorInfo Members public string Error { get { throw new NotImplementedException(); } }
-
Updated CarTrackr to ASP.NET MVC RC
As you may have noticed, ASP.NET MVC 1.0 Release Candidate has been released over the night. You can read all about it in ScottGu’s blog post, covering all new tools that have been released with the RC. Since I’ve been trying to maintain a small reference application for ASP.NET MVC known as CarTrackr, I have updated the source code to reflect some changes in the ASP.NET MVC RC. You can download it directly from the CodePlex project page at www.cartrackr.net. Here’s what I have updated (copied from the release notes): The templates for ViewPage, ViewMasterPage, and ViewUserControl (and derived types) now support language-specific generic syntax in the main directive’s Inherits attribute. For example, you can specify the following type in the @ Master directive: [code:xml]
-
Checking username availability with jQuery (screencast)
A new screencast has just been uploaded to the MSDN Belgium Chopsticks page. Don't forget to rate the video! Abstract: "This screencast explains how to use jQuery and the ASP.NET MVC framework to quickly add a username availability checker to a user registration page."
-
CarTrackr on Windows Azure - Part 5 - Deploying in the cloud
This post is part 5 (and the final part) of my series on Windows Azure, in which I'll try to convert my ASP.NET MVC application into a cloud application. The current post is all about deploying CarTrackr in the cloud after all modifications done in previous posts. Other parts: Deploying CarTrackr is done using the Azure developer portal. I'm creating a hosted service named "CarTrackr", which will host the cloud version of CarTrackr. I'm also creating a second storage acocunt project, used for TableStorage of all data in CarTrackr.
-
CarTrackr on Windows Azure - Part 4 - Membership and authentication
This post is part 4 of my series on Windows Azure, in which I'll try to convert my ASP.NET MVC application into a cloud application. The current post is all about implementing authentication in CarTrackr. Other parts: In my opening post on this series, i defined some tasks which i would probably have to do prior to being able to run cartrackr on azure. for membership and authentication, i defined 2 solutions: cloudship or Windows Live ID. At first, Cloudship looked really nice as it is just an implementation of ASP.NET's provider model based on Azure. Some thinking cycles later, this did not feel right for CarTrackr... For CarTrackr, authentication only would be enough, membership would be real overkill.
-
CarTrackr on Windows Azure - Part 3 - Data storage
This post is part 3 of my series on Windows Azure, in which I'll try to convert my ASP.NET MVC application into a cloud application. The current post is all about implementing cloud storage in CarTrackr. Other parts: Windows Azure offers 3 types of cloud storage: blobs, tables and queues. Blob Storage stores sets of binary data, organized in containers of your storage account. Table Storage offers structured storage in the form of tables. The Queue service stores an unlimited number of messages, each of which can be up to 8 KB in size.
-
CarTrackr on Windows Azure - Part 2 - Cloud-enabling CarTrackr
This post is part 2 of my series on Windows Azure, in which I'll try to convert my ASP.NET MVC application into a cloud application. The current post is all about enabling the CarTrackr Visual Studio Solution file for Windows Azure. Other parts: For a blank Azure application, one would choose the Web Cloud Service type project (installed with teh Azure CTP), which brings up two projects in the solution: a <project> and <project>_WebRole. The first one is teh service definition, the latter is the actual application. Since CarTrackr is an existing project, let's add a new CarTrackr_Azure project containing the service definition.
-
Track your car expenses in the cloud! CarTrackr on Windows Azure - Part 1 - Introduction
As you may see in the title, I will be starting a series on modifying my CarTrackr sample application to a cloud-based, Windows Azure application. At this point, I don't know if it's easy nor do I know what it takes to achieve this goal. I only have some assumtions on how CarTrackr can be converted to a cloud application. This post is part 1 of the series, in which I'll describe the architecture of Windows Azure and what I think it takes to convert my ASP.NET MVC application into a cloud application. Other parts:
-
ASP.NET MVC XForms released on CodePlex
Just noticed there's a new project on CodePlex related to the ASP.NET MVC framework: MVC XForms. MVC XForms is a simple UI framework for ASP.NET MVC based on the W3C XForms specification. It provides a set of form controls that allow updating of complex model objects. Picked these project goals from Jon Curtis' blog: I haven't gone into any advanced scenario's, but have instead used a simple case to demonstrate some of the MVC XForms basics. First of all, I've created a Person class with an Id (int), Name (string) and BirthDate (DateTime). This class is used by a specific view in my application, of which the view markup looks like this:
-
Using the ASP.NET MVC ModelBinder (screencast)
A new screencast has just been uploaded to the MSDN Belgium Chopsticks page. Don't forget to rate the video! Abstract: "This screencast demonstrates how code can be made more maintainable and testable by delegating binding to client data to the ASP.NET MVC model binder architecture."