<?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>Marc Dormey &#187; facebook</title>
	<atom:link href="http://www.marcdormey.com/index.php/tags/facebook/feed" rel="self" type="application/rss+xml" />
	<link>http://www.marcdormey.com</link>
	<description>Software Finds, Programming Tutorials and Gadget Reviews</description>
	<lastBuildDate>Tue, 20 Jul 2010 14:52:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Writing Facebook Apps with ASP.NET MVC, Silverlight, LINQ2Facebook and BDD</title>
		<link>http://www.marcdormey.com/index.php/archives/writing-facebook-apps-with-asp-net-mvc-silverlight-linq2facebook-and-bdd</link>
		<comments>http://www.marcdormey.com/index.php/archives/writing-facebook-apps-with-asp-net-mvc-silverlight-linq2facebook-and-bdd#comments</comments>
		<pubDate>Tue, 10 Nov 2009 11:19:19 +0000</pubDate>
		<dc:creator>Marcel</dc:creator>
				<category><![CDATA[ASP.NET MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[bdd]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[linq2facebook]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[storyq]]></category>

		<guid isPermaLink="false">http://www.marcdormey.com/?p=269</guid>
		<description><![CDATA[This weekend I looked into creating facebook applications from a .NET perspective. It turns out a quick search presents loads of support starting with the Facebook Developer Toolkit (Update: Just heard version 3 was released yesterday which gives silverlight and mvc support, wow what a coincidence?) and LINQ2Facebook (Fql).
I decided to do some research and [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend I looked into creating facebook applications from a .NET perspective. It turns out a quick search presents loads of support starting with the <a href="http://wiki.developers.facebook.com/index.php/C" target="_blank">Facebook Developer Toolkit</a> (Update: Just heard version 3 was released yesterday which gives silverlight and mvc support, wow what a coincidence?) and <a href="http://www.codeproject.com/KB/aspnet/LinqToFqlAddon.aspx" target="_blank">LINQ2Facebook</a> (Fql).</p>
<p>I decided to do some research and ended up created a Facebook application framework using ASP.NET MVC, Silverlight, LINQ2Facebook. I also used <a href="http://www.codeplex.com/storyq" target="_blank">StoryQ</a> to POC their BDD framework and give the community a chance to see its power.</p>
<p>I have created a codeplex project with the source code here:</p>
<p><a href="http://facebookmvcbdd.codeplex.com/" target="_blank">Facebook MVC BDD Silverlight Framework</a></p>
<p>Source code sample:</p>
<pre class="brush:csharp">
public ActionResult Index()
{
	if (_service.TryAuthenticating())
	{
		user user = _service.GetCurrentUser();
		var silverlightViewModel = new SilverlightViewModel
									   {
										   ApplicatonName = "TestApp",
										   Width = "400",
										   Height = "400"
									   };

		silverlightViewModel.Params.Add("Name", user.name);
		silverlightViewModel.Params.Add("Picture", user.pic_big);

		return View(silverlightViewModel);
	}
	throw new AuthenticationException("Not allowed!");
}
</pre>
<pre class="brush:csharp">
[Test]
public void IndexActionShouldReturnViewModelWithCurrentLoggedInUser()
{
    var story = new Story("Index action should return a new silverlight view model");

    story.AsA("facebook application home page")
        .IWant("to receive a new silverlight view model")
        .SoThat("I can send it to the silverlight applicatioin")
        .WithScenario("Get silverlight view model")
        .Given(() => Steps.TheUserIsLoggedInWithUsername("Joe Blogs"))
        .When(() => Steps.TheUserEntersTheHomePage())
        .Then(() => Steps.EnsureTheCurrentLoggedInUserDetailsIsReceivedInTheViewModel());

    story.Assert();
}
</pre>
<p>producing output:</p>
<p>Story: Index action should return a new silverlight view model</p>
<p>  As a facebook application home page<br />
  I want to receive a new silverlight view model<br />
  So that I can send it to the silverlight applicatioin</p>
<p>  Scenario 1: Get silverlight view model<br />
    Given The user is logged in with username (Joe Blogs)                          Passed<br />
    When The user enters the home page                                             Passed<br />
    Then Ensure the current logged in user details is received in the view model   Passed</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcdormey.com/index.php/archives/writing-facebook-apps-with-asp-net-mvc-silverlight-linq2facebook-and-bdd/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
