About Archive Tag Cloud Translations RSS

You are writing a comment about Two-Faced Django Part 1: Building a project that exists simultaniously on Facebook and the web, here is a quick summary:

The first article of an eight article series on using Django to create apps that exist simultaneously as independent web applications and as Facebook applications. This segment covers putting together our development setup.


You are responding to this comment written by Will Larson on January 3rd 2008, 23:33.

@Lucy

The advantage of using the helper is that the middleware will attempt to attach a facebook instance to every request that your Django project handles. This means that requests that are not interacting with Facebook (such as the web app in the walkthrough) will also have the PyFacebook middleware fiddle with their requests.

That may or may not be important to you. The total extra memory used and the extra processing done unnecessarily on non-Facebook related requests is likely not even noticable.

So the gains are A) some minor efficiency boosts, and B) greater control and awareness over your code.

In the next few days I hope to put out a decorator that will attach a Facebook instance to the request it is attached to, and thus you could simply put it infront of any of the normal PyFacebook decorators (require_login, etc) and it would be oblivious if you were using the pyfacebook middleware or not. That means there is only one decorator needed to take advantage of all the other PyFacebook code, instead of having to rewrite everything to work without the middleware...


Please be aware that comment forms go stale after one hour.





Comments may make use of LifeFlow MarkDown. Raw html will be escaped.


Quick Introduction to LifeFlow MarkDown Syntax

A highlighted code block:

@@ ruby
def a (b, c):
  b * c
end
@@

Other common languages work as well: scheme, python, java, html, etc.

Other markdown syntax:

 ### This is an h3 title
#### This is an h4 title
**this is bold**
*this is italics*

1. This is an
2. ordered list

* And an unordered
* list too

[this is a link](http://www.lethain.com/ "Lethain")