<?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>Tony Abou-Assaleh &#187; Web Development</title>
	<atom:link href="http://tony.abou-assaleh.net/section/web-development/feed" rel="self" type="application/rss+xml" />
	<link>http://tony.abou-assaleh.net</link>
	<description>Official Website and Blog</description>
	<lastBuildDate>Thu, 05 Jan 2012 18:32:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>The Future of the Web: Mobile Apps to replace Web Apps</title>
		<link>http://tony.abou-assaleh.net/web-development/the-future-of-the-web-mobile-apps-to-replace-web-apps</link>
		<comments>http://tony.abou-assaleh.net/web-development/the-future-of-the-web-mobile-apps-to-replace-web-apps#comments</comments>
		<pubDate>Sun, 09 May 2010 05:53:42 +0000</pubDate>
		<dc:creator>taa</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://tony.abou-assaleh.net/?p=310</guid>
		<description><![CDATA[After a recent report by Mobile Crunch that the mobile location-based game Booyah has outgrown Foursquares and Gowalla reaching 1 million mobile users, combined with recent reports on the future of the Web at top conferences on the subject, and affirmed by recent trends in VC&#8217;s investing strategies in the IT sector, I have become [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fthe-future-of-the-web-mobile-apps-to-replace-web-apps"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fthe-future-of-the-web-mobile-apps-to-replace-web-apps&amp;source=tony_aa&amp;style=normal&amp;service=bit.ly&amp;service_api=R_5c552afd54d160c4b60bc11d0ac48b4b&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>After a <a title="Booyah! MyTown hits 1 million users before Foursquare or Gowalla" href="http://www.mobilecrunch.com/2010/02/11/booyah-mytown-hits-1-million-users-before-foursquare-or-gowalla/" target="_blank">recent report</a> by Mobile Crunch that the mobile location-based game Booyah has outgrown Foursquares and Gowalla reaching 1 million mobile users, combined with recent reports on the future of the Web at <a title="The World Wide Web Conference" href="http://www2010.org/" target="_blank">top conferences</a> on the subject, and affirmed by recent trends in VC&#8217;s investing strategies in the IT sector, I have become convinced that <strong>the future of the Web is in mobile apps and not Web-based applications</strong>, sometimes referred to as &#8220;software as a service&#8221;.</p>
<p>In the last decade, we have witnessed a revolution in Web app design both in terms of the user experience and the richness of functionality. Arguable, the most successful and revolutionary Web app for consumers has been Gmail, and more recently Google Apps. Facebook is another great example of a Web app, with more social focus. All is good, and more Web apps are coming, but then what?</p>
<p>While the laptop is becoming a replacement to the desktop for many, smart phones such as iPhone and Blackberry are becoming a replacement for laptops. The new trend in mobile consumer usage, set by Apple&#8217;s iPhone and followed by RIM&#8217;s Blackberry and Google&#8217;s Android, is to access services and information through apps instead of mobile-friendly websites. Is your website optimized for mobile access? Big deal &#8211; new mobile browser can render most websites in a usable fashion. But who cares? If you don&#8217;t have an app to access your site then it&#8217;s simply boring. I believe boring is not the main reason though. It all boils down to the look and feel. <strong>Mobile apps provide a consistent look and feel with the rest of the mobile interface</strong>, a lot more so that a Web page does.</p>
<p>Based on these trends, I believe that the value of &#8220;software as a service&#8221; as being the future of desktop apps for consumers will slowly (or quickly?) diminish; while mobile apps will increase in sophistication and become the norm for accessing your email, social networks, documents, spreadsheets, organizer, etc.</p>
<p>Some may argue that the desktop, or the laptop, will still be ahead in software due to the limited screen size that mobile devices affords. Apple has negated that claim last month with the release of its iPad. QED.</p>
]]></content:encoded>
			<wfw:commentRss>http://tony.abou-assaleh.net/web-development/the-future-of-the-web-mobile-apps-to-replace-web-apps/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Plugins Used by this Site</title>
		<link>http://tony.abou-assaleh.net/web-development/wordpress-plugins-used</link>
		<comments>http://tony.abou-assaleh.net/web-development/wordpress-plugins-used#comments</comments>
		<pubDate>Sun, 27 Sep 2009 00:05:45 +0000</pubDate>
		<dc:creator>taa</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://tony.abou-assaleh.net/?p=247</guid>
		<description><![CDATA[As of today, the following plugins are active on this site: Akismet: A popular anti-spam plugin the screens and blocks spammy comments All in One SEO Pack: it gives a great flexibility in editing meta tags for individual posts and pages, but I use it most of it&#8217;s out-of-the-box good templates for default meta-tag values. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fwordpress-plugins-used"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fwordpress-plugins-used&amp;source=tony_aa&amp;style=normal&amp;service=bit.ly&amp;service_api=R_5c552afd54d160c4b60bc11d0ac48b4b&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>As of today, the following plugins are active on this site:</p>
<ol>
<li><strong>Akismet</strong>: A popular anti-spam plugin the screens and blocks spammy comments</li>
<li><strong>All in One SEO Pack</strong>: it gives a great flexibility in editing meta tags for individual posts and pages, but I use it most of it&#8217;s out-of-the-box good templates for default meta-tag values.</li>
<li><strong>bib2html</strong>: With some in-house mods, this plugin powers the the <a href="/publications" target="_self">publications</a> page from a BibTeX file. Very convenient.</li>
<li><strong>Exec-PHP</strong>: I use this plugin to execute PHP code on the <a href="/popular-posts" target="_self">popular posts</a> page.</li>
<li><strong>FeedBurner FeedSmith</strong>: provides RSS feed serving through FeedBurner.</li>
<li><strong>File Icons</strong>: the idea behind this plugin is neat, it automatically ads meaningful icons to links based on the extension of the destination file. I&#8217;m not too happy with it though. I feel it&#8217;s a bit clumsy at times. See it in action on the <a href="/publications">publications</a> page.</li>
<li><strong>Google Analyticator</strong>: simple Google Analytics integration</li>
<li><strong>Google XML Sitemaps</strong>: very useful plugin that automatically generates a site map every time a new post is added. Highly configurable too.</li>
<li><strong>WordPress Popular Posts</strong>: a new addition to the site. It power the popular posts widget in the right column as well as the <a href="/popular-posts">popular posts</a> page. The popularity can be based on page views or comments.</li>
<li><strong>WP-ContactForm</strong>: I use a modified version of this plugin to power the <a href="/contact">contact</a> page.</li>
<li><strong>WP-SpamFree</strong>: Another plugin to reduce comment spam. It shows the comment form through JavaScript, reducing automated comments.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tony.abou-assaleh.net/web-development/wordpress-plugins-used/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Future of the Web: Mobile + Social + Linked</title>
		<link>http://tony.abou-assaleh.net/web-development/future-of-the-web-mobile-social-linked</link>
		<comments>http://tony.abou-assaleh.net/web-development/future-of-the-web-mobile-social-linked#comments</comments>
		<pubDate>Thu, 07 May 2009 12:59:31 +0000</pubDate>
		<dc:creator>taa</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://tony.abou-assaleh.net/?p=190</guid>
		<description><![CDATA[By now, it should be clear to everyone that the future of the Web is mobile devices, social networking, and linked data. Although this realization did not come to me until I attended the World Wide Web Conference (WWW2009) in Madrid, Spain, at the end of April. Several keynote speakers, tutorials/workshops, and dedicated tracks and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Ffuture-of-the-web-mobile-social-linked"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Ffuture-of-the-web-mobile-social-linked&amp;source=tony_aa&amp;style=normal&amp;service=bit.ly&amp;service_api=R_5c552afd54d160c4b60bc11d0ac48b4b&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>By now, it should be clear to everyone that the future of the Web is mobile devices, social networking, and linked data. Although this realization did not come to me until I attended the World Wide Web Conference (WWW2009) in Madrid, Spain, at the end of April. Several keynote speakers, tutorials/workshops, and dedicated tracks and sessions emphasized this fact. I&#8217;ll say a few word on each of the three pillars:</p>
<p><strong>Mobile Web</strong></p>
<p>As Sir Tim Burners-Lee said in his<a title="Twenty Years: Looking Forward, Looking Back" href="http://www2009.eprints.org/212/" target="_blank"> keynote presentation</a>: &#8220;more people will have their first encounter with the Web through a mobile device than a laptop.&#8221; The World Wide Web Consortium (W3C) has task forces and standards to promote and standardize the mobile Web. They&#8217;ve been doing it for years, but only now that people are listening seriously because it is already happening.</p>
<p>What this means to the Web community is that Web sites should have a mobile version that conforms to standards and guidelines and works well on mobile devices.</p>
<p><strong>Social Networking</strong></p>
<p>It is a given that social networks are taking over the Web. But that&#8217;s not what &#8220;the future of the Web is social networking&#8221; means. Social networking on the Web refers to enabling the end users to interact with each other on your Web site. Without this interaction, your site will fail to deliver the expected value by the growing savvy Web population.</p>
<p><strong>Linked Data</strong></p>
<p>The Semantic Web is dubbed as Web 3.0. Many believe that a widespread of the Semantic Web is at least a decade away. Linked Data, on the hand, is already a reality. Linked data consists of the now-feasible subset of the Semantic Web. At the very basic level, it is RDF + URI: a common data representation format and standard for addressing and linking data items. The academic community emphasizes the important of Linked Open Data &#8211; making your proprietary databases accessible on the Web in the Linked Data format. This movement is new but strong. Many tools are being developed to facilitate the transition to Linked Data for the masses.</p>
<p><strong>Summary</strong></p>
<p>In short, as a Web site owner, if you want to survive on the Web for the years to come, you better ensure that your site is accessible from mobile devices, that you facilitate social interaction among your users, and that your data is open and linked, and linkable.</p>
<p><em>Thanks to Christopher Gutteridge for this wonderful tool to <a title="WWW2009 EPrints" href="http://www2009.eprints.org/" target="_blank">search and browse the WWW2009 proceedings</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://tony.abou-assaleh.net/web-development/future-of-the-web-mobile-social-linked/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Automatic Upgrade to 2.7.1 Fails on 1and1 Hosting</title>
		<link>http://tony.abou-assaleh.net/web-development/wordpress-automatic-upgrade-to-271-fails-on-1and1-hosting</link>
		<comments>http://tony.abou-assaleh.net/web-development/wordpress-automatic-upgrade-to-271-fails-on-1and1-hosting#comments</comments>
		<pubDate>Sat, 07 Mar 2009 03:22:15 +0000</pubDate>
		<dc:creator>taa</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://tony.abou-assaleh.net/?p=120</guid>
		<description><![CDATA[I&#8217;ve been trying to upgrade to the latest WordPress (version 2.7.1) for a while without success. Every time I initiate the upgrade, whether through WordPress&#8217; built-in automatic upgrade feature or using the automatic upgrade plugin, the process stalls when it reaches the step of downloading the latest zip file. After checking the the compatibility matrix [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fwordpress-automatic-upgrade-to-271-fails-on-1and1-hosting"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fwordpress-automatic-upgrade-to-271-fails-on-1and1-hosting&amp;source=tony_aa&amp;style=normal&amp;service=bit.ly&amp;service_api=R_5c552afd54d160c4b60bc11d0ac48b4b&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.1and1.com/?k_id=14012153" target="_blank" rel="nofollow"><img class="alignright" style="border: 0pt none;" src="http://banner.1and1.com/xml/banner?size=5%26%number=1" border="0" alt="Banner" width="140" height="28" /></a>I&#8217;ve been trying to upgrade to the latest WordPress (version 2.7.1) for a while without success. Every time I initiate the upgrade, whether through WordPress&#8217; built-in automatic upgrade feature or using the automatic upgrade plugin, the process stalls when it reaches the step of downloading the latest zip file. After checking the the <a title="Core Update Host Compatibility" href="http://codex.wordpress.org/Core_Update_Host_Compatibility" target="_blank">compatibility matrix</a> I discovered that my hosting provider, 1and1, runs PHP4 by default, which incompatible with the upgrade script. This problem can be easily fixed by forcing PHP5. This can be achieved by adding the following line to your .htaccess file:</p>
<p><code>AddType x-mapp-php5 .php</code></p>
]]></content:encoded>
			<wfw:commentRss>http://tony.abou-assaleh.net/web-development/wordpress-automatic-upgrade-to-271-fails-on-1and1-hosting/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Stripped-down Django Tutorial</title>
		<link>http://tony.abou-assaleh.net/web-development/stripped-down-django-tutorial</link>
		<comments>http://tony.abou-assaleh.net/web-development/stripped-down-django-tutorial#comments</comments>
		<pubDate>Sun, 15 Feb 2009 23:33:32 +0000</pubDate>
		<dc:creator>taa</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://tony.abou-assaleh.net/?p=80</guid>
		<description><![CDATA[The django official tutorial consists of 4 parts, unnecessarily long, mixes commands with text, and omit some important details. Here is an attempt at providing a more complete and more condensed version of the tutorial. Install Django. The latest tutorial uses a newer version of Django that is not backward compatible. Therefore, it is best [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fstripped-down-django-tutorial"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fstripped-down-django-tutorial&amp;source=tony_aa&amp;style=normal&amp;service=bit.ly&amp;service_api=R_5c552afd54d160c4b60bc11d0ac48b4b&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="size-full wp-image-114 alignright" title="django_logo" src="http://tony.abou-assaleh.net/wp-content/uploads/2009/02/django_logo.gif" alt="Django Logo" width="117" height="41" />The <a href="http://docs.djangoproject.com/en/dev/">django official tutorial</a> consists of 4 parts, unnecessarily long, mixes commands with text, and omit some important details. Here is an attempt at providing a more complete and more condensed version of the tutorial.<br />
<span id="more-80"></span></p>
<ol>
<li><strong>Install Django.</strong> The latest tutorial uses a newer version of Django that is not backward compatible. Therefore, it is best to <a href="http://docs.djangoproject.com/en/dev/topics/install/#installing-development-version">install Django from svn</a>:
<pre>svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk
cd django-trunk
sudo python setup.py install</pre>
</li>
<li><strong>Create a Project.</strong> Create a new project under the current directory called mysite:
<pre>django-admin.py startproject mysite</pre>
</li>
<li><strong>Configure Database.</strong> For this example, we will use an sqlite3 database.
<pre>mkdir db
chmod a+rwx db
chmod g+s db</pre>
<p>The Web server needs access and write permission. The g+s ensures that group ownership of created files in db remains the same that of db. Edit mysite/settings.py as follows:</p>
<pre>DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = '/path/to/mysite/db/mysite.db'</pre>
<p>Create the database and the tables:</p>
<pre>python manage.py syncdb</pre>
</li>
<li><strong>Create a Polls Application.</strong> From the mysite directory, run the command:
<pre>python manage.py startapp polls</pre>
</li>
<li><strong>Create the Polls Data Model.</strong> Edit the file mysite/polls/models.py as follows:
<pre>from django.db import models

class Poll(models.Model):
    question = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')
    def __unicode__(self):
        return self.question

class Choice(models.Model):
    poll = models.ForeignKey(Poll)
    choice = models.CharField(max_length=200)
    votes = models.IntegerField()
    def __unicode__(self):
        return self.choice</pre>
<p>And synchronize the database:</p>
<pre>python manage.py syncdb</pre>
</li>
<li><strong>Enable the Admin Interface</strong> Enable the admin application in mysite/settings.py:
<pre>INSTALLED_APPS = (
    ....
    "django.contrib.admin",
    ....</pre>
<p>Then enable the admin URLs in mysite/urls.py:</p>
<pre>from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
    (r'^admin/', include(admin.site.urls)),
)</pre>
<p>And synchronize the database:</p>
<pre>python manage.py syncdb</pre>
<p>Note that at this point we only enabled the admin URL. The home page will no longer work until we add another pattern to match it.</li>
<li><strong>Test the admin Interface.</strong> Either configure your Web server according to the docs, or use the development built-in server from the mysite direcotry:
<pre>python manage.py runserver 0.0.0.0:8080</pre>
<p>Visit the admin interface from a Web browser at:</p>
<pre>http://127.0.0.1:8080/admin</pre>
</li>
<li><strong>Enable admin in Polls.</strong> Create a file mysite/polls/admin.py with:
<pre>from mysite.polls.models import Poll
from django.contrib import admin

admin.site.register(Poll)</pre>
<p>You should now see the Polls in the admin interface.</p>
<p>Note: don&#8217;t forget to restart the Web server every time you make changes to your python code.</li>
<li><strong>Customize the Polls Admin.</strong> Edit mysite/polls/admin.py to be:
<pre>from mysite.polls.models import Poll
from mysite.polls.models import Choice
from django.contrib import admin

class ChoiceInline(admin.TabularInline):
    model = Choice
    extra = 3

class PollAdmin(admin.ModelAdmin):
    fieldsets = [
        (None,               {'fields': ['question']}),
        ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}),
    ]
    inlines = [ChoiceInline]
    list_display = ('question', 'pub_date', 'was_published_today')
    list_filter = ['pub_date']
    search_fields = ['question']
    date_hierarchy = 'pub_date'

admin.site.register(Poll, PollAdmin)</pre>
<p>Each line adds a new functionality to the admin interface, and the functions are independent of each other. Most should self-evident. Feel free to experiment.</p>
<p>To customize the how the &#8220;was_published_today&#8221; header is displayed, change mysite/polls/model.py to:</p>
<pre>    def was_published_today(self):
            return self.pub_date.date() == datetime.date.today()
    was_published_today.short_description = 'Published today?'</pre>
</li>
<li><strong>Setup URLs.</strong> Create the polls urls in mysite/polls/urls.py:
<pre>from django.conf.urls.defaults import *

urlpatterns = patterns('mysite.polls.views',
    (r'^$', 'index'),
    (r'^(?P&lt;poll_id&gt;\d+)/$', 'detail'),
    (r'^(?P&lt;poll_id&gt;\d+)/results/$', 'results'),
    (r'^(?P&lt;poll_id&gt;\d+)/vote/$', 'vote'),
)</pre>
<p>Add polls to the site urls in mysite/urls.py by including the pattern:</p>
<pre>    (r'^polls/', include('mysite.polls.urls')),</pre>
</li>
<li><strong>Setup a Templates Directory.</strong>Create a directory mysite/templates. Update mysite/setting.py to use this direcotyr:
<pre>TEMPLATE_DIRS = (
    '/path/to/mysite/templates',
)</pre>
</li>
<li><strong>Create the Index View and Templates.</strong> Create a file mysite/polls/views.py:
<pre>from django.shortcuts import render_to_response, get_object_or_404
from mysite.polls.models import Poll

def index(request):
    latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
    return render_to_response('polls/index.html', {'latest_poll_list': latest_poll_list})</pre>
<p>And the index template mysite/templates/polls/index.html:</p>
<pre>{% if latest_poll_list %}
    &lt;ul&gt;
    {% for poll in latest_poll_list %}
        &lt;li&gt;{{ poll.question }}&lt;/li&gt;
    {% endfor %}
    &lt;/ul&gt;
{% else %}
    &lt;p&gt;No polls are available.&lt;/p&gt;
{% endif %}</pre>
</li>
<li><strong>Create the Detail View and Template.</strong> Add to mysite/polls/views.py:
<pre>def detail(request, poll_id):
    p = get_object_or_404(Poll, pk=poll_id)
    return render_to_response('polls/detail.html', {'poll': p})</pre>
<p>And create the template mysite/templates/detail.html:</p>
<pre>&lt;h1&gt;{{ poll.question }}&lt;/h1&gt;

{% if error_message %}&lt;p&gt;&lt;strong&gt;{{ error_message }}&lt;/strong&gt;&lt;/p&gt;{% endif %}

&lt;form action="/polls/{{ poll.id }}/vote/" method="post"&gt;
{% for choice in poll.choice_set.all %}
    &lt;input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" /&gt;
    &lt;label for="choice{{ forloop.counter }}"&gt;{{ choice.choice }}&lt;/label&gt;&lt;br /&gt;
{% endfor %}
&lt;input type="submit" value="Vote" /&gt;
&lt;/form&gt;</pre>
</li>
<li><strong>Create the Vote Handler.</strong> Edit mysite/polls/views.py to include:
<pre>from django.shortcuts import get_object_or_404, render_to_response
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from mysite.polls.models import Choice, Poll
# ...
def vote(request, poll_id):
    p = get_object_or_404(Poll, pk=poll_id)
    try:
        selected_choice = p.choice_set.get(pk=request.POST['choice'])
    except (KeyError, Choice.DoesNotExist):
        # Redisplay the poll voting form.
        return render_to_response('polls/detail.html', {
            'poll': p,
            'error_message': "You didn't select a choice.",
        })
    else:
        selected_choice.votes += 1
        selected_choice.save()
        # Always return an HttpResponseRedirect after successfully dealing
        # with POST data. This prevents data from being posted twice if a
        # user hits the Back button.
        return HttpResponseRedirect(reverse('mysite.polls.views.results', args=(p.id,)))</pre>
</li>
<li><strong>Create the Results View and Template.</strong> Edit mysite/polls/views.py to include the results view:
<pre>def results(request, poll_id):
    p = get_object_or_404(Poll, pk=poll_id)
    return render_to_response('polls/results.html', {'poll': p})</pre>
<p>Create a results templates file mysite/templates/polls/results.html with:</p>
<pre>&lt;h1&gt;{{ poll.question }}&lt;/h1&gt;

&lt;ul&gt;
{% for choice in poll.choice_set.all %}
    &lt;li&gt;{{ choice.choice }} -- {{ choice.votes }} vote{{ choice.votes|pluralize }}&lt;/li&gt;
{% endfor %}
&lt;/ul&gt;</pre>
</li>
</ol>
<p>Et Voilà! These steps cover most of the 4-part tutorial, excluding templating the admin area and using the generic views. For completeness, I include a sample apache config file that uses virtual hosts so you can go through this tutorial with apache.</p>
<pre>&lt;VirtualHost *&gt;
    ServerAdmin webmaster@localhost
    ServerName django-tutorial.osrd.org
    DocumentRoot /path/to/django-projects/mysite

    &lt;Directory /path/to/django-projects/mysite &gt;
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    &lt;/Directory&gt;

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On

&lt;LocationMatch "/mysite/*"&gt;
    SetHandler mod_python
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings
    PythonOption django.root /mysite
    PythonDebug On
    PythonPath "['/path/to/django-projects'] + sys.path"
&lt;/LocationMatch&gt;

&lt;Location "/media"&gt;
    SetHandler None
&lt;/Location&gt;

&lt;LocationMatch "\.(jpg|gif|png)$"&gt;
    SetHandler None
&lt;/LocationMatch&gt;

&lt;/VirtualHost&gt;</pre>
<p>If you find any omissions or inaccuracies, please report them privately or in the comments and I&#8217;ll update the tutorial accordingly.</p>
]]></content:encoded>
			<wfw:commentRss>http://tony.abou-assaleh.net/web-development/stripped-down-django-tutorial/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Online RSS Aggregation Sites</title>
		<link>http://tony.abou-assaleh.net/web-development/online-rss-aggregation-sites</link>
		<comments>http://tony.abou-assaleh.net/web-development/online-rss-aggregation-sites#comments</comments>
		<pubDate>Sun, 08 Feb 2009 04:08:09 +0000</pubDate>
		<dc:creator>taa</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://tony.abou-assaleh.net/?p=65</guid>
		<description><![CDATA[This article is in-progress. I am compiling a list of notable sites (i.e., sites with consistent traffic, traffic growth, or sites that people talk about elsewhere) that are focused on aggregating content from other sites, primarily through RSS feeds. addictomatic.com alltop.com esciencenews.com headlinesfeed.com hypem.com originalsignal.com popurls.com protopage.com If you know others, please submit them throught [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fonline-rss-aggregation-sites"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fonline-rss-aggregation-sites&amp;source=tony_aa&amp;style=normal&amp;service=bit.ly&amp;service_api=R_5c552afd54d160c4b60bc11d0ac48b4b&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><em>This article is in-progress.</em></p>
<p>I am compiling a list of notable sites (i.e., sites with consistent traffic, traffic growth, or sites that people talk about elsewhere) that are focused on aggregating content from other sites, primarily through RSS feeds.<br />
<span id="more-65"></span></p>
<ul>
<li><a href="http://addictomatic.com" target="_blank">addictomatic.com</a></li>
<li><a href="http://alltop.com" target="_blank">alltop.com</a></li>
<li><a href="http://esciencenews.com" target="_blank">esciencenews.com</a></li>
<li><a href="http://headlinesfeed.com" target="_blank">headlinesfeed.com</a></li>
<li><a href="http://hypem.com" target="_blank">hypem.com</a></li>
<li><a href="http://originalsignal.com" target="_blank">originalsignal.com</a></li>
<li><a href="http://popurls.com" target="_blank">popurls.com</a></li>
<li><a href="http://protopage.com" target="_blank">protopage.com</a></li>
</ul>
<p>If you know others, please submit them throught the <a href="/contact/">contact form</a> or in the comments below. I will review each submission and add it to the list if appropriate.</p>
]]></content:encoded>
			<wfw:commentRss>http://tony.abou-assaleh.net/web-development/online-rss-aggregation-sites/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to WordPress 2.5.1 and K2 RC6</title>
		<link>http://tony.abou-assaleh.net/web-development/upgrading-to-wordpress-251-and-k2-rc6</link>
		<comments>http://tony.abou-assaleh.net/web-development/upgrading-to-wordpress-251-and-k2-rc6#comments</comments>
		<pubDate>Sat, 28 Jun 2008 00:36:54 +0000</pubDate>
		<dc:creator>taa</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://tony.abou-assaleh.net/?p=40</guid>
		<description><![CDATA[Today I became a happier WordPress user because I managed to upgrade to WordPress 2.5.1 with a surprisingly easy process, as well as migrating to the latest K2 release. The short story: install the WordPress Automatic upgrade plugin, run it, correct failed actions, upgrade the K2, migrate footer from the previous K2, et voilà! I [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fupgrading-to-wordpress-251-and-k2-rc6"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fupgrading-to-wordpress-251-and-k2-rc6&amp;source=tony_aa&amp;style=normal&amp;service=bit.ly&amp;service_api=R_5c552afd54d160c4b60bc11d0ac48b4b&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://tony.abou-assaleh.net/wp-content/uploads/2008/04/wordpress_logo.png"><img class="alignright size-full wp-image-29" title="WordPress Logo" src="http://tony.abou-assaleh.net/wp-content/uploads/2008/04/wordpress_logo.png" alt="" width="250" height="68" /></a>Today I became a happier WordPress user because I managed to upgrade to WordPress 2.5.1 with a surprisingly easy process, as well as migrating to the latest K2 release. The short story: install the WordPress Automatic upgrade plugin, run it, correct failed actions, upgrade the K2, migrate footer from the previous K2, et voilà! I am very impressed with the new admin interface of WordPress. It took a few minutes to understand where is what, but WOW! Neat, organized, and pleasant.<br />
<span id="more-40"></span><br />
When first tried to upgrade my WordPress installation, I wasn&#8217;t really sure how I would go about it. According to the <a title="Upgrading WordPress" href="http://codex.wordpress.org/Upgrading_WordPress">WordPress upgrade guide</a>, the process consists of five simple steps:</p>
<ol>
<li><strong>Backup Current Installation.</strong> Sounds pretty simple, but backing up from a hosted server, although not complicated, is not that simple either. You need to backup all your files and you need to backup all the database tables. God forbid you have more than just the WordPress installation using the same database. Trying to go through all the tables and deciding which belong to WP and which belong to other applications is unpleasant at best.</li>
<li><strong>Deactivate Plugins.</strong> No complaints here. Fairly simple.</li>
<li><strong>Download Latest WordPress.</strong> Granted, there is nothing simpler to do, save for scratching your head.</li>
<li><strong>Replace WordPress Files.</strong> I have a few custom plugins, custom themes, and some other modes. How do you replace only what needs to be replaced but not the other files? The naive way is to do it one file at a time. You can try doing it in a batch as in copy-and-pray. Actually that won&#8217;t work because you need to be careful not replace your wp-config.php file. Further, you need to copy the contents of the wp-content folder from your previous installation, but not the entire folder. This step is what kept me from upgrading earlier &#8211; too many things could go wrong. After replacing all the files, you need to visit the upgrade page so the database schema can be changed to the new one.</li>
<li><strong>Reactivate Plugins.</strong> You have to reactivate your plugins one at a time. There are no &#8220;plugin profiles&#8221; in WordPress, which would&#8217;ve allowed you to enable and disable plugins in groups.</li>
</ol>
<p>In a an <a title="My Essential Plug-Ins for WordPress Blogs" href="http://www.searchengineguide.com/david-wallace/my-essential-plugins-for-wordpress-blogs.php">article</a> mentioned in a recent Search Engine Guide newsletter, I read about this super useful almost working plugin called <a title="Wordpress Automatic Upgrade plugin - Author's Site" href="http://techie-buzz.com/wordpress-plugins/wordpress-automatic-upgrade-plugin.html">WordPress Automatic upgrade</a>. It does what it says. I chose the semi-automatic method where I clicked &#8220;next&#8221; after every step to make sure all went smoothly. And it did, except for the last step. The plugin failed to re-enable the previously active plugins. A small incovenience compared to all the other things that went right: created backup, disabled plugins, downloaded latest WordPress, replaced all the right files and kept what should be kept.</p>
<p>Unfortunately, the copy of the <a title="Kaytwo K2 Theme for WordPress" href="http://code.google.com/p/kaytwo/">K2 theme</a> that I had was incompatible with WordPress 2.5. Particularly, the panel manager of K2 didn&#8217;t show up in the admin section. After a bit of poking around, I downloaded K2 candidate release 6 which worked like a charm after some minor tweaks. In the process, I learned a bit more about actions, created a new plugin to customize my K2 TAA theme, and made use of K2&#8242;s action hooks to add a custom footer. My next K2 upgrade &#8211; fingers crossed &#8211; will not require changing any of the K2 code.</p>
<p>The code of my K2 TAA Theme plugin is reproduce below. Feel free to use it as a basis for build your own customizations for K2 and other WordPress actions.</p>
<p><code><br />
/**<br />
* Plugin Name: K2 TAA Theme<br />
* Plugin URI: http://tony.abou-assaleh.net<br />
* Description: Support functions for the K2 TAA Theme<br />
* Author: Tony Abou-Assaleh<br />
* Author URI: http://tony.abou-assaleh.net<br />
* Version: 1.0<br />
*/<br />
function k2_taa_footer () {<br />
?&gt;<br />
&lt;p&gt;<br />
Copyright © 1997-2008 Tony Abou-Assaleh, Halifax, Nova Scotia, Canada.&lt;br /&gt;<br />
Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice, and the copyright notice, are preserved.<br />
&lt;/p&gt;<br />
&lt;?php<br />
} // k2_taa_footer</code><code><br />
// Action calls for all functions<br />
add_action('template_footer','k2_taa_footer');</code><br />
?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://tony.abou-assaleh.net/web-development/upgrading-to-wordpress-251-and-k2-rc6/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why WordPress?</title>
		<link>http://tony.abou-assaleh.net/web-development/why-wordpress</link>
		<comments>http://tony.abou-assaleh.net/web-development/why-wordpress#comments</comments>
		<pubDate>Sat, 01 Mar 2008 07:11:48 +0000</pubDate>
		<dc:creator>taa</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://tony.abou-assaleh.net/uncategorized/why-wordpress</guid>
		<description><![CDATA[I was previously using a set of home-brewed PHP scripts to manage my site that I wrote a few years ago. Back then, WordPress was still buggy, hard to use and configure, and the styles weren&#8217;t as flexible. My primitive scripts did the job well initially, when all I wanted was a few static pages. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fwhy-wordpress"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fwhy-wordpress&amp;source=tony_aa&amp;style=normal&amp;service=bit.ly&amp;service_api=R_5c552afd54d160c4b60bc11d0ac48b4b&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://wordpress.org" title="WordPress.org"><img src="http://tony.abou-assaleh.net/wp-content/uploads/2008/04/wordpress_logo.png" alt="WordPress Logo" align="right" /></a> I was previously using a set of home-brewed PHP scripts to manage my site that I wrote a few years ago. Back then, WordPress was still buggy, hard to use and configure, and the styles weren&#8217;t as flexible.</p>
<p>My primitive scripts did the job well initially, when all I wanted was a few static pages. But now that I want to update my site more frequently, I looked for some simple content management system. I really considered only 2 alternatives: Drupal and WordPress. I know my way around Drupal pretty well so it was the first candidate CMS. However I had heard about the wide spread of WordPress, it&#8217;s popularity among bloggers, and the awards it had won. Needless to say, WordPress was my choice in the end. Here is why.</p>
<ul>
<li>Theming K2 to a simplistic and functional look was easier than theming Drupal.</li>
<li>This is a single-user blog, I don&#8217;t need all the complexity of permissions in Drupal.</li>
<li>I had a really bad experience with Drupal&#8217;s WYSIWYG editors, but WordPress&#8217; editor seems to work more reliably.</li>
<li>I wanted simple categories and none of the taxonomy headaches</li>
<li>WordPress didn&#8217;t require configuration to work, only customization. Drupal would&#8217;ve required both.</li>
</ul>
<p>I&#8217;ve been fairly happy with my WordPess setup that I plan to convert some of my primitive Drupal sites into WordPress.</p>
]]></content:encoded>
			<wfw:commentRss>http://tony.abou-assaleh.net/web-development/why-wordpress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Look and Backend</title>
		<link>http://tony.abou-assaleh.net/web-development/new-look-and-backend</link>
		<comments>http://tony.abou-assaleh.net/web-development/new-look-and-backend#comments</comments>
		<pubDate>Fri, 29 Feb 2008 05:30:36 +0000</pubDate>
		<dc:creator>taa</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://tony.abou-assaleh.net/wp/?p=1</guid>
		<description><![CDATA[The site has been redesigned in WordPress and the content is currently transitioning into this new look. Feedback is welcome through the contact page or view comments.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fnew-look-and-backend"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Ftony.abou-assaleh.net%2Fweb-development%2Fnew-look-and-backend&amp;source=tony_aa&amp;style=normal&amp;service=bit.ly&amp;service_api=R_5c552afd54d160c4b60bc11d0ac48b4b&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The site has been redesigned in WordPress and the content is currently transitioning into this new look.</p>
<p>Feedback is welcome through the <a href="/contact">contact</a> page or view comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://tony.abou-assaleh.net/web-development/new-look-and-backend/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

