<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Development Blog &#187; ASP.NET</title>
	<atom:link href="http://blog.yeticode.co.uk/tag/asp-net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.yeticode.co.uk</link>
	<description>John Tindell's Blog For Development Related Things</description>
	<lastBuildDate>Mon, 09 Jan 2012 01:21:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MVC Update User Online via Action Filter</title>
		<link>http://blog.yeticode.co.uk/2012/01/mvc-update-user-online-via-action-filter/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mvc-update-user-online-via-action-filter</link>
		<comments>http://blog.yeticode.co.uk/2012/01/mvc-update-user-online-via-action-filter/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 00:03:55 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Development Log]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[MVC3]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=904</guid>
		<description><![CDATA[Action filter to update the currently logged in users last online time to allow you to identify which of your users are online /// &#60;summary&#62; /// User Online Action Filter Attribute /// &#60;/summary&#62; public class UserOnlineActionFilterAttribute : ActionFilterAttribute { /// &#60;summary&#62; /// Called by the ASP.NET MVC framework after the action method executes. /// &#60;/summary&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Action filter to update the currently logged in users last online time to allow you to identify which of your users are online</p>
<pre>
/// &lt;summary&gt;
/// User Online Action Filter Attribute
/// &lt;/summary&gt;
public class UserOnlineActionFilterAttribute : ActionFilterAttribute
{
    /// &lt;summary&gt;
    /// Called by the ASP.NET MVC framework after the action method executes.
    /// &lt;/summary&gt;
    /// &lt;param name="filterContext"&gt;The filter context.&lt;/param&gt;
    public override void OnActionExecuted(ActionExecutedContext filterContext)
    {
        try
        {
            if (filterContext.HttpContext != null &#038;&#038; filterContext.HttpContext.User != null &#038;&#038; filterContext.HttpContext.User.Identity != null)
            {
                Membership.Provider.GetUser(filterContext.HttpContext.User.Identity.Name, true);
            }
        }
        catch
        {
            // BAD: Swallow the exception to prevent it messing with the users action
        }

        base.OnActionExecuted(filterContext);
    }
}
</pre>
<p>Add the action filter to the global list inside the global.asax Application_Start.</p>
<pre>
GlobalFilters.Filters.Add(new UserOnlineActionFilterAttribute());
</pre>]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2012/01/mvc-update-user-online-via-action-filter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Professional ASP.NET MVC 1.0</title>
		<link>http://blog.yeticode.co.uk/2009/06/professional-asp-net-mvc-1-0/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=professional-asp-net-mvc-1-0</link>
		<comments>http://blog.yeticode.co.uk/2009/06/professional-asp-net-mvc-1-0/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 18:21:38 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Development Log]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[VS.NET]]></category>

		<guid isPermaLink="false">http://blog.yeticode.co.uk/?p=267</guid>
		<description><![CDATA[At work we have been looking at the ASP.NET MVC, model-view-controller, framework. After looking around at various different tutorials and articles we found a sample chapter from the wrox book Professional ASP.NET MVC 1.0. The sample chapter took the hello world example and create a full application. The application, NerdDinner is an application that allows [...]]]></description>
			<content:encoded><![CDATA[<p>At work we have been looking at the ASP.NET MVC, model-view-controller, framework. After looking around at various different tutorials and articles we found a sample chapter from the wrox book Professional ASP.NET MVC 1.0. The sample chapter took the hello world example and create a full application. The application, <a href="http://www.nerddinner.com/">NerdDinner</a> is an application that allows you to create dinner parties and RSPV to them. The sample covers a lot of the functionality that is within ASP.NET MVC. The sample chapter can be found online at <a href="http://tinyurl.com/aspnetmvc">Wrox&#8217;s website</a> with the source code hosted at <a href="http://nerddinner.codeplex.com/">codeplex</a>.</p>
<p align="center">
<a href="http://www.amazon.co.uk/gp/product/0470384611?ie=UTF8&amp;tag=yetiblog-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=0470384611" style="display: block-inline;"><br />
<img src="http://static.yeticode.co.uk/blog/images/wrox_asp_net_mvc.jpg" alt="Professional ASP.NET MVC 1.0" /><br />
</a>
</p>
<p>Reading though the sample chapter is a good way to get started with ASP.NET MVC as the chapter explains what it is doing in a easy to understand manor, but more importantly it explains why they are being done. The chapter is a comprehensive walk through of how to create the NerdDinner application. Throughout the chapter the authors provide titbits of useful information, for example the use of the repository pattern and dependency injection. Throughout the chapter the authors trying to enforce good coding practice and often make reference to <a href="http://en.wikipedia.org/wiki/Test-driven_development">test driven development</a> which in a later chapter they go into more detail about, discussing different development techniques.</p>
<p>The sample chapter is more than enough to get anyone started with ASP.NET MVC and follows the development process from start to finish including a section on unit testing the application. The following chapters delve into more detail about specific areas of the ASP.NET MVC framework. The second and third chapters go into detail about the MVC pattern, detailing its background and its use on the web. The chapter also provides an overview, albeit brief, of other frameworks that are available. Although their coverage was brief they were not mentioned as either superior or inferior rather just as alternatives to the ASP.NET MVC framework. This tone was subsequently repeated in the third chapter when the authors compare ASP.NET with WebForms to ASP.NET MVC. They often mention that MVC is not a replacement for WebForms rather it is a different approach. These two chapters are extremely useful as they allow you to make an informed decision whether ASP.NET MVC is the right choice for you.</p>
<p>I&#8217;ve still to finish reading the rest of this book so I&#8217;ll update this post the more I read of it.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.yeticode.co.uk/2009/06/professional-asp-net-mvc-1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

