Web Development, Better Done On GNU/Linux

February 18th, 2011 by Jacob Barkdull

I often tell people that setup, configuration, writing, scripting, and other general development of any website is better done on the same web server, or at least the same operating system that is installed on the web server that the site is going to be hosted and ran on, rather than developed elsewhere and simply dropped in place later. It doesn't matter whether you're using Apache or Windows Server, GNU/Linux or Windows.

For example, even little things like URLs matter a lot, because they need to be consistent with the operating system location paths, for example "/var/www/articles/bash.css" is written with forward slashes and is case-sensitive. If you write your code on Windows and deploy the website on GNU/Linux, you might end up in a situation where an entire website's HTML, CSS, JavaScript, and PHP files all have incorrect paths like "C:\\Jacob\articles\bash.css". A recipe for non-functionality.

Furthermore, I often see people who write a large amount of code and/or spend hours writing the HTML, CSS, and JavaScript for the website's design in Windows, only to find that the source code doesn't look right in their text editor on their GNU/Linux server. This happens because Unix and Unix-like operating systems, like GNU/Linux and Mac OS, only place a "Line Feed" at the end of each line, where as in Windows a "Line Feed" and a "Carriage Return" are placed at the end of each line. So on Windows, files missing the expected "Carriage Return" read as one long line, on GNU/Linux, files with an unexpected "Carriage Return" read with double spacing, which doesn't make compilers, interpreters, nor text editors very happy.

That problem is actually one I hear a lot, and one I had myself before switching entirely to GNU/Linux, but the problem is bigger than just extra line breaks. Because the file originated from a Windows computer and the extra "Carriage Return" displays as "^M" at the end of each line or as a second line break, I often hear that PHP code won't execute or executes very slowly, or that their software for web development on the server won't open the files or opens them as corrupt gibberish.

Sometimes they don't even have web development software on the server at all.

The problem exists both ways, too. I often hear that after encountering and resolving many problems, they then find that they're having whole new problems when they attempt to work with the files again on Windows after making changes to them on their GNU/Linux server.

They see some opposite behavior and yet similar problems, like files display as only a single -- very long -- line, and web development applications either refuse to open them, open them corrupted, and/or certainly save them in the same manner that caused them so much trouble the first time around. All this can be avoided by simply using the same web server when developing the website infrastructure, using the same operating system that is installed on the web server, or using a capable text editor, though the problem can still persist if some programs handle the foreign newlines properly while others do not.

Compilers and interpreters may fail with obscure syntax errors even though the source file looks correct when displayed on the console or in a text editor.

Many people like GNU/Linux for developing websites and software, and how could I blame them. GNU/Linux has some of the best compilers, interpreters, debuggers, and professional software development suites around. Almost every text editor supports syntax highlighting and autocomplete for multiple languages, regular expression, and search and replace. While the more professional applications also have function calltips, IME support, integration with major source code control systems, built-in DOM viewer and editor, built-in HTTP inspector, built-in multi-language debugger, built-in web browser, and so much more!

And let's not forget the easy one-line "apt-get" command for installing and updating of an entire free web server application suite and it's many impressive extending components such as PHP5-FFmpeg, GD 2, etc.

In conclusion, if you're planning on developing a website on GNU/Linux, make sure to use a Unix or Unix-like operating system on your server. And if you're planning on developing a website on Windows for use on a GNU/Linux web server, stop right now and switch over to GNU/Linux, or prepare for a confusing mess.

Loading...

On the Blog RSS

May 9th, 2021

GNOME 40 is finally out and I'm happy to say a small contribution of mine made it into the release. My contribution adds a new feature to GNOME System Monitor version 40. Few articles about GNOME 40 mention it, but some power users might find my contribution useful.

November 15th, 2019
If you leave this option checked when you export your image, any pixels you erased will be saved in the exported image. They will not be truly erased, just made fully transparent. In other words, the data that describes the color of each pixel will be preserved, they will just be made invisible. This option has privacy implications. With it enabled, what you erase from an image may still be present in transparent pixels.
May 2nd, 2015

Over the past few days I've been in talks with a nice fellow named Kamil Jablonski, a concept artist, graphic designer, and web developer who recently contributed a Polish locale for HashOver. He shared with me a logo design for HashOver, that after some back and forth became, in my opinion, a very cool design.

Subscribe to Newsletter

Want to get the latest news and updates about my software, blog posts and behind the scenes information? Than subscribe to my newsletter to stay up-to-date!