Monthly Archives: July 2007

Learning to use Komodo 4.x Project Templates and Toolboxes

For a few months I’ve had a license for Komodo 4.x IDE. Generally I’ve found it to be nice and usable for most non-PHP tasks. For PHP I use Zend IDE.

One thing that’s always bothered me is all the added stuff in Komodo. I had no idea how it was used, why to use it, etc. It just seemed like useless fluff. The documentation isn’t exactly comprehensive either so I was always wondering if there’s something I was missing. It turns out I’ve been missing a lot so far. I have a feeling there’s even more out there.

1) How and where to create projects
I’ve always saved my project files in a directory called My Documents\My Project (yes I’m on Windows). One of the many things that vexed me was the fact that every time I created a new project it included all of the other projects. This may seem obvious to everyone but me but it’s probably better to add the project file in the project directory and include it in source control. That way you only get the one project file and you can keep track of it.

2) Project Templates
Project can be built from scratch or, if you do a lot of the same stuff or have a preferred directory layout, you can create a project from a project template. A good explanation of why you would want to use a project template and a basic template for a Django project is at the Komodo forums. This kind of thing can really save you time if you do a lot of sites. The template referenced here also creates some of the basic files you need to start a Django project.

3) The Toolbox is your friend Yet another black hole of functionality is the toolbox. To view the contents of the toolbox go to View->Tabs->Toolbox. Unless you’ve customized your TB there’s probably lots of Samples. The samples include URLS which you click and that will appear URL in a browser window, snippets which are interactive code chunks, run commands which help you do nifty things like start the Django server, sync the db and the model, macros which can be either javascript of python code which gets executed for the IDE and a few other things.

Most of these samples are mildly useful but it’s not until you watch the Ruby on Rails toolkit in action that you get an idea of how useful this stuff really can be. It takes some playing around with the options to get the commands and macros working optimally but it’s time well spent.

I’ve started creating my own Django tool box by copying and altering items in the Ruby on Rails tool kit that comes with Komodo 4.1. Feel free to download it and add to it. I’ll be adding things to it as I gain understanding of Django and Komodo.

Firefox: The Browser is the Platform

Tonight I decided to convert my personal laptop from Windows to Ubuntu Linux. Yeah, I know, it’s not perfect (like Windows) and I’ll probably end up spending at least as much time hacking it to make it work as I do with Windows but I can’t afford a Mac right now so it’ll have to do.

My inclination toward change is more than mere need to procrastinate. I really need to learn *nix networking and administration and as long as I work on a Windows box these things will remain on the back burner. Additionally, I don’t intend to work on a Dell Inspiron 6000 for the rest of my days. I intend to Switch (with a capital “S”) to a Mac after Susan is out of law school. For now, the need vs. cost ratio will keep me on the Dell.

A big concern is the need for simplicity and things that just work. If I can’t find open source software that meets my needs I’ll either have to code it or change my requirements.

A perfect example is the FranklinCovey PlanPlus for Outlook software I use daily. It’s a great way to organize my tasks, projects and calendar under the Values, Roles and Goals methodology layed out by Stephen Covey in “The Seven Habits of Highly Effective People”. As much as I like it, I spend lots of time waiting for it to sync with my Treo. I’d like something simpler.

So, to facilitate my switch (lower case “s”) I’ve created a list on my Jotspot wiki. (I’d show you this list if only I could figure out how to make jotspot content publicly viewable. Instead I’ll show it in WordPress.) The list is just items I want to consider before I move over including software and hardware considerations.

Part of my 2 year portability strategy is to find and use applications that will translate between Windows, Ubuntu Linux and ultimately, Mac OS X.

Many of the applications I’m deciding on happen to be Mozilla XUL based applications including Komodo IDE for development, Zotero for note taking and Thunderbird email client. It seems that, silently, while everyone was focused on what is now called Vista, open source programmers have been building compelling alternatives to Microsoft applications. I doubt that I’ll be able to convert at work for now, since I have to integrate with an Exchange server but that’s what’s keeping the Macbook Pro purchase on the horizon.

One of the most important things I’m trying to replace is Microsoft OneNote note taking application. I think I’ve found a suitable alternative in Zotero. I can take notes on either computer and keep them on my USB key so they’re up to date but also work when I’m not connected to the internet. I’m not sure how I’d post something to it remotely but I’m sure it’s in the works.

The other main thing I’m trying to nail down is an integrated development environment (IDE) that is cross platform. Komodo IDE fits the bill here and is extremely extensible.

***
Since I started writing this Google has launched Google Gears which is a prime example of the browser being the platform. I never finished the above conversion and will probably just pop for a new Macbook Pro very soon. In the meantime, I’m really looking forward to seeing what clever people do with Gears.

Django, Komodo and Subversion

It’s been a pretty long time since I posted. I spent two fabulous weeks in Guatemala which is beautiful but ultra poor. I also bought a new Trek Madone road bike and have been enjoying riding again.

Since I got back I’ve been furiously working to learn Django by rewriting an application for a client that I wrote in PHP. The PHP application is on a Windows server because the database was originally in SQL Server. The monthly sync process only worked for a while and between the hosting company and the city both flaking it was time to port the site to a linux server and re-light a fire under the city which provides the data.

Basically, the site is a business directory which is broken down into two separate sections. One is a business to business section where users can search by a specific NAICS code and the other lets the users search by a region and shopping category.

About 3 years ago the site got built and tested but was never fully promoted which meant is was rarely accessed by searchers or by business owners. All the time I was building it, I had a feeling that it could be a cool, useful site and was wishing I didn’t have the constraints of a Windows server and PHP to work with. Don’t get me wrong, I like PHP. I really prefer it to ASP classic but a lot of it was spaghetti code which was difficult to maintain.

Fast forward to April when I spoke to my client about reworking the site. One of my requests was that we put it on a *nix server and do it in some sort of web dev framework. As mentioned in previous posts, I settled on Django and have been generally pretty pleased with my decision.

One of the interesting things about Django and Rails is that they’re so new there’s some but not a ton of IDE/editor support. I know that Textmate works nicely for both but I still don’t have a Mac. I’ve settled on Komodo and I’m really beginning to like it.

I’ve also gotten much more diligent about using version control and automatic backups from Mozy.

As I progress I’ll post my experiences and insights about using these three technologies together. I’m planning on using SQLAlchemy and Python for the synch process which should make things much easier and more interesting to code.