Linux and Web Development Part 2
Published 6 years 8 months ago on September 11, 2006
It has been over two months since my initial writeup of using Linux for Web Development. I had no idea that article would be received as it was, but I couldn’t be happier about it. Some people had concerns about my phrasing of ‘Web development’ and were disappointed that I wasn’t speaking about programming for the Web. I apologize for any confusion I caused with the vocabulary I chose to use, but to me it seems to be the most descriptive given the situation.
I’d like to provide an update to what I’ve learned about using Linux in my day-to-day personal and professional work. After much testing and many changes, I think that I may be able to offer some prospective users some direction in their switch to Linux.
This article will concentrate mostly on software solutions, mostly unique to Linux. I’ve had many experiences generating from suggestions provided in the comments of my first article, and after two months of usage, I have some conclusions to write about.
There are many reasons a developer chooses one editor over another. Whether it’s a particular feature they can’t do without, application speed, or overall usage experience, it’s rare to find a developer who hasn’t gone back and forth between multiple editors before settling on their favorite.
As it last stood, I was head over heels for Bluefish, but after a few weeks using it at work, I began noticing a couple of the shortcomings that had been mentioned. Once any particular file reached a couple hundred lines in length, highlighting would take noticeably longer which began to wear my nerves. I also found myself missing certain features I had become used to in the past. Such things as code folding and current line highlighting. While those features are quite small, I’m used to them and prefer their presence. A hunt for a possible replacement resulted. Working from the huge list of recommendations provided in the Intro, I began using a different editor every week, trying to see which gave me the best experience. While some may say a week is not nearly enough time to determine whether or not an editor is for you, I thought it was sufficient.
What I found is that there is an editor out there for everyone under the Linux platform. From vim to jEdit to Aptana, there is something to suit your needs, whatever they might be. I can’t provide a general recommendation for anybody simply because everyones preferences are different. Out of all the editors I tried (and I tried just about every one I could find), I think I’ve settled on one.
Quanta Plus is an editor based partly on Kate, therefore inheriting Kate’s speed and versatility. Quanta Plus, unlike Bluefish, has code folding and current line highlighting, the small features I had come to miss. It will highlight a document significantly faster than Bluefish once line counts exceed a couple hundred. Something I hadn’t run across before was a feature that Quanta Plus refers to as Document Structure. Essentially it’s an outline for any document you’re working on based on the structure of whichever language you’re using (XHTML, CSS, etc.). I think as I get used to a feature like that, I’ll use it more and it will help with productivity. There’s also a plugin included by default which I can compare to Dreamweaver in that an inline dropdown menu appears with contextual information based on any tag you’re editing. What makes this instance different, however, is that the dropdown appears not only with predefined items such as
ids you’ve used in your document, it also offers color code and word completion which can come in handy sometimes. It also includes the expected property value options. On top of that, Quanta Plus has integrated CVS support which I look forward to using once our CVS repository is setup.
So far I haven’t found any major shortcomings to Quanta Plus. I’ve only been using it a short time but I’m very pleased with the feature set and reliability it provides. As a Gnome user, the KDE interface of Quanta Plus takes some getting used to, but overall that’s quite minor.
Cross browser testing was discussed in good detail in the previous article, but even more so in the comments. Some information was provided that I had neglected to include in my writeup.
Konqueror in Comparison to Safari (Webkit)
As indicated, Konqueror is based on KHTML, which was the base Apple used for Safari. This can be a great benefit and save everyone from having to track down a way to test on Safari. Since switching to Linux, I’ve tested any site I worked on in both Konqueror and Safari to see if I could find any discrepancies. For the most part, Konqueror absolutely rendered a site exactly as Safari did, including any tiny quirks. One major change that I’ve found so far is the difference between the two in their rendering of various forms. For one reason or another there would be a missing input in one browser or another, usually due to space restrictions or otherwise. Unfortunately I think that as a developer, even using Linux and Konqueror, you should still test for Safari on a Mac. It is a good way to get a quick look as to what any problems might be, however.
Internet Explorer 7
With an official release of Internet Explorer 7 just around the corner, it’s important to test in that browser as well. Unfortunately IEs4Linux hasn’t included IE7 into the package yet, but hopefully that will happen soon enough.
As stated below in the comments (thanks Roy!), the IEs4Linux developer has actully succeeded in running IE7 under Wine. Quoting the developer, it’s usage can be considered “pre-pre-alpha” so your results may not be too stable, but this is really good news for Linux Web designers/developers.
Still in Need of that One Application?
If it turns out there’s still that one application stopping you from making the switch to Linux, there’s still hope. You can solve that problem through the use of virtual machines. Using a virtual machine you can install an operating system within Linux. This lets you run that particular application without the hassle of rebooting all the time.
VMware is a completely free virtualization solution that I would definitely recommend if virtualization is something you need. After installing VMware, you can setup as many virtual machines as you need in order to install what you use, especially the one app holding you back from completely switching. Using VMware you can continue to use Photoshop, work in Flash, or test natively in IE7.
Solid image editing is definitely a requirement for me, I think it’s important to have legitimate tools to work with. The two tools I use primarily for image editing are Pixel and the GNU Image Manipulation Program.
Update on the GIMP
From what I can see, the GIMP basically has a cult following. Many people find the interface intimidating and just can’t work with it. Others just don’t like it because they feel the name is inappropriate. And then there is a whole slew of people who have no problem working in the GIMP and actually enjoy it. Regardless of how it’s received, I have a few tips to make it more useful.
First and foremost, layer boundaries should be hidden. I don’t quite get why they’re displayed by default but at least you can turn them off — their presence quickly clutters things and makes any file really confusing to work with. Alan White has written up a small list of some really great tips on starting out with the GIMP. One that I can whole heartedly support is making one big ‘toolbar’ out of the two windows put on display by default. To do this you can drag the various panels from place to place by clicking and dragging their title section as shown below:
Once you grab the panel you can drag it from one window to another and it will attach itself. You can either add it as a new panel to any particular window or an additional tab of a current panel. To add something as a new panel of a current window you will need to drop the panel on a horizontal bar within the target window. The horizontal bar will only turn a new color when you’re hovering the right spot so you will have to move the mouse around a bit until you’ve got it right. If you’d like to add a tab to an already existing panel, you simply drag into the target panel and you’ll see a black outline appear where the tab will be added. If you’d like to change the order of tabs you can simply drag to reorder. This is one feature of the GIMP that I had overlooked in the past but proven to be extremely valuable in making the interface more natural to use.
Update on Pixel
Although I’m using GIMP more and more, I couldn’t live without Pixel. I love its implementation of live effects and the more familiar interface. On the other side I’ve found it partially difficult to work with blocks of text, as the word wrapping is something to get used to. I’ve also run into a few issues with brushes in Pixel, but nothing huge to complain about. My last issue is the fact that there’s not pressure support under Linux, but the developer is awesome and has indicated that it’s coming.
Latest news on Flash
I had recently come across an article detailing a method of copying an installation of Flash piece by piece into an installation of Wine on a Linux machine and having it work. While it may in fact work for some people, it comes with some licensing issues and seemed a bit hackneyed for my taste. On the Flash plugin front, PENGUIN.SWF (Flash Plugin for Linux official blog), Flash 9 for Linux looks like it will be arriving quicker than once thought, which is great.
As I had said earlier, FTP clients for one reason or another, are less than pleasant to work with (for the most part). Reading through the comments I was guided in many different directions. Again, each solution had pros and cons and I began sifting. gFTP wasn’t doing anything for me and was more trouble than it was worth, so after trying many of the other suggested applications, I’ve pretty much settled on FireFTP, an FTP client plugin for Firefox. As I began getting used to the plugin, I became more pleased with the idea behind it. Personally, I spend most of my time uploading pieces of a client website that I’m working on. The fact that I can open up an FTP client in a tab of my browser makes perfect sense. It’s one less app to have open and puts things within easy reach. So far FireFTP has been great and stable for me and I think I’ll stick with it.
Lucky for me, we’re probably going to be setting up a CVS repository on a new in house development server, so the only time I should be using FTP is upon a site launch, which will be completely great. I’ll be able to edit sites in development within a working environment which will allow me and my co-workers to work at a much faster pace in the long run.
When Things Go Terribly Wrong
Along with all the positive experiences with switching to Linux, I’ve also had the benefit of experiencing one of the worst circumstances you could run into at any time. I recently sat down to a frozen desktop, unable to force quit anything and it was impossible to get any sort of response. At first I disregarded it as a fluke and hard reset the machine. To my surprise, the machine wouldn’t boot. It was acting strange during POST and I couldn’t figure out what was wrong. After hard resetting a couple more times I was able to see the familiar Ubuntu boot process and took a second for a sigh of relief. Before I could exhale I was looking at an error message I had never seen before, telling me the filesystem was unreadable and I need to run a disk check. Luckily there were instructions on how to do just that included in the error message, or else I would have been completely lost.
The instructions told me to reboot and force
fsck, which I did. Upon doing so I was faced with countless errors including disk parity errors, I/O errors, filesystem flag errors, and many other error types I had never heard of before. I was forced to come to the conclusion that the hard drive had failed. Panicked that I had also lost the second drive (where I keep all my backups) I tried to figure out what I could do. This was my first experience with a mission critical drive failure.
Linux Basically Saved the Day
I still had my Ubuntu Dapper install DVD lying around so I decided to check out what trouble I could get into from booting the DVD. It can’t get much worse, right? After booting, I was able to create a couple mount points and mount both hard drives to see what damage had been done. To my surprise I could still browse both hard drives. My backup drive seemed to be operating normally, while I was still able to check out my
home folder. For those who aren’t familiar, Linux creates a home folder for each user which contains all the configuration files related to any personal or application settings that user might have. Until now I didn’t think much of it, but in this case it was completely wonderful. Essentially I was able to copy my home folder from the damaged drive onto my backup dive, replace the damaged drive, and copy most of that home folder back into a fresh reinstall — and basically carry on from where I had left off.
Most of the applications I use are included with many default Linux installations. After a few minutes, the remaining apps are installed and I’m almost to where I left off. Given my home directory, I’m able to copy over my configuration directories and things are exactly as I had left them. Personally I think this a great position to be in should a hard drive fail for you (if you’re good about keeping up-to-date backups).
Is Linux Still Working?
Overall I’m still absolutely pleased with my switch from Windows to Linux both at home and at work. If anything I honestly think I work faster, smarter, and happier. Given my recent experience with hard drive failure, I’m glad Linux provided the functionality to get back up and running very quickly and easily. I’ll definitely be looking into some automated nightly backup solutions over the next few days due to the fact that a RAID setup isn’t in the cards for me just yet. I don’t plan on retreating back to Windows any time soon and I look forward to working with Linux for a long time to come. I’m not trying to push anyone into checking out Linux and switching, just cataloging my experiences thus far.