Tools for developing Dynamic Web Sites

Posted on April 2, 2008. Filed under: compigiri, Computer, internet, technology, Web | Tags: , , , , , , |

I started developing web sites about an year ago. When I started out I did not know of any of the frameworks which make the job of developing a dynamic web site easy. I spent a lot of time finding tools which suited my need.

In this post I have listed the tools I use. It may help newbies by giving a reference point to start out their exploration.

LAMP Based

The base infrastructure is LAMP with a little deviation. I use LinuxApacheMySQLPython (instead of PHP).

For the uninitiated this means I run the Apache web server, with MySQL as my Database engine, on the Linux operating system. Python is used for generating dynamic web pages on the fly.

Framework for Dynamic pages

Django is used for generating dynamic web pages. Django lets you build high-performing, elegant Web applications quickly. Django focuses on automating as much as possible and adhering to the DRY principle. Django is very well documented and the online Django Book makes it very easy for anyone to start using Django quickly.


I layout my pages using Blueprint. This is a CSS framework which allows you to have a great layout with very clean and simple code. List formatting is done with Listamatic. It provides a easy way to create great looking lists.

And of course there is AJAX. I use the excellent Prototype and Scriptaculous libraries to add Ajax to my site. These libraries make it easy to have cross browser compatible JavaScripts.


Using tools greatly reduces the work required to be done to develop a website. Choosing a framework/tool which suits you is the biggest task. Think carefully about what you want to achieve and what the tool provides. Use the one which matches your style and requirements.

Read Full Post | Make a Comment ( 4 so far )

Django book

Posted on January 10, 2008. Filed under: compigiri, Computer, internet, Web | Tags: , , , |

The long awaited Django book has been released. The book is now available in stores and online at

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Django was designed to make common Web-development tasks fast and easy. More info about Django can be found here

Some reasons why you would want to choose Django as your Web framework:

Constructive reasons to use Django instead of Rails

ten reasons why you should use Django

I have been using Django for over six months now and can say that it is really easy to use and can get things done very fast.

Read Full Post | Make a Comment ( None so far )

The Zen of Python

Posted on January 2, 2008. Filed under: compigiri, Computer, Personal | Tags: |

I liked this a lot. Programming philosophy that I believe in.

Taken from Author: Tim Peters <tim at>

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren’t special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one– and preferably only one –obvious way to do it.
Although that way may not be obvious at first unless you’re Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it’s a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea — let’s do more of those!

Read Full Post | Make a Comment ( None so far )

Script to ping Technocrati

Posted on October 31, 2006. Filed under: compigiri, Computer, internet, Ping, Python, script, Technorati |

Getting your blog listed on technocrati may be a good way to increase traffic to ur site. I have written a Python script to ping technocrati with your blog details. Here is a link to the script. The script could be quite useful to automatically ping Technocrati for all your blogs using a cron job.

Python rocks 🙂

Read Full Post | Make a Comment ( 3 so far )

Comparison of REST Vs XML-RPC

Posted on October 30, 2006. Filed under: comparison, compigiri, Computer, internet, REST, Web, XML, XML-RPC |

Some background of the protocols

Rest protocol uses the HTTP GET and HTTP PUT methods to communicate with an application server. For example an API for a typical application would look like{user} (one for each user){location} (one for each location)

The client typically a webbrowser needs to construct HTTP requests and parse XML or HTML responses.

XML-RPC uses XML protocol to make Remote procedure calls to execute functions defined on objects, over the network.

An RPC application might define operations such as the following:


The client needs to construct an XML request and parse the XML response.


REST is an HTTP based protocol. Whereas XML-RPC is XML based.
IMO, REST being an HTTP based protocol works best when the client is a browser. XML-RPC on the other hand is XML based. So no assumption is made about the client which is going to use the protocol.
When the client is a browser, more efforts need to be put in by the client to use XML-RPC than to use REST.

An advantage of REST over XML-RPC is that each object has its own URL and can easily be cached, copied, and bookmarked.

Advantage of XML-RPC is that it is client independant. Any sort of client be it a desktop application a mobile application, a mashup using information from your site can easily integrate with XML-RPC.

Overall I think REST has its advantages in the browser world. But as more and more applications are using the web as a platform and accessing it through a variety of methods other than web browsers XML-RPC has and edge over REST.


Web services should provide and XML based interface like XML-RPC. The could also provide a RESTful interface built on top of XML-RPC to support browser based clients.

Web service implementation

Read Full Post | Make a Comment ( 14 so far )

A script to remove spaces from a file name

Posted on August 1, 2006. Filed under: compigiri, Computer, script |

Removing spaces from file names

I face a lot of problem while dealing with files with spaces in their names on the Unix platform. I wrote a script yesterday to change the spaces in a file name to undescores.

It is very useful for changing the names of all files in a directory along with directory names.

Save the script to your home directory or to /usr/bin or some such directory,

Go to the directory in which you want to effect the name change and run
# find . -depth -exec ~/ {} \;

This will rename all files in the directory so that the spaces in filenames are changed to underscores.

The script is as follows:

# Writen by Mayuresh Phadke (mayuresh at To change the names of all files in a directory including directory names
# run the command
#  find . -depth -exec ~/ {} ;
# This command is pretty useful if you have a collection of songs or pictures transferred
# from your windows machine and you are finding it difficult to handle the
# spaces in the filenames on UNIX
#set -x

progname=`basename $0`

if [ $# != 1 ]
        echo "Usage: $progname \"file name with spaces\""
        echo "This utility is useful for renaming files with spaces in the filename. Spaces in the filename are replaced with _"
        echo "\"file name with spaces\" will be renamed to \"file_name_with_spaces\""
        exit 1

dir=`dirname "$1"`
file=`basename "$1"`

new_file=`echo $file|sed "s/ /_/g"`

if [ "$old_name" != "$new_name" ]
        mv "$old_name" "$new_name"

exit 0

Please let me know if you find this useful/useless or if you have any other comments about it.

Read Full Post | Make a Comment ( 23 so far )

Liked it here?
Why not try sites on the blogroll...