msgbartop
by Brian Neal
msgbarbottom

23 Nov 08 The Story So Far…

I think it was sometime in September that I began working on SG101 2.0. Here is a brief overview of what’s been going on since then.

Development Environment

I managed to get a Subversion 1.5 server built from source and installed on my dedicated server. I started developing on my PC at first, using XAMPP for the MySQL server. This quickly changed as around that time I got my new Dell XPS M1530 laptop running Ubuntu. I quickly got MySQL, Django, SVN, etc., installed on the laptop and went to town.

Before SG101 2.0, I had been using Apache and mod_python to develop Django apps. Since I was new to Django and my ultimate production target was under Apache, I didn’t want any surprises and wanted to see exactly what I was going to get. However, after gaining some experience and confidence with Django, I started using the Django development server. Restarting Apache after every code change gets old after a while. The Django development server is very convenient as it will automatically reload your code after a change. A few simple conditional statements in a few python files is all you need to prepare your code for either a development or production environment.

My main routine for developing seems to be as follows. First I open a shell to run the development server or various Django management commands. Another shell is opened for subversion commands, greps, searches, etc. Gvim is the editor of choice, of course. All of that is on one virtual desktop. Another virtual desktop is running Firefox to observe my handiwork as well as to retrieve reference material such as Django and Python documentation. And finally another virtual desktop is devoted to a screen of Tomboy Notes, which I really find quite handy for organizing my thoughts and to-do lists.

Application Development

I started writing the Polls application first. This was no coincidence since the Django tutorial starts you out creating a simple poll app. I then created an accounts application, to wrap the django.contrib.auth module. I peeked at, and used a few ideas from django-registration. It is all kind of a blur now what other apps came next. I do know that I worked on some, discovered some new feature of Django, then went back and refactored. I did a lot of that as I came up to speed on the framework. Even now as I revisit parts of the code I find myself cringing a bit and refactoring. Along the way I wrote applications for: weblinks, news (with django-tagging), user profiles, site messages (I call them bulletins now), IRC status, podcast, contact, and a core application that contains some common code. I’m glossing over a lot here, and I’m sure I’ll write more on some of these later.

There were several difficult spots where I had to come to terms with a needed feature and a suitable implementation. The most memorable of these have been pagination, template tags, the use of a Javascript editor, and getting a nice AJAX style auto-complete feature going. In particular, I struggled with pagination, and wrote and rewrote something a few times before I was happy with the solution. I’m also still not entirely sold on my choice of a Javascript editor. I will write posts about these topics in the future.

The Present

After getting a barebones CSS structure in place along with a workable base template, it is now starting to look like a proper website: a header, footer, a navigation column on the left, and the main content area. I’m still polishing things and no application is completely finished at this point. I just got the avatar logic working and the members list is turning out quite nicely. I think I am going to tackle the shout box next.

The next few posts I plan on discussing some interesting challenges I have had and decisions I have made so far.

Tags: , ,

Comments are closed.