Facebook MVC (Republished)
Welcome to Facebook MVC!
Obviously,
if you were able to find this article you are interested in developing
Facebook applications using the Model, View, Controller (MVC) design
pattern! If this is truly what you’d like to do then you’ve come to one
of the right places!
There are a few things that you’ll need to have before you can get started.
1. Visual Studio 2008
2. ASP.NET MVC Preview 3
3. Facebook Developer Toolkit 1.6
4. My Facebook Developer Toolkit MVC Addon
The
focus of this article is on how to setup a Facebook application using a
MVC approach using ASP.NET. The Facebook Developer Toolkit (FBDT) is a
great resource for people that are interested in developing a Facebook
.NET application. FBDT is basically a .NET wrapper of the Facebook API.
Unfortunately, the current approach taken by the FBDT for building web
applications is straight WebForms & as such they use a class
inheritance model which does not support an ASP.NET MVC application
easily. The Facebook Developer Toolkit MVC Addon, makes supporting a
Facebook ASP.NET MVC application a bit easier by adding support for
web.config based configuration, & pre-controller-execution
FacebookAPI setup via an Action Filter.
Please bear with me as I add more details to this article & to CodePlex
I DID IT! (Republished)
I’ve completed the code for my Facebook Developer Toolkit & ASP.NET MVC Preview 3 integration toolkit!
I know that nobody in the world would even read this – yet – but I’m excited about it!
I’ve
made it RIDICULOUSLY easy! I’ve added support for iFrame & FBML
applications and all you have to do is add an ActionFilterAttribute to
your Controller Action!
The code looks something like this:
public ActionResult Index(Facebook.API.FacebookAPI facebookAPI)
After that you have complete access to the FacebookAPI that is part of the Facebook Developer Toolkit (FBDT).
Nick Berardi
started trying to do the same thing with the FBDT but realized that
they had an inheritance model for getting ASPX pages to work correctly
which doesn’t work well with microsoft’s MVC model . He moved to the
Facebook.NET framework because it was more object based. I feel like
I’ve created a better domain model for the FBDT!
note: I was
originally going to base my MVC implementation on Castle’s Monorail
since Microsoft’s MVC teams is working with the folks at Castle. I did
have some issues with getting both MVC frameworks to work correctly in
a shared-hosting environment but ultimately Microsoft’s MVC
architecture had an easier fix…I get into it more when I write my
real article…this is just me being excited that I’m done with my
first version and Xodel (my software development company) can release
some real software for the first time since I created it!
goals
My goals for this is to spend more time blogging about what I am interested in technology wise.
Leave a Comment

