Category: Django

Django related posts

Two months of Rails Development

Two months ago, I was fortunate to land a job doing Rails development full-time.  It’s been a long slow process, but I’m finally getting a grasp of it.  Or at least pieces of it.  Here is my story:

My Programming Background

For the last 5 years, my background in web development was ColdFusion. It was easy to understand, easy to connect to databases, and quite expensive. What I found lacking were good frameworks. I had grown sick of repeating myself every time I started a new project. On the side, I had been playing with Django and wished I could develop in it full-time. I had even dabbled in Ruby on Rails a bit.

However, there was change in the air at my work, and it wasn’t for the better. I worked for a city government and I pushed for open source technologies as a way to save taxpayer’s dollars. Unfortunately, not enough people higher up cared about this. It looked like management was drinking the Microsoft flavored kool-aid and we were going to become a .Net shop. We had already brought Sharepoint into the office. I knew it was time to leave.

I set a goal to find a job using either Python or Ruby, and if worse came to worst, even PHP. Unbelievably, I landed a job within one month of searching. I was going to do Ruby on Rails development. Professionally! Amazing!

Rails Development

As a new Rails developer, I was fortunate enough to work for a company that has allowed me to learn Rails on the job. For the first four weeks of employment, I spent nearly all my time on Rails for Zombies and then Rails Tutorial. I highly recommend this site for anyone wanting to learn about Rails development. It covers everything from setting up Rails to using GitHub, Rspec, and deploying to Heroku.

I’m now fully engulfed in the development process. I feel overwhelmed at times, but completely love it. The Rails ecosystem is vast and there is a lot to learn. I’m spending most of my time writing Rspec tests and updating models.

I’ve learned a lot in the last two months. I’ve realized that I’ll never go back to the “old” days of coding by myself, coding without a framework, coding without writing tests, and manually deploying to a Java application server. There’s a part of me that wants to go back to my old job and say “Don’t you see how wrong you are? This is how it should be done”. But I guess that the current management isn’t comfortable with a technology unless there are salespeople selling it.

DjangoCon Videos are online now!

I wasn’t fortunate enough to attend DjangoCon 2008 at Google’s headquarters but I’m happy to see that the videos from the conference are now available on Youtube and Google Video.  I really liked the Django Success Stories discussion.  It is interesting to see how small most of the development teams are for these projects.  The team I work on is small too, in fact there are only two of us.  And we don’t have a designer.  So I spend most of my time fighting CSS and HTML rather than working on real code.  Of course, starting a project with ColdFusion is a lot more painful and slower than starting a project with Django.  But I’m comparing apples to oranges.  ColdFusion is not a real web framework like Django.

You can find the DjangoCon 2008 playlist here.

Selecting a Content Management System for work

I work for a city government.  It’s actually my second time with them.  I left them in January 2001 because I was ready to write web applications and they weren’t.  Because the I.T. department didn’t care about the web in the 1990’s, the website fell into the hands of the Public Information Office.  And its been there ever since.

A couple of years after I left, the I.T. department finally decided it was time to have a presence on the web.  So they wrote a couple of “eServices”, bulk trash pickup, real estate assessment, etc.  But they never thought about taking back control of the website itself.  They concentrated on what I call “business apps” but totally ignored other types of web apps.

In the three years that I’ve been back, there have been on and off discussions about getting a Content Management System.  The city originally looked at products like Vignette (don’t know why they thought they could afford that one).  Well, the discussions are back on and this team it is getting serious.  But there is a problem.  Remember how I mentioned the website is not under I.T.’s control?  You guessed it.  PIO would like to make the decision on the product.  And I’m not fond of what they’ve chosen.  They are sold on Ektron.  While Ektron is full-featured and could do everything we want (actually its probably overkill), I have a few issues with it.  It’s expensive, maybe not to a city budget, but it is to me.  And more importantly, it runs on Microsoft-only technology.  It’s .Net, requires SQL Server, and uses Windows Servers with IIS.  Yuck.  I prefere to run my apps on a Linux server using PostgreSQL for the database.  As a developer who would like to be writing cool web apps for citizens, rather than boring business apps, this is personal.  I don’t write .Net now and I have no intention of writing .Net.

As an alternative, we looked at Alfresco.  Alfresco is commercial open source.  Alfresco is very powerful and web content management is only a piece of the Alfresco puzzle.  Alfresco also does document management, image management, and record keeping.  Unfortunately, our design team in PIO weren’t thrilled by it.  I liked it but I now believe that it would probably be too technical and demanding for the few we have on our web team.

The next CMS we looked at is CommonSpot by Paper Thin.  CommonSpot is a ColdFusion-based CMS.  It has many of the same features that Ektron has and runs on our current J2EE platform on WebSphere.  On a side note, we’re looking to migrate away from WebSphere to JBoss, but I’ll save that for another story.  The biggest drawback I have to CommonSpot is that it needs ColdFusion.  We have ColdFusion and I’ve written several apps in it, but my long-term goal is to move away from ColdFusion and utilize other languages and frameworks like Groovy and Grails.

So what’s left?  I’ve looked at Drupal and Joomla but I don’t really care for PHP.  I really want a CMS that I can build apps to work within its framework.  We looked at Plone in the past, but I’ve never been a big fan of Plone.  I always thought it was too complicated.  Do you write your app in Plone?  Or do you go down a layer and use Zope and the ZMI?

I’m a big fan of Django, so I contacted the Ellington team and spoke to them about Ellington today.  Since Ellington is designed primarily for newspaper and publishing sites, I’m going to try and persuade our team that a city website should probably be more like a newspaper site and that Ellington might be a good fit.  It doesn’t have the features of Ektron or CommonSpot, but I believe it may have just what we need.  Plus, if there is a piece that is missing, I could add it myself or find it in the Django community.

Web Framework Comparison

I’ve been keeping track of high school football scores in Virginia for quite a while. And I’ve been meaning to create a site to that will provide information on schools, seasons, etc. I also plan to add video highlights as well. Since I haven’t yet settled on a framework, I’ve decided that I will detail the creation of my site in my blog as well as provide video of the design of the site using the three frameworks I’m looking at:

Of course, I’ll be creating all this on my MacBook Pro using TextMate and maybe Eclipse with CFEclipse. And the database will be PostgreSQL because well is there anything better?

So, the stage has been set. I’m still trying to decide which I like better, Django or RoR. There are some things in each that I’m really impressed with. And what about CF with M-G:U? Its the definite underdog. But I write in ColdFusion at work and I’ve been looking for a project to use M-G:U. It could surprise me.

I haven’t worked out the details yet, but I’m thinking that I’ll do one particular piece at a time and do it under each framework for comparison’s sake. And of course, I’m planning to make a screencast showing how each framework handles the particular task.

Now if only I can convince my work to let me have the time off to work on this, while still paying me, then we can make some progress. Otherwise, this will take a while.