<?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>Query7 &#187; Python</title>
	<atom:link href="http://query7.com/category/python/feed" rel="self" type="application/rss+xml" />
	<link>http://query7.com</link>
	<description>PHP, Javascript, Python and Web Development</description>
	<lastBuildDate>Sat, 25 Jun 2011 21:29:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Learning Python Qt Programming with PyQt &amp; PySide</title>
		<link>http://query7.com/learning-python-qt-programming-with-pyqt-pyside</link>
		<comments>http://query7.com/learning-python-qt-programming-with-pyqt-pyside#comments</comments>
		<pubDate>Mon, 25 Apr 2011 10:00:32 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1509</guid>
		<description><![CDATA[<h3>Introduction</h3>
<p>Qt is a cross platform application framework that is made up of not only a GUI widget toolkit, but also classes for working with OpenGL, SQL databases, threading, network protocols (HTTP, FTP, UDP, TCP) and much more. Currently Python has two separate bindings for the Qt framework: <a href="http://pyside.org">Pyside</a> and <a href="http://www.riverbankcomputing.co.uk/software/pyqt/intro">PyQt</a>. In this post we look at Pyside and PyQt and the resources that exist for learning them.</p>
<h3>Pyside or PyQt?</h3>
<p>Both Pyside and PyQt have full Python bindings for Qt 4.7 and are available for Mac, Windows and Linux. The main difference between the two is how they are licensed. PyQt is developed by River Bank Computing and is available under the GPL or a commercial license. This means that if your application is open source you can use the free GPL version, but if your application is closed source you need to buy the commercial license (350 GBP). Pyside is licensed under the LGPL so it can be used in both open and closed source applications with no cost. In addition to the standard Desktop bindings, Pyside is also available for the Maemo and MeeGo mobile platforms.</p>
<p>Because Pyside is a relatively young project the majority&#8230;</p>]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>Qt is a cross platform application framework that is made up of not only a GUI widget toolkit, but also classes for working with OpenGL, SQL databases, threading, network protocols (HTTP, FTP, UDP, TCP) and much more. Currently Python has two separate bindings for the Qt framework: <a href="http://pyside.org">Pyside</a> and <a href="http://www.riverbankcomputing.co.uk/software/pyqt/intro">PyQt</a>. In this post we look at Pyside and PyQt and the resources that exist for learning them.</p>
<h3>Pyside or PyQt?</h3>
<p>Both Pyside and PyQt have full Python bindings for Qt 4.7 and are available for Mac, Windows and Linux. The main difference between the two is how they are licensed. PyQt is developed by River Bank Computing and is available under the GPL or a commercial license. This means that if your application is open source you can use the free GPL version, but if your application is closed source you need to buy the commercial license (350 GBP). Pyside is licensed under the LGPL so it can be used in both open and closed source applications with no cost. In addition to the standard Desktop bindings, Pyside is also available for the Maemo and MeeGo mobile platforms.</p>
<p>Because Pyside is a relatively young project the majority of articles and tutorials on the web are titled with PyQt. Don&#8217;t let this put you off if you intend only to use Pyside. For the most part PyQt and Pyside are API compatible and all differences between the two projects are listed on the <a href="http://developer.qt.nokia.com/wiki/Differences_Between_PySide_and_PyQt">official wiki</a>.</p>
<h3>Qt Designer</h3>
<p>Qt Designer is a layout and forms GUI builder. Developers can drag and drop Qt widgets (buttons, lists, tables, menus, inputs etc.) onto a window and then resize and position them how they want their application to look. Once the GUI is designed it can then be exported to an XML dialect and loaded into PyQt or Pyside. The following tutorials are for getting started and using Qt Designer:</p>
<ul>
<li><a href="http://doc.qt.nokia.com/latest/designer-to-know.html">Getting to know Qt Designer</a></li>
<li><a href="http://doc.qt.nokia.com/latest/designer-quick-start.html">Qt Designer quick start</a></li>
<li><a href="http://doc.qt.nokia.com/latest/designer-manual.html">Qt Designer Manual</a></li>
<li><a href="http://diotavelli.net/PyQtWiki/Creating_GUI_Applications_with_PyQt_and_Qt_Designer">Creating GUI applications with PyQt and Qt Designer</a></li>
</ul>
<p><img src="http://query7.com/wp-content/uploads/designer.png" alt="" title="designer" width="540" height="402" class="aligncenter size-full wp-image-1556" /></p>
<h3>Learning Python Qt</h3>
<p><a href="http://www.learningpython.com/2008/09/20/an-introduction-to-pyqt/">An Introduction to PyQt</a> by Mark Mruss of LearningPython is an excellent beginners introduction to PyQt. It assumes no prior knowledge of PyQt or GUI programming and walks you through creating a basic hello world window.</p>
<p><a href="http://www.learningpython.com/2008/09/20/an-introduction-to-pyqt/"><img src="http://query7.com/wp-content/uploads/out.png" alt="" title="out" width="539" height="131" class="aligncenter size-full wp-image-1551" /></a></p>
<p>Jan Bodnar of Zetcode has written a great series of <a href="http://zetcode.com/tutorials/pyqt4/">tutorials</a> introducing PyQt 4. They cover menus, signals, layouts, basic widgets and concludes by writing a tetris game. Zetcode is probably the best single resource for learning PyQt as it covers much of the API. All of the tutorials are well written and have clear code snippets and screenshots to accompany each example.</p>
<p><a href="http://lateral.netmanagers.com.ar/stories/BBS47.html">PyQt By Example</a>, by Roberto Alsina, is a five part tutorial that walks you through creating a to-do list application. It is extremely detailed and covers things like database interaction using Elixer/SQLAlchemy and designing the UI in Qt Designer. This tutorial shows you how to build a full featured GUI application using PyQt and is perfect for those who are new to Qt and have done little to no GUI programming before.</p>
<p><center><a href="http://lateral.netmanagers.com.ar/stories/BBS47.html"><img src="http://query7.com/wp-content/uploads/learnpyqt.png" alt="" title="learnpyqt" width="354" height="501" class="aligncenter size-full wp-image-1541" /></a></center></p>
<h3>Books</h3>
<p>There are currently two books that cover Python Qt4.X and one book that covers Python Qt2.X. <a href="http://www.commandprompt.com/community/pyqt/">GUI Programming with Python: QT</a> by Boudewijn Rempt was written in 2001 and covers the PyQt 2.X and some 3.X bindings. Although this is outdated and not available for print anymore, it is free to read online so you may pick up some tips or tricks. <a href="http://www.qtrac.eu/pyqtbook.html">Rapid GUI Programming with Python and Qt: The Definitive Guide to PyQt Programming</a> by Mark Summerfield was written in October 2007 and covers PyQt 4.2 and 4.3. This is probably the single most useful resource as it covers the majority of the PyQt API as well as GUI programming design patterns. Summerfield has provided updated code examples from the book that are compatible with PyQt 4.7 and Pyside, they are available on the book&#8217;s <a href="http://www.qtrac.eu/pyqtbook.html">website</a>. <a href="http://zetcode.com/ebooks/advancedpyqt4/">Advanced PyQt4</a>, by Jan Bodnar (writer of Zetcode), is a 248 page ebook that focuses on some of the lesser documented and advanced parts of PyQt. This includes graphics, layout management and model/view widgets such as QTableView, QListView and QTreeView. Although I have not read it, the summary, authors reputation and price ($23) suggests this would be a very good book to buy.</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/learning-python-qt-programming-with-pyqt-pyside/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial Django Dojo DataGrid</title>
		<link>http://query7.com/tutorial-django-dojo-datagrid</link>
		<comments>http://query7.com/tutorial-django-dojo-datagrid#comments</comments>
		<pubDate>Mon, 18 Apr 2011 10:03:57 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1476</guid>
		<description><![CDATA[<p>Dojo is an open source Javascript toolkit. It provides an easy way to access and modify the DOM as well as a rich user interface widget library. One of the most powerful widgets in the Dojo toolkit is <a href="http://dojotoolkit.org/reference-guide/dojox/grid/DataGrid.html">DataGrid</a>. It provides an easy way to represent what is essentially a cross between a spreadsheet and a table. In a recent Django project I needed to output the contents of a model into the DataGrid. Thanks to <a href="http://code.google.com/p/django-dojoserializer/">django-dojoserializer</a> this is very easy.</p>
<h3>Setup</h3>
<p>We need the Python package <a href="http://code.google.com/p/django-dojoserializer/">django-dojoserializer</a>. This can be installed by downloading the source and running
<pre>python setup.py install</pre>
</p><p> or with setuptools using
<pre>easy_install django-dojoserializer</pre>
</p><p> or with pip using
<pre>pip install django-dojoserializer</pre>
</p><p> Then add <em>django-dojoserializer</em> to the <em>INSTALLED_APPS</em> tuple in <strong>settings.py</strong>.</p>
<p>Dojo will need to be linked correctly in the Django template. We need to require the <em>dojox.grid.DataGrid</em> and <em>dojo.data.ItemFileReadStore</em> classes.</p>
<pre>&#60;script src="/static/libs/dojo/dojo.js" djConfig="parseOnLoad: true"&#62;%lt;/script&#62;
&#60;script type="text/javascript"&#62;
dojo.require('dojox.grid.DataGrid');
dojo.require('dojo.data.ItemFileReadStore');
&#60;/script&#62;
</pre>
<h3>Django Model</h3>
<pre>PROXY_TYPE_CHOICES = (

	('SOCKS4', 'SOCKS4'),
	('SOCKS5', 'SOCKS5'),
	('HTTP', 'HTTP'),

)

class Proxy(models.Model):
	ip = models.CharField(max_length=50)
	type = models.CharField(max_length=6, choices=PROXY_TYPE_CHOICES)
	alive = models.BooleanField(default=False)
	added = models.DateTimeField(auto_now=False, auto_now_add=True)
	last_checked = models.DateTimeField(auto_now=True, auto_now_add=False)

	def __unicode__(self):
		return self.ip</pre>
<h3>Django View</h3>
<p>The view needs&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Dojo is an open source Javascript toolkit. It provides an easy way to access and modify the DOM as well as a rich user interface widget library. One of the most powerful widgets in the Dojo toolkit is <a href="http://dojotoolkit.org/reference-guide/dojox/grid/DataGrid.html">DataGrid</a>. It provides an easy way to represent what is essentially a cross between a spreadsheet and a table. In a recent Django project I needed to output the contents of a model into the DataGrid. Thanks to <a href="http://code.google.com/p/django-dojoserializer/">django-dojoserializer</a> this is very easy.</p>
<h3>Setup</h3>
<p>We need the Python package <a href="http://code.google.com/p/django-dojoserializer/">django-dojoserializer</a>. This can be installed by downloading the source and running
<pre>python setup.py install</pre>
<p> or with setuptools using
<pre>easy_install django-dojoserializer</pre>
<p> or with pip using
<pre>pip install django-dojoserializer</pre>
<p> Then add <em>django-dojoserializer</em> to the <em>INSTALLED_APPS</em> tuple in <strong>settings.py</strong>.</p>
<p>Dojo will need to be linked correctly in the Django template. We need to require the <em>dojox.grid.DataGrid</em> and <em>dojo.data.ItemFileReadStore</em> classes.</p>
<pre>&lt;script src="/static/libs/dojo/dojo.js" djConfig="parseOnLoad: true"&gt;%lt;/script&gt;
&lt;script type="text/javascript"&gt;
dojo.require('dojox.grid.DataGrid');
dojo.require('dojo.data.ItemFileReadStore');
&lt;/script&gt;
</pre>
<h3>Django Model</h3>
<pre>PROXY_TYPE_CHOICES = (

	('SOCKS4', 'SOCKS4'),
	('SOCKS5', 'SOCKS5'),
	('HTTP', 'HTTP'),

)

class Proxy(models.Model):
	ip = models.CharField(max_length=50)
	type = models.CharField(max_length=6, choices=PROXY_TYPE_CHOICES)
	alive = models.BooleanField(default=False)
	added = models.DateTimeField(auto_now=False, auto_now_add=True)
	last_checked = models.DateTimeField(auto_now=True, auto_now_add=False)

	def __unicode__(self):
		return self.ip</pre>
<h3>Django View</h3>
<p>The view needs to display data from our model as JSON which is correctly formatted for the Dojo DataTable. Simply encoding the Django queryset as a JSON object would not work. Thankfully <me>django-dojoserializer</em> provides the <em>dojoserializer.serialize()</em> method which correctly formats our the queryset in a format the DataTable can read. The route <em>/render/proxies</em> maps to the following view:</p>
<pre>
from django.http import HttpResponse
from proxies.models import Proxy
from dojoserializer import serialize

def render_json(request):

	proxies = Proxy.objects.filter(alive=True)

	json_data = serialize(proxies)

	return HttpResponse(json_data, mimetype="application/json")
</pre>
<p>This gives the following output:</p>
<p><a href="http://query7.com/wp-content/uploads/json.png"><img src="http://query7.com/wp-content/uploads/json.png" alt="" title="json" width="540" height="274" class="aligncenter size-full wp-image-1482" /></a></p>
<h3>Defining the DataTable</h3>
<p>We define the Dojo DataTable in two parts. The first is a Javascript representation of the structure of the DataTable, the second part is a <em>&lt;div&gt;</em> for where the DataTable will sit in markup. Note that each <em>field</em> attribute is the exact name of the corresponding field from the Django model. If the names do match the data will not display in the table.</p>
<pre>var layoutProxies = [
            [{
                field: "ip",
                name: "IP",
                width: 'auto'
            },
            {
                field: "type",
                name: "Type",
                width: 'auto'
            },
            {
                field: "last_checked",
                name: "Last Checked",
                width: 10
            },
            {
                field: "alive",
                name: "Alive",
                width: 'auto'
            }

            ]];</pre>
<p>Note the structure attribute of the <em>div</em> is set to the value of our structure. We will define <em>proxyStore</em>, the value of the <em>store</em> attribute below.</p>
<pre>
&lt;div id="proxyGrid" dojoType="dojox.grid.DataGrid" store="proxyStore" structure="layoutProxies" query="{}" rowsPerPage="40"&gt;&lt;/div&gt;</pre>
<h3>Connecting the DataTable to The Proxy Data</h3>
<p>Finally we need to specify the <em>proxyStore</em> variable for the table to pull its data from. <em>proxyStore</em> is an instance of <em>dojo.data.ItemFileReadStore()</em>. We pass the URL of our JSON file and set <em>urlPreventCache</em> to true.</p>
<pre>proxyStore = new dojo.data.ItemFileReadStore({url: '/render/proxies', urlPreventCache: true});</pre>
<p>Which gives the final product:</p>
<p><img src="http://query7.com/wp-content/uploads/ss.png" alt="" title="ss" width="540" height="300" class="aligncenter size-full wp-image-1480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/tutorial-django-dojo-datagrid/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Celery with Django</title>
		<link>http://query7.com/tutorial-celery-with-django</link>
		<comments>http://query7.com/tutorial-celery-with-django#comments</comments>
		<pubDate>Mon, 04 Apr 2011 07:38:53 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://query7.com/?p=1400</guid>
		<description><![CDATA[<h3>Introduction</h3>
<p>In a recent Django project I needed to issue some HTTP requests to a website, save the results and then display the information to the user. I could have issued those HTTP requests in a Django view, however the requests could take up to 10 seconds to return, and I didn&#8217;t want the page hanging that long for the user. I ended up using Celery, an asynchronous task queue written in Python, to execute the requests. </p>
<h3>Installation</h3>
<p><strong>Celery</strong><br />
Celery is in <a href="http://pypi.python.org/pypi/celery#downloads">pypi</a> so installation is simple.</p>
<pre>easy_install celery</pre>
<pre>pip install celery</pre>
<p>Or download the source code, extract it and </p>
<pre>python setup.py install</pre>
<p><strong>Django + Celery</strong><br />
In a high traffic production environment Celery should be paired with the RabbitMQ backend. However for my low traffic application I went with the <em>django-kombu</em> backend. <em>django-kombu</em> uses the Django database as a message store and requires very little configuration compared to other backends. We also need the <em>djcelery</em> package.</p>
<pre>easy_install django-kombu</pre>
<pre>easy_install django-celery</pre>
<h3>Configuration</h3>
<p>Before we can start using Celery we need configure our Django project. In <strong>settings.py</strong> make sure you add <em>djkombu</em> and <em>djcelery</em> to the <em>INSTALLED_APPS</em> tuple. Also make sure your database is configured and working.</p>
<p>Also add&#8230;</p>]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>In a recent Django project I needed to issue some HTTP requests to a website, save the results and then display the information to the user. I could have issued those HTTP requests in a Django view, however the requests could take up to 10 seconds to return, and I didn&#8217;t want the page hanging that long for the user. I ended up using Celery, an asynchronous task queue written in Python, to execute the requests. </p>
<h3>Installation</h3>
<p><strong>Celery</strong><br />
Celery is in <a href="http://pypi.python.org/pypi/celery#downloads">pypi</a> so installation is simple.</p>
<pre>easy_install celery</pre>
<pre>pip install celery</pre>
<p>Or download the source code, extract it and </p>
<pre>python setup.py install</pre>
<p><strong>Django + Celery</strong><br />
In a high traffic production environment Celery should be paired with the RabbitMQ backend. However for my low traffic application I went with the <em>django-kombu</em> backend. <em>django-kombu</em> uses the Django database as a message store and requires very little configuration compared to other backends. We also need the <em>djcelery</em> package.</p>
<pre>easy_install django-kombu</pre>
<pre>easy_install django-celery</pre>
<h3>Configuration</h3>
<p>Before we can start using Celery we need configure our Django project. In <strong>settings.py</strong> make sure you add <em>djkombu</em> and <em>djcelery</em> to the <em>INSTALLED_APPS</em> tuple. Also make sure your database is configured and working.</p>
<p>Also add the following lines to <strong>settings.py</strong>.</p>
<pre>import djcelery
djcelery.setup_loader()</pre>
<pre>BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
#celery
BROKER_HOST = "localhost"
BROKER_PORT = 5672
BROKER_USER = "guest"
BROKER_PASSWORD = "guest"
BROKER_VHOST = "/"</pre>
<h3>Defining Tasks</h3>
<p>All Celery tasks should be defined in <em>PROJECT/APPNAME/tasks.py</em>. You can define your tasks as methods with a Celery decorator, or as classes which inherit from a base Celery <em>Task</em> class. I prefer the class definitions. Each task must define a <em>run</em> method (which is called when the task is executed). Finally, each task must be registered with Celery so that they can be found. Below is a modified version of one of my Tasks. </p>
<pre>import pycurl
from celery.task import Task
from celery.registry import tasks
from website.models import Website

class CheckWebsiteTask(Task):

	def run(self, ip, **kwargs):

		p, created = Website.objects.get_or_create(ip=ip)

		try:
			c = pycurl.Curl()
			c.setopt(pycurl.URL, ip)
			c.setopt(pycurl.TIMEOUT, 10)

			c.perform()

			p.alive = True

		except Exception, e:
			print e
			p.alive = False

		p.save()

tasks.register(CheckWebsiteTask)</pre>
<h3>Calling Tasks</h3>
<p>Typically you will want to call your tasks somewhere in your view code. Just import your task and call it&#8217;s <em>delay</em> method, passing in the arguments that you specified in the <em>run</em> method of your task. The task will then be added to the queue within 5 or 10 seconds and the queue will then start to clear itself.</p>
<pre>from django.http import HttpResponseRedirect

from website.tasks import CheckWebsiteTask
from website.models import Website

def check(request,id):

	website = Website.objects.get(id=id)

	CheckWebsiteTask.delay(website.ip)

	return HttpResponseRedirect('/')</pre>
<h3>Starting Celery</h3>
<pre>python manage.py celeryd -l info --settings=settings</pre>
<p><img src="http://query7.com/wp-content/uploads/hi.gif" alt="" title="hi" width="540" height="277" class="aligncenter size-full wp-image-1413" /></p>
<h3>Celery In The Real World</h3>
<p>If you want to learn more about Celery then I recommend you read up on the various articles and tutorials on the <a href="http://www.celeryproject.org">Celery website</a>. There is a <a href="https://github.com/ask/celery/wiki">list</a> of Django apps that use Celery in one way or another, you may be able to use some of these in your own applications. Finally you can browse the source code of <a href="https://github.com/ask/celery">celery</a.> and <a href="https://github.com/ask/django-celery">django-celery</a> on github to learn how they work under the hood.</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/tutorial-celery-with-django/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Source Web Projects in Python</title>
		<link>http://query7.com/open-source-python-web-projects</link>
		<comments>http://query7.com/open-source-python-web-projects#comments</comments>
		<pubDate>Tue, 11 Jan 2011 06:51:03 +0000</pubDate>
		<dc:creator>Adit Gupta</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.webdevelopmentbits.com/?p=717</guid>
		<description><![CDATA[<div>The Python user base has grown exponentially over the years, thanks to the sheer brilliance of the language and regular updates from the brilliant python community.<br />
You can find Python everywhere &#8211; Rapid Application Development, Game Development, System Administration, Visualization, Web Development, Scientific Programming, Embedded Systems and what not!<br />
In this article, we’re going to take a look at some of the open source python projects for the web.
<p>1. <a href="http://code.google.com/p/html5lib/">HTML5Lib</a><br />
HTML5Lib is a Python implementation of a HTML parser based on the <a href="http://www.whatwg.org/specs/web-apps/current-work/">WHATWG HTML5 specification</a>. It includes HTML and CSS sanitizer, DOM to SAX convertor, character encoding detection and filtering and serializing of tress.</p>
<p>2. <a href="https://github.com/divio/django-cms">Django-CMS</a><br />
This is perhaps the best CMS based on Django. The installation is little tricky and you need to be familiar with Python and Django to successfully install Django-CMS. Once done, it’s easy to use and configure. Some of the major features include Flexible Plugin Architecture, SEO Optimization, Editorial Workflow, Versioning and support for custom extensions.<br />
Get more information about Django-CMS at &#8211; <a href="http://www.django-cms.org/">http://www.django-cms.org</a></p>
<p>3. <a href="https://github.com/facebook/tornado">Tornado</a><br />
From their website &#8211; “Tornado is an open source version of the scalable, non-blocking web server and tools that power</p></div><p>&#8230;</p>]]></description>
			<content:encoded><![CDATA[<div>The Python user base has grown exponentially over the years, thanks to the sheer brilliance of the language and regular updates from the brilliant python community.<br />
You can find Python everywhere &#8211; Rapid Application Development, Game Development, System Administration, Visualization, Web Development, Scientific Programming, Embedded Systems and what not!<br />
In this article, we’re going to take a look at some of the open source python projects for the web.</p>
<p>1. <a href="http://code.google.com/p/html5lib/">HTML5Lib</a><br />
HTML5Lib is a Python implementation of a HTML parser based on the <a href="http://www.whatwg.org/specs/web-apps/current-work/">WHATWG HTML5 specification</a>. It includes HTML and CSS sanitizer, DOM to SAX convertor, character encoding detection and filtering and serializing of tress.</p>
<p>2. <a href="https://github.com/divio/django-cms">Django-CMS</a><br />
This is perhaps the best CMS based on Django. The installation is little tricky and you need to be familiar with Python and Django to successfully install Django-CMS. Once done, it’s easy to use and configure. Some of the major features include Flexible Plugin Architecture, SEO Optimization, Editorial Workflow, Versioning and support for custom extensions.<br />
Get more information about Django-CMS at &#8211; <a href="http://www.django-cms.org/">http://www.django-cms.org</a></p>
<p>3. <a href="https://github.com/facebook/tornado">Tornado</a><br />
From their website &#8211; “Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed. The framework is distinct from most mainstream web server frameworks because it is non-blocking and reasonably fast.  Because it is non-blocking and uses <a href="http://www.kernel.org/doc/man-pages/online/pages/man4/epoll.4.html">epoll</a>, it can handle 1000s of simultaneous standing connections, which means the framework is ideal for real-time web services.”<br />
P.S &#8211; I am currently playing with Tornado and would soon post a detailed article about it. Stay tuned!</p>
<p>4. <a href="http://code.google.com/p/multi-mechanize/">Multi-Mechanize</a><br />
This one is my favorite! Multi-Mechanize is an open source framework for web performance and load testing. It allows you to run simultaneous python scripts to generate load (synthetic transactions) against a web site or web service.You programmatically create test scripts to simulate virtual user activity. Your scripts will then generate HTTP requests to intelligently navigate a web site or send requests to a web service. The reports and graphs are really impressive and can help you a lot in monitoring the performance of your website. You should really take a shot at this project! Highly recommended!</p>
<p>Some other interesting projects include:<br />
1. <a href="https://github.com/facebook/python-sdk">Facebook Python SDK</a><br />
2. <a href="https://github.com/simplegeo/python-oauth2">Python-OAuth</a><br />
3. <a href="https://github.com/omab/django-social-auth">Django Social Auth</a><br />
4. <a href="http://code.google.com/p/boto/">Boto</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/open-source-python-web-projects/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: Django Template Tags</title>
		<link>http://query7.com/tutorial-django-template-tags</link>
		<comments>http://query7.com/tutorial-django-template-tags#comments</comments>
		<pubDate>Mon, 10 Jan 2011 09:16:09 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://query7.com/?p=929</guid>
		<description><![CDATA[<h3>Introduction</h3>
<p>In the Python Web Framework Django, template tags can be used to modify data that is about to be output in a Django template file. In this tutorial we will learn how to create and use our own template tags in a Django application.</p>
<h3>Setting Up</h3>
<p>Template tag definitions are stored in Django apps. The template tags in each app should be relevant to the models and views in that app. You shouldn&#8217;t have one app that stores every single template tag you use throughout your website. Each app can contain a directory called <em>templatetags</em> and assuming the app is added to <em>settings.INSTALLED_APPS</em>, Django will automatically search that <em>appname/templatetags/</em> directory for template tag definitions. Remember to put an <em>__init__.py</em> file in each <em>templatetags</em> directory because the template tags inside them are imported.</p>
<h3>Example</h3>
<p>In an application I worked on recently I needed to display some data about a World Of Warcraft character such as their race, class and gender. The information about the character was stored in a database table and was referenced like so:<br />
<img src="http://query7.com/wp-content/uploads/data.png" alt="" title="data" width="399" height="392" class="aligncenter size-full wp-image-930" /><br />
This means that if the character was a Male Orc Shaman, then the&#8230;</p>]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>In the Python Web Framework Django, template tags can be used to modify data that is about to be output in a Django template file. In this tutorial we will learn how to create and use our own template tags in a Django application.</p>
<h3>Setting Up</h3>
<p>Template tag definitions are stored in Django apps. The template tags in each app should be relevant to the models and views in that app. You shouldn&#8217;t have one app that stores every single template tag you use throughout your website. Each app can contain a directory called <em>templatetags</em> and assuming the app is added to <em>settings.INSTALLED_APPS</em>, Django will automatically search that <em>appname/templatetags/</em> directory for template tag definitions. Remember to put an <em>__init__.py</em> file in each <em>templatetags</em> directory because the template tags inside them are imported.</p>
<h3>Example</h3>
<p>In an application I worked on recently I needed to display some data about a World Of Warcraft character such as their race, class and gender. The information about the character was stored in a database table and was referenced like so:<br />
<img src="http://query7.com/wp-content/uploads/data.png" alt="" title="data" width="399" height="392" class="aligncenter size-full wp-image-930" /><br />
This means that if the character was a Male Orc Shaman, then the gender column would read 0, the race column would read 2 and the class column would read 64. If I were to output this information on the screen, the numbers wouldn&#8217;t mean anything to anybody. In order to turn those numbers into something meaningful (an actual word for the gender/race/class) I would either need to manipulate the data in the appropriate Django view, or in the template. Writing a template tag to do this is quick, easy and gives a tidy result so I decided to do this.</p>
<h3>Usage Example</h3>
<p>If we had a Django template with information about the Male Orc Shaman stored in the <em>character</em> object.</p>
<pre>{{ character.class }}</pre>
<p>Would output 64. However using the template tag (that we are about to write)..</p>
<pre> {% load char_utils %}
{{ character.class|class_name }}</pre>
<p>would output Shaman. Notice the <em>{% load char_utils %}</em>. <em>char_utils</em> refers to the name of the python file we define the template tags in (<em>appname/templatetags/char_utils.py</em>).</p>
<h3>Writing the Template Tag</h3>
<p>We will define the template tags in the file <em>*appname*/templatetags/char_utils.py</em>. At the top of this file we need to import the <em>django.template</em> module and set up Django&#8217;s template tag registry.</p>
<pre>from django import template

register = template.Library()</pre>
<p>Template tag definitions are just standard Python functions. The argument the function accepts is what the template tag is applied to (in the above example <em>class_name</em> was applied to <em>character.class</em>). Our template tags will accept one parameter, the numerical id (eg 64 for Shaman) and will turn that number into the appropriate name.</p>
<pre>def race_name(id):
    races = {

    1 : 'human',
    2 : 'orc',
    4 : 'dwarf',
    5 : 'undead',
    6 : 'tauren',
    8 : 'nightelf',
    16 : 'undead',
    32 : 'tauren',
    64 : 'gnome',
    128 : 'troll',
    512 : 'bloodelf',
    1024 : 'draenai',

    }

    return races.get(id)

def class_name(id):

    classes = {

    1 : 'warrior',
    2 : 'paladin',
    4 : 'hunter',
    6 : 'deathknight',
    8 : 'rogue',
    16 : 'priest',
    32 : 'deathknight',
    64 : 'shaman',
    128 : 'mage',
    256 : 'warlock',
    1024 : 'druid',
    }

    return classes.get(id)

def gender_name(id):

    genders = {
    0 : 'male',
    1 : 'female',
    }

    return genders.get(id)</pre>
<p>Finally we need to register the template tags with Django so that it knows that we want to use them.</p>
<pre>register.filter('race_name', race_name)
register.filter('class_name', class_name)
register.filter('gender_name', gender_name)</pre>
<p>The template tags will now work. If you have any questions or feedback please leave them in the comments below.</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/tutorial-django-template-tags/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interacting with Skype from Python using Skype4Py</title>
		<link>http://query7.com/interacting-with-skype-from-python-using-skype4py</link>
		<comments>http://query7.com/interacting-with-skype-from-python-using-skype4py#comments</comments>
		<pubDate>Mon, 03 Jan 2011 09:10:23 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://query7.com/?p=875</guid>
		<description><![CDATA[<p><a href="http://pypi.python.org/pypi/Skype4Py/0.9.28.7">Skype4Py</a> is a Python module that allows developers to programatically interact with the Skype client running on their computer. In this tutorial we will look at and use the <em>Skype4Py</em> module to create simple but useful scripts.</p>
<h3>Installation</h3>
<p><em>Skype4Py</em> is a normal Python module and is listed in the Python package index (Pypi). To install it with <a href="http://pypi.python.org/pypi/setuptools">setuptools</a> enter the following in a command prompt.</p>
<pre>easy_install Skype4Py</pre>
<p>To install it with <a href="http://pypi.python.org/pypi/pip">pip</a> enter the following in a command prompt.</p>
<pre>pip install Skype4Py</pre>
<h3>Getting Started</h3>
<p><em>Skype4Py</em> interacts with the Skype client running on your desktop, it doesn&#8217;t talk directly to the Skype servers. For any of the scripts we cover in this tutorial to work the Skype application must be running and you need to be logged in. You can either start Skype yourself or use the following snippet to start it using <em>Skype4Py</em>.</p>
<pre>s = Skype4Py.Skype()

if not s.Client.IsRunning:
	s.Client.Start()</pre>
<p>Before we can interact with the Skype client from Skype2Py, we need to connect Skype4Py to the instance of Skype running on your desktop. This is done using the <em>Attach</em> method.</p>
<pre>import Skype4Py

s = Skype4Py.Skype()
s.Attach()</pre>
<p>After executing this you need to check the Skype client on&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://pypi.python.org/pypi/Skype4Py/0.9.28.7">Skype4Py</a> is a Python module that allows developers to programatically interact with the Skype client running on their computer. In this tutorial we will look at and use the <em>Skype4Py</em> module to create simple but useful scripts.</p>
<h3>Installation</h3>
<p><em>Skype4Py</em> is a normal Python module and is listed in the Python package index (Pypi). To install it with <a href="http://pypi.python.org/pypi/setuptools">setuptools</a> enter the following in a command prompt.</p>
<pre>easy_install Skype4Py</pre>
<p>To install it with <a href="http://pypi.python.org/pypi/pip">pip</a> enter the following in a command prompt.</p>
<pre>pip install Skype4Py</pre>
<h3>Getting Started</h3>
<p><em>Skype4Py</em> interacts with the Skype client running on your desktop, it doesn&#8217;t talk directly to the Skype servers. For any of the scripts we cover in this tutorial to work the Skype application must be running and you need to be logged in. You can either start Skype yourself or use the following snippet to start it using <em>Skype4Py</em>.</p>
<pre>s = Skype4Py.Skype()

if not s.Client.IsRunning:
	s.Client.Start()</pre>
<p>Before we can interact with the Skype client from Skype2Py, we need to connect Skype4Py to the instance of Skype running on your desktop. This is done using the <em>Attach</em> method.</p>
<pre>import Skype4Py

s = Skype4Py.Skype()
s.Attach()</pre>
<p>After executing this you need to check the Skype client on your desktop. A notification similar to the one below will appear. This ensures that no virus or 3rd party program can use your Skype account without your knowledge. Click &#8216;Allow access&#8217;.<br />
<a href="http://query7.com/wp-content/uploads/skypeaccess.png"><img src="http://query7.com/wp-content/uploads/skypeaccess.png" alt="" title="skypeaccess" width="540" height="79" class="aligncenter size-full wp-image-876" /></a></p>
<h3>User Information</h3>
<p><em>Skype4Py</em> provides a <a href="http://skype4py.sourceforge.net/doc/html/Skype4Py.user.User-class.html">User class</a> which represents a user&#8217;s Skype account. We can access information such as the user&#8217;s full name, their Skype status and when they were last logged into Skype. To get the person who is currently logged into the Skype client&#8217;s information we need to use the <em>CurrentUser</em> class.</p>
<pre>import Skype4Py
s = Skype4Py.Skype()
s.Attach()

print 'Full Name: %s' % s.CurrentUser.FullName
print 'Skype Status: %s' % s.CurrentUser.OnlineStatus
print 'Country: %s' % s.CurrentUser.Country</pre>
<p>To access information about the current Skype user&#8217;s friends, we need to use the <em>Friends</em> class. The snippet below iterates over all of the current Skype user&#8217;s friends and prints some information about them.</p>
<pre>import Skype4Py
s = Skype4Py.Skype()
s.Attach()

for f in s.Friends:
	print 'Full Name: %s' % f.FullName
	print 'Skype Status: %s' % f.OnlineStatus
	print 'Country: %s' % f.Country</pre>
<h3>Sending SMS Messages</h3>
<p><em>Skype4Py</em> can also be used to send SMS messages. Only Skype users who have credit in their Skype account can send SMS. Be sure to check local SMS rates on the <a href="http://www.skype.com/intl/en/prices/sms-rates/">Skype website</a> before using and <strong>never</strong> put this code in a loop without double checking it first. Make sure you include your country&#8217;s international prefix at the beginning of the number <em>variable</em>. After using this code my phone received the SMS 20 seconds later (NZ carrier).</p>
<pre>import Skype4Py
s = Skype4Py.Skype()
s.Attach()

message = 'Hello SMS from Query7'
number = '+641234567890' 

m = s.CreateSms(Skype4Py.smsMessageTypeOutgoing, number)
m.Body = message

m.Send()</pre>
<h3>What Else Can Skype4Py Do?</h3>
<ul>
<li><a href="http://skype4py.sourceforge.net/doc/html/Skype4Py.voicemail.Voicemail-class.html">Download and play voice mail messages</a></li>
<li><a href="http://skype4py.sourceforge.net/doc/html/Skype4Py.filetransfer.FileTransfer-class.html">Transfer files between Skype clients</a></li>
<li><a href="http://skype4py.sourceforge.net/doc/html/">Interact with Skype chat messages</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/interacting-with-skype-from-python-using-skype4py/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with Python</title>
		<link>http://query7.com/getting-started-with-python</link>
		<comments>http://query7.com/getting-started-with-python#comments</comments>
		<pubDate>Mon, 13 Dec 2010 11:24:12 +0000</pubDate>
		<dc:creator>Adit Gupta</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.webdevelopmentbits.com/?p=713</guid>
		<description><![CDATA[<div>I&#8217;ve been writing programs in Python for the past 3 years and I must accept that I am a big fan of its no-nonsense approach towards programming and it&#8217;s clean and easy to understand syntax. It was recently chosen as the <a href="http://www.activestate.com/blog/2010/11/linux-developers-choose-python-best-programming-language-and-scripting-language">best programming and scripting language by Linux Developers</a> and is also considered as the <a href="http://cdsweb.cern.ch/record/974627">Holy Grail of programming</a> by CERN. It is perhaps the <a href="http://www.reddit.com/r/programming/comments/7ax0j/is_python_the_best_first_language_to_learn_see/">best language for beginners</a> as it lets you focus on programming without worrying much about syntax.
<p>Today, Python is being extensively used at Google, Yahoo, CERN, NASA and ITA. It has been successfully embedded in a number of software products as a scripting language including Maya,MotionBuilder, SoftImage, Cinema4D, Blender, GIMP and Paint Shop Pro. Python has also been actively used for writing web applications. Some of the most sophisticated Python web frameworks include Django, Pylons, TurboGears and Web2Py.</p>
<p>In this article, I&#8217;ll provide you some resources, which will help you get started with Python:</p>
<p><a href="http://code.google.com/appengine/docs/python/gettingstarted/">Google Code: Getting Started &#8211; Python</a><br />
<a href="http://freevideolectures.com/Course/2512/Python-Programming">Python Programming Tutorials</a><br />
<a href="http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2008/">A Gentle Introduction to Programming Using Python</a><br />
<a href="http://diveintopython.org/">Dive Into Python</a><br />
<a href="http://www.openbookproject.net/thinkcs/python/english2e/">How to think like a computer scientist &#8211; Learning with Python</a></p>
<p>I hope these resources</p></div><p>&#8230;</p>]]></description>
			<content:encoded><![CDATA[<div>I&#8217;ve been writing programs in Python for the past 3 years and I must accept that I am a big fan of its no-nonsense approach towards programming and it&#8217;s clean and easy to understand syntax. It was recently chosen as the <a href="http://www.activestate.com/blog/2010/11/linux-developers-choose-python-best-programming-language-and-scripting-language">best programming and scripting language by Linux Developers</a> and is also considered as the <a href="http://cdsweb.cern.ch/record/974627">Holy Grail of programming</a> by CERN. It is perhaps the <a href="http://www.reddit.com/r/programming/comments/7ax0j/is_python_the_best_first_language_to_learn_see/">best language for beginners</a> as it lets you focus on programming without worrying much about syntax.</p>
<p>Today, Python is being extensively used at Google, Yahoo, CERN, NASA and ITA. It has been successfully embedded in a number of software products as a scripting language including Maya,MotionBuilder, SoftImage, Cinema4D, Blender, GIMP and Paint Shop Pro. Python has also been actively used for writing web applications. Some of the most sophisticated Python web frameworks include Django, Pylons, TurboGears and Web2Py.</p>
<p>In this article, I&#8217;ll provide you some resources, which will help you get started with Python:</p>
<p><a href="http://code.google.com/appengine/docs/python/gettingstarted/">Google Code: Getting Started &#8211; Python</a><br />
<a href="http://freevideolectures.com/Course/2512/Python-Programming">Python Programming Tutorials</a><br />
<a href="http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2008/">A Gentle Introduction to Programming Using Python</a><br />
<a href="http://diveintopython.org/">Dive Into Python</a><br />
<a href="http://www.openbookproject.net/thinkcs/python/english2e/">How to think like a computer scientist &#8211; Learning with Python</a></p>
<p>I hope these resources will give you a hang of Python.We would be soon starting a series on web application and blog development using the Django framework. I hope you would be pretty much familiar with Python by that time! See you soon with more Python awesomeness!
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/getting-started-with-python/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django Authentication Backends</title>
		<link>http://query7.com/django-authentication-backends</link>
		<comments>http://query7.com/django-authentication-backends#comments</comments>
		<pubDate>Wed, 18 Aug 2010 08:02:47 +0000</pubDate>
		<dc:creator>logan</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[django]]></category>

		<guid isPermaLink="false">http://query7.com/?p=673</guid>
		<description><![CDATA[<p>If you are building a Django frontend for a legacy application chances are you will need to integrate your existing user database table(s) with the the Django authentication system (django.contrib.auth). In this tutorial we will look at writing our own authentication backend and plugging it into django.contrib.auth.</p>
<h3>Getting Started</h3>
<p>Authentication backends are pure python classes. Given a username and password, they are expected to validate them against an authentication source (such as a database) and return a User object. There is no requirement as to where the class is placed, however I always put it in the same directory as the application that handles registrations and logging in.<br />
When a user logs in, Django will check the AUTHENTICATION_BACKENDS (tuple) setting and iterate through all backends until one returns true. The default authentication backend is django.contrib.auth.backends.ModelBackend.</p>
<h3>Writing Our Backend</h3>
<p>Our backend must have two methods: authenticate and get_user</p>
<p>authenticate takes two arguments &#8211; username and password. It is expected to return a User instance or None. The authenticate method should check the given username and password against the user table of the legacy application. If the credentials match, then create a new User instance, save it, and return it. If&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>If you are building a Django frontend for a legacy application chances are you will need to integrate your existing user database table(s) with the the Django authentication system (django.contrib.auth). In this tutorial we will look at writing our own authentication backend and plugging it into django.contrib.auth.</p>
<h3>Getting Started</h3>
<p>Authentication backends are pure python classes. Given a username and password, they are expected to validate them against an authentication source (such as a database) and return a User object. There is no requirement as to where the class is placed, however I always put it in the same directory as the application that handles registrations and logging in.<br />
When a user logs in, Django will check the AUTHENTICATION_BACKENDS (tuple) setting and iterate through all backends until one returns true. The default authentication backend is django.contrib.auth.backends.ModelBackend.</p>
<h3>Writing Our Backend</h3>
<p>Our backend must have two methods: authenticate and get_user</p>
<p>authenticate takes two arguments &#8211; username and password. It is expected to return a User instance or None. The authenticate method should check the given username and password against the user table of the legacy application. If the credentials match, then create a new User instance, save it, and return it. If they don’t match then return None.</p>
<p>get_user takes one argument &#8211; user_id. It is expected to return a User object.</p>
<h3>Example</h3>
<p>Below is an auth backend I have written for a legacy application. The application had a different password encryption algorithm and no permissions structure.</p>
<p>authenticate first tests the username and password in the legacy database. If it is valid then it will check if a User instance exists in the Django authentication system. If there is no record of the user in the Django User table, then we create a new user.</p>
<pre>from account.models import Account
from account.utils import trinity_password
from django.contrib.auth.models import User

class AuthBackend(object):

   def authenticate(self, username, password):

       try:
           account = Account.objects.using('realmd').get(username=username, sha_pass_hash=trinity_password(username, password))

           try:
               user = User.objects.get(username=username)

           except User.DoesNotExist:

               user = User(username=account.username)
               user.is_staff = False
               user.is_superuser = False
               user.set_unusable_password()
               user.save()

           return user

       except Account.DoesNotExist:

           return None

   def get_user(self, id):
       try:
           return User.objects.get(id=id)
       except User.DoesNotExist:
           return None</pre>
<p>To use our authentication backend we just need to add it to the AUTHENTICATION_BACKENDS tuple like so:</p>
<pre>AUTHENTICATION_BACKENDS = (

'pythonicPath.to.AuthBackend',
‘django.contrib.auth.backends.ModelBackend’,

)</pre>
<h3>Conclusion</h3>
<p>The Django authentication system is very flexible and allows you to easily write your own backend. If you have any questions about writing your own Django auth backend, or need any help doing so, feel free to comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/django-authentication-backends/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Philosophy of Object Oriented Programming and Software Design</title>
		<link>http://query7.com/philosophy-of-object-oriented-programming-and-software-design</link>
		<comments>http://query7.com/philosophy-of-object-oriented-programming-and-software-design#comments</comments>
		<pubDate>Sat, 01 Nov 2008 14:33:25 +0000</pubDate>
		<dc:creator>yaapa</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Zend]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Object-Oriented Programming]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.webdevelopmentbits.com/?p=241</guid>
		<description><![CDATA[Now, I am no expert in OOP or software design, but here's a philosophy which might help you make the most of what you know about OOP and software design.]]></description>
			<content:encoded><![CDATA[<p>Now, I am no expert in OOP or software design, but here&#8217;s a philosophy which might help you make the most of what you know about OOP and software design. I have observed and have read reports that people absorb most information when it&#8217;s presented in lists, preferably bulleted. So without any further ramling, I present you my bulleted philosophy of OOP and Software Design.</p>
<ul>
<li>It&#8217;s not how much and what you know; but what you can do with what you know, which&#8217;s important.</li>
</ul>
<ul>
<li>Ability to implement Polymorphism, Inheritance, private, public namespaces, static methods etc is no guarantee you are a good OO developer.</li>
</ul>
<ul>
<li>OOP is useless if you don&#8217;t use it to create good software design (architecture).</li>
</ul>
<ul>
<li>Using packages, classes, etc does not guarantee good software design.</li>
</ul>
<ul>
<li>When designing your software, think of it as an electronic device you are designing.</li>
</ul>
<ul>
<li>Sketch out the &#8216;electronic device&#8217;. Label the different components, list their functionalities.</li>
</ul>
<ul>
<li>Stay hungry, stay foolish.</li>
</ul>
<p>That&#8217;s it for today. I hope you are blessed with more knowledge, and the ability to make the best use of them.  Adios!</p>
]]></content:encoded>
			<wfw:commentRss>http://query7.com/philosophy-of-object-oriented-programming-and-software-design/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

