Monday, February 9, 2009

Time to Get Serious About Programming

A long while back, I started learning how to program and create stand-alone applications. I really didn't wind up creating anything much, really. I had several projects I was working on in my learning such as "Hyponiq's Calculator", a customizable and fully-functional calculator with command logging and other nifty little features. None of those projects were ever really completed as I lost interest or moved onto other things. I also pretty much concentrated (and still do) mostly on Web development and all things related.

Well, recently I downloaded and installed Microsoft's Visual Studio 2008 Express Edition on both of my PCs -- my desktop and laptop. I decided that if I were going to have it, I need to use it. I've always had Visual Studio since it's 2003 release, but it really just collects dust as I hardly ever create ASP .NET applications anymore. Mostly, I utilize PHP as my server-side application interpreter. PHP is really so much better than ASP .NET, although ASP .NET does have its benefits such as the direct link to the Windows APIs and the .NET Framework. Both are strong and powerful and I hold no ill will towards Microsoft and their technologies. In point of fact, almost all of Microsoft's applications are my preferred tools and resources, with just a few exceptions ... such as the Expression tools line (yuck!).

Whatever the case, Visual Studio did nothing more for me anymore than simply sit on my hard drive looking pretty. Version 2008, however, does have major key benefits and improvements over the 2005 release and previous versions, as well. So, again I decided it was high time I started using my programming skills and put them to good use. The problem: finding the right thing to produce. With so many programmers, developers, and architects in the industry, it's really difficult to find that inspiration as almost all ideas are covered ... except for at least one.

So what's the issue? I use, primarily, Microsoft Internet Information Services 7 (IIS7) as my default Web service provider for my project(s) testing suite. I have no problems with IIS7. In point of fact, I love it! It is so very easy to install, use, and configure. Plus, it has a very low profile on my processor(s). Unfortunately, it only comes in Windows Vista and/or Windows Server 2008 or higher. My laptop has Windows Vista Home Premium which allows me to install IIS7 and run it as an advanced service platform. It is multi-threaded and allows me to utilize PHP to its max potential. The point of interest here is that PHP can utilize per-directory configuration settings as well as a master configuration settings file for default configurations. There are many other points here, as well, but the aforementioned is my number one concern. My desktop, on the other hand, runs Windows XP Media Center Edition (which is really Windows XP Professional with a few media-related tweaks and its own indigenous GUI theme). And, yes, my desktop PC is a little outdated. I have the ability to run IIS 5.1, but it is not a multi-threaded server and therefore does not allow for virtual hosts. It only allows for one Web site; not many. There-in lies the issue. I simply must have a multi-threaded environment. I could (and should) just buy Windows Vista, but it is very expensive and I'd rather spend my money on something else, really. That's not to say that Vista is bad; it's not and I do prefer it over XP. The simple fact remains that this PC (my desktop) isn't quite suitable for Vista, although it can handle it (and I have tested it). Sometime in the not-so-distant future, I'll be purchasing an MSDN subscription which will allow me to download all Microsoft Windows platforms, but that doesn't solve the problem now.

So, Apache HTTPD (Apache, for short), therefore, is the solution. It is highly configurable via the configuration files (i.e. http.conf, vhosts.conf, et cetera) and allows for a plethora of application extensions, code libraries, scripting engines, and so on. In other words, I can use PHP and have multiple Web sites! There are three problems I have with Apache, however.

Issue #1: Apache, on a Linux/Unix platform, has a stand-alone, visual configuration tool for manipulating the configuration files. Using this tool is easy and fairly light-weight on the processor and memory. Although it's a great tool, the open-source Apache Configuration Tool (which ships with most Linux/Unix ports) is a Linux/Unix only tool and I haven't found any successful and powerful-enough ports to the Win32 architecture. In other words, I haven't found any useful Apache configuration tools available for Windows. There are a few projects out there (Google returned 295,000 hits for "apache configuration tool") that I found, but not one of them does exactly what I would like. Plus, being as pedantic and OCD as I am, many of the said applications are ugly, over-bloated, and resource intense. Also, a lot of them are not free of charge which, to me, defeats the entire purpose of open-source software. So, returning back to the original topic -- programming -- I'm taking it upon myself to create a new visual tool for Apache, building upon IIS7's visual interface. What that means is that I'm basically going to emulate Microsoft's IIS7's configuration tool. Almost all the features found therein will be available in my Apache configuration tool. I haven't decided a name for it, but that'll come in time. Moreover, this project will be open-source and freely distributable. I believe in open-source technology, which is my only real gripe to Microsoft. Personally, I believe Microsoft should release a freely distributable version of the Windows platform, if only limited in abilities, along side of other technologies -- namely: IIS. Sure, they have their operating systems freely downloadable to MSDN and TechNet subscribers, but that's really not the same as those subscriptions cost more than the operating systems supplied. Imagine that. . o O ( Damn, I'm rambling! )

So, anyway, I'm definitely going to start that project immediately.

Issue #2: Using PHP on Apache isn't as successful as using it on IIS7. The foremost complaint I have is the simple fact that PHP's per-directory configuration settings don't work quite the same on Apache as it does on IIS7 (one of the many reasons for why I don't understand why everyone is so uptight about using Apache over IIS7). You can read more information in this blog post. So, what am I going to do about that? I'm going to write an Apache module that allows PHP to find and use separate configuration files per-directory as well as read the standard configuration settings from the master file. I haven't yet figured it out in my head how to go about this, but I'm sure I will.

Issue #3: Going back to the beginning parts of this discussion, I mentioned the fact that I utilize ASP .NET in some of my yester-year projects. As I said before, ASP .NET is a powerful and very-useful application platform. I have no problems with it (minus the major difference in overall development time vs. PHP). I'm sure sometime in the future that I'll be using ASP .NET for someone's site architecture and will/would definitely need the ability to run ASP .NET from my computer(s). Once again, my laptop can do this as it has IIS7; my desktop cannot, however, due to the operating system. So, the solution is to build an Apache extension that taps into the very powerful .NET framework and serve ASP .NET pages. There is/was an Apache module project already started (and probably many more) -- mod_aspdotnet. There is also a cross-platform (Windows included) .NET Framework port called Mono (as well as the corresponding Apache module (mod_mono)) which allows for .NET Framework development using some of the more common programming languages (including my favorite language (for programming, that is): C#). Bearing that in mind, Mono is still under development and will probably continue to be so as it seems to be a fairly popular project. mod_aspdotnet, however, isn't maintained properly (the last build date was in 2006!). Temporarily, until I release my first stable version of my own Apache module, I'll be using mod_aspdotnet. The concept here is to allow Apache to interpret and serve ASP .NET-related pages (particularly ASPX) and work from the System.Web sub-classes of said framework. This will probably be the most complicated of the three Apache projects I have in mind with it being the latter project tackled.

So, all in all it seems I have my work cut-out for me. It'll probably be several months before the first official release of any of the above projects, but it will keep me company and occupied so I'm not doing other, potentially harmful things (but that's another discussion).

No comments: