msgbartop
by Brian Neal
msgbarbottom

26 Dec 08 What to do next…

So with the shoutbox out of the way (for now), I still have several major applications to write before tackling the 800 pound gorrilla in the room: forums. These applications are: some kind of Paypal donations tracker, a Photo of the Day app, the member map, and the event calendar.

In order to thoroughly test the donations application, I think I need to have live test code deployed in order to use Paypal’s developer sandbox. So I think I will wait on that until I get something deployed.

The event calendar will be interesting. I wrote a very complicated PHP-Nuke module called GCalendar for the current SG101. I’m a bit hesitant to port all that PHP code to Python and Django. First of all, I attempted to add repeating event logic to GCalendar, and it does seem to work for most cases, but it doesn’t do everything very well. There is no way, for example, to specify you want an event that repeats on the last Friday of every month. Granted, that doesn’t come up very often. I am currently thinking of leveraging Google Calendar. My idea is to let Google Calendar deal with the hairy calendar math, while all I need to do is manage the adding and deleting of events. And it would let me play with the Google gdata python client. Another benefit of doing this is that other people can embed the SG101 calender on their sites and blogs. So I think I will at least explore this route, falling back to a complete port of GCalendar if it doesn’t look like it will pan out. This is going to take some studying, so I think I’ll put this off for a bit also.

I also wrote a PHP-Nuke module called Member Map. This application allows members to add themselves to a Google map. It was a fun little app to do, and most of the code was written in Javascript (to interface with the Google Maps API). Since I just got the cool jQuery in Action book, I think I will take some time to learn about jQuery and rewrite my hand-crafted Javascript code to leverage jQuery. So I think I’ll start reading the book before tackling this application.

So that leaves the Photo of the Day feature. This is a popular attraction on the current site. One of my must have features is to make the site generate the thumbnail for me. Right now I have to generate this myself (usually I use the Gimp). Since I now have experience with the PIL when I wrote code to support avatars, this should not be too hard. In the current PHP implementation, I have some rather complicated code that runs on the first page request after midnight to choose the next photo of the day. I was having race conditions from different requests, and had to resort to table locking. For my Django site, I think I will handle this differently. I will use a cron job to run a custom manage.py shell command to choose the next photo of the day, and avoid all that table locking nonsense. The original code was developed back when I was using shared hosting without access to cron. Now I can stretch out and do it the “right” way.

I think I will finally stop avoiding user comments when I start the Photo of the Day. I will finally investigate Django’s comment system and see if it is right for my site. I sure hope so. I also need to decide if I am going to allow some kind of mark up in the comments. There is always TinyMCE, but it may be overkill. I know there is a Javascript Markdown editor out there, but it didn’t look like development on it was continuing, and it had a funny license as I recall. I’ll have to look into this again. I will also want to use my smiley system that I introduced for the shoutbox.

Tags:

Comments are closed.