work

Django Applications at Work

Today someone at my work just released a simple Django app, the second one now running at my company. Here are the two Django apps running so far:

Server scanner

This is the first Django application that we use. It started out as a script that would scan all the computers on our network and determine what version of our software they were running by inspecting a special file in one of the publicly available SMB shares. The script took about half an hour to run and generated static html that was then served up by Apache. This became cumbersome for a number of reasons. For one, it took about an hour to scan the entire network. There was no persistence whatsoever so my script had no memory of which servers had our software installed on it. These servers are quick to check. The ones that are slow to check are the ones that are actually no longer on the network, or do not have the publicly available share that we are expecting. When the project manager emailed me one day and said "the servers on this page are often out of date" I sprung in to action and converted it to a Django application. There is a script that scans the network and saves Server instances to an sqlite db. I also used a couple generic views to display a list of servers and to edit a server (to provide a description). Converting to Django from my static html generator gave me a few new features right away: 1) full scans were much quicker because I could scan the servers that actually have the software installed with a higher priority. In another thread, I can look for new servers on the network with a lower priority. There's also the "timesince" filter which is awesome, and the automatically filled DateTime fields for "created" and "updated" when I update a model instance. Not to mention ModelForms and generic views which allowed me to get this up and running quickly. The best part is that each server entry has a description entry, where people can put a note like "DO NOT TOUCH THIS SERVER" or "Dave's server, please feel free to play around on it".

Task tracker

This web app is for the software developers to keep track and inform other of what they are working on. Up until we haven't really had anything of the kind, save for e-mail and a bug tracker. Typically software developers send weekly reports to team members. This involves typing one up or constantly opening up an email draft. Either way, other team members can't see what the person is working on in real-time. So one of the members of our Python Club got interested in Django and wrote this up very quickly. He used YUI which is awesome and he just released it to a wider audience today.

Build website - in progress

This is a new one that is in progress. Currently, each build generates a folder structure containing the result of the build along with a bunch of log files and a bunch of other junk. A perl script scans these folders periodically and generates static HTML (at least I think that's how it works, I don't work on it so I don't know the details). My boss is in the process of creating some Django models. The main table is a table called Build. Then his HTML will be generated from Django templates. That is the biggest advantage of moving to Django here, in my opinion, is that he can use templates rather than HTML generation by a perl script. Having the information in a database is nice but not required. He will get some advantages from having the database though. He'll have some other tables, such as BuildServer, Release, and Product that the Build server will contain ForeignKeys to to allow filtering the builds based on these ForeignKeys. Also the build manager (someone other than my boss who is designing the Django part) will be able to use the admin interface to add new Releases, BuildServers, etc...

Conclusion

This apps were implemented extremely quickly and are far better than all the crappy SAP and SharePoint-based web applications used at work and the other simpler web pages around that I think are mostly static HTML or ASP. It will be interesting to see if it catches on. I had this master to plan to re-implement our entire employee performance review site (which is a particularly crappy SAP app) in Django but there are too many hurdles. We'd need to hook in to the existing SAP user tables somehow and also use the existing authentication mechanisms. But a demonstration app using the basic functionality wouldn't be that hard, and then we could worry about the hard bits later after it got approval. The existing employee performance review site is REALLY bad.

Anyways, I just thought it was cool how quickly Django has been adopted for a few simple projects at a company that is for the most part a Microsoft shop. People do use OSS here but there is a bit of a tendency to use Microsoft solutions and a bit of Not-Invented-Here syndrome as well.

D-Wave Systems Slashdotted and on Digg Twice in One Day

Huge buzz on the web today about D-Wave:

Here's my original post about our upcoming demo.

Subscribe to RSS - work