May 9, 2008

Ubuntu for Web Development

I was reading a little article on 10 signs you are ruining your career as a web developer, which talks about several things you're probably doing wrong as a web programmer. I think a lot of them are seem somewhat biased like 3, 4, 5, 7 and 9. You don't have to be an active member of the community to be a good web programmer. Nor do you have to spend every evening studying.

What I found to be the most meaningful of these was number 10: "WAMP is still the development platform for your LAMP app." For most web developers, this is probably the case, at least for LAMP developers (I'm still not certain as to why anybody would want Windows as a server, other than the obvious steak and strippers reasons). In fact, I'll bet many of them don't even have the AMP part, they just do their development in some PHP (or whatever language you may be using) editor and upload it to some server with the stuff on it.

There are a couple problems with this approach. I did a professional site using Ruby on Rails a while back on my Ubuntu box, and I have to say it is a lot easier to debug things when you have a web server and everything running on your local machine. You can have a debugger/profiler running, you can read log files much more easily, and you don't need this thing called a "development server" since the development server is the computer you are working on.
One problem I found that crops up from time to time on Windows development is capitalization. When working on a team, everybody codes differently. When naming files, these differences show up. One person might name their file "myfile.php" whereas someone else might put "myFile.php". Not really a problem, until you start throwing things in SVN. The SVN server is probably running Linux, so these two files are different files. The SVN client (like Tortoise SVN) you're using on Windows however, will probably see these as the same. So it tries to do merges or whatever on two files that it thinks are the same when the server says they are different, this creates complications. It's a big mess that would never had happened if you were working in Ubuntu in the first place.

What tools are available for development in Ubuntu? Quanta is one I like, it's for KDE but it's easy to install KDE libraries in Ubuntu. There's also Eclipse which a lot of people like, but it's a beast. Plus it's a Java IDE, with other functionality tacked on through extensions. I want something a little more devoted. There are a lot fewer IDEs for Ubuntu than for Windows, however despite this I think there are more free IDEs for Ubuntu than for Windows ;).

UPDATE: It's been a few years since I wrote this article, I now develop almost exclusively in Vim. I use IDEs for fancy refactoring or bells and whistles like that when necessary, but not for writing any code.

I really should start looking for a new SVN client. I mean, the svn command line isn't so bad, but something that automatically detects when I've added or deleted files is always nice.

For FTP there's gFTP or the ftp command line stuff, although Quanta has built-in FTP support, which means once it's set up you don't have to navigate directories. You just press the shortcut (Ctrl+Shift+U for me, habit from my Dreamweaver days) and it uploads to the proper directory.

The major deciding factor in my mind is the image manipulation programs. If you want something really powerful, you're probably not going to find it on Ubuntu. Let's face it, the GIMP sucks. It just doesn't compare to Photoshop. I find it much easier to use Photoshop than GIMP (not that I really know how to use Photoshop for anything). So if you need to do a lot of fancy image manipulation, then Ubuntu might not be the choice for you unless you want to figure out how to use the GIMP.
For me, I don't do much complex image manipulation, and in this regard Ubuntu turns out to be better for me. I want to have a basic image editor that supports transparency and nice cropping stuff. There's occasionally some other stuff that I want, but this is what I need 90% of the time. Paint just doesn't cut it here, and using Photoshop for this is like using a shotgun to kill a mosquito. Here's where Kolourpaint comes in. It has transparency (you can select it at the bottom like it is a colour) and resize/scaling. It even produces some really nice file sizes and the smooth scaling option is pretty easy.

So here is my consensus: For the web designer, who mainly do the design of the site, images, HTML, CSS, you're probably better off on Windows or Mac. But for us web programmers who work with the server-side stuff a lot more, we're better off on Ubuntu or some other Linux distro. Why would you program on a WAMP stack (or even worse, a WIMP stack - Windows, IIS, MySQL (or MS SQL), PHP/Perl/Python) when you can program on a LAMP stack and speak the same language as the server that will be running your software?

UPDATE: I've posted a follow-up for this article here.


Guillaume Theoret said...

I tried Quanta but it kept crashing. I use Geany now and it works pretty well.

IllegalCharacter said...

For a little while Quanta would crash a lot, although it eventually went away. Probably some bug introduced by one patch and fixed in the next one.

I'll have to check out Geany. Another app on my checking-out list.

phil said...

I have used ubuntu as a web designer for years now. I find it's fantastic and makes my work go by so much faster.

Here's my setup:
Text Editor: VI or GEdit
SSH/FTP: Terminal & Connect to Server...
Layout Design: Illustrator
Image Manipulation: GiMP & Photoshop
Testing: VirtualBox to test on XP, Vista, & 7 (if your hardware will handle it you can run all three virtual machines at full speed along with ubuntu)

I use one of the XP virtual machines with all of the adobe programs I use for designing, it works out really well.

phil said...

I left out a pretty important part.

I've synced the desktop & documents folders on all of the virtual machines to use ubuntu's desktop and documents, and I have my home folder mapped on them as well so I can access anything on my machine.

Anonymous said...


I'd be curious to hear more about your setup.

I installed Ubuntu on my old laptop and want to continue using adobe apps.

I do wordpress development on localhost using xampp on Win7, wondering if I should use that or some other LAMP setup on Ubuntu.



phil said...


If I had a choice I'd go with LAMP. I just started a new job at the beginning of the year and I'm still pushing for a linux workstation. Using Ubuntu through VirtualBox atm on windows 7, and I always have my personal Ubuntu laptop with me for more demanding programming.

With linux you have many more options as far as programming goes. You can use just a terminal, using ssh or ftp to connect and vi and/or vim to edit files.

You can do more of a windows approach and use "connect to server" under the places menu to connect in a gui and edit the files with gedit, or any other text editor.

You can also use emacs to do all of these things, or write your site in perl or lisp and compile the output in php; that way you have a program contained in one file that creates all of the other files it needs. This is really awesome if you're working with others at the same time and/or want low profile version control.

In order to run windows and adobe effectively your computer *should meet these requirements.
1. Over 2GB of ram, more is better. If you're on a 32bit os then you can do 4GB(it's possible to do 8GB on 32bit, but it can be a pain), or 8GB on a 64bit system.
2. Your computer *should have virtualization hardware. If you check through the settings in BIOS you should see something to enable virtualization, if it has it.
3. Graphics card. You should have a game worthy graphics card. Doesn't have to be the best, but should be good enough to play some good 3d games. This will allow you to dedicate higher graphics setting on your virtual machines.

That being said, some computers can pull it off even without those things. It will run much better with them though.

Right now I have a i7 dual quad core. So 8 processors, 8GB of ram, and a solid state hd; which makes my computer much quieter and faster read/write times. It can run ubuntu, winxp & win7 all at the same time w/o noticeable lag. It's fast enough to edit video in encore.

If you have any questions or want me to make some videos of how something's set up/works; let me know.

Geniet said...

I personally use Komodo for Web Development, and I have listed some others here: