Sunday, July 30, 2006

LAMP Stack Development

Well, I have recently been pretty heavy into PHP development and must say that is quite an change compared to Java/Struts and J2EE type development. One nice thing I have found is taht Eclipse and Zend are working together to make this a smooth process with the PHPIDE. If you are a Java developer and already use Eclipse, you will feel quite at home using the Zend PHPIDE which is an Eclipse 3.2 plugin that works quite nicely even in beta form.

There are pros and cons to using the LAMP (Linux, Apache MySQL, Perl/PHP) or WAMP (Windows, Apache, MySQL, Perl/PHP) stack. I will just refer to this as the LAMP stack from now on in this posting. One benefit is that all the tools are open source. There are very few financial barriers to using these technologies. The primary con I see if that you have to ensure that you are using compatible versions of each of the components in your technology architecture. One solution is just try a VMware appliance, WAMP, or XAMMP packages pre-built for Linux or Windows. The downside to the pre-packages approach is that if you have to deploy and support a LAMP/WAMP stack, you will not have the necessary configuration skills for troubleshooting issues that may occur on your servers. I recommend that if you need to support this stuff, then learn to do it the hard way at least once so you will know the configuration and mechanics of the LAMP stack. The "Install & Configure Apache, PHP, JSP, Ruby on Rails, MySQL, PHPMyAdmin & WordPress on Windows XP/2000" and "Building a LAMP Server" HOWTOs really helped me out with this stuff among other HOWTOs I found. As usual, the HOWTO article was not bullet-proof or 100% accurate. I think I found about a 75% accuracy rate for configuring LAMP. Most issues I have found concern the PHP5 and MySQL5 issues (see this Zend post).

In other words, I discovered that MySQL 5 and PHP 5 have introduced some connectivity issues and incompatibilities with latest Apache HTTP Server. PHP5 doesn't even work with Apache 2.2 in my experience and I confirmed after doing quite a bit of research on the web. From what I have seen, the PHP community is working on supporting Apache 2.2. For MySQL5 and PHP5 you need to be using Apache HTTP Server 2.0. I learned this the hard way. Additionally, I was not aware that MySQL5 breaks quite a few PHP applications due to changes in password encoding and introduction of object-orientation in PHP5. Then there is the PHP mysqli extension that supercededs the mysql extension that is built into PHP. What a frustrating experience that is.

Anyway, what I have learned with all this experimentation with LAMP stack is that it is like all the other open source technology solutions I have been working with in the past few years. It does work with a few caveats. LAMP works as good as your understanding, skills and ability to use the web for research all the tools and components. Paraphrasing this, LAMP works if you are willing to put in the time and have the right mentality and necessary open source skills to solve problems.

Friday, July 21, 2006

Open Source Technology and National Security

I have read several articles that support the idea that the US DoD should adopt open source and open technologies more readily to match the productivity gains that many companies in the private sector have attained. The recent article, "Open Source in the national interest", provides a strong case for adopting open source in the DoD more readily. The 79 page April 2006 report mentions specifically how IBM has transformed itself by adopting open source readily.

There was a 2002 Report by Mitre that advocated the same. The 2002 article is not in as much depth as the more recent article noted above.

If Google, Yahoo, EBay, Amazon, IBM and many others are doing so well with open source technology on the large scale, then I think our government can do the same. It would just require a transformation of the government IT organizations. This is definitely more difficult than it sounds but when I see entire countries adopting open source technology (i.e. EU, Japan, Korea, China, India) I get that feeling that we might be falling behind or losing our edge by not following suit. I think it is in our national interest and so do many others in this ever changing computer science field.

Agile Web Development and the Lighter Languages

I have spent the past few months working with developing and experimenting with Java (JSP, Struts, Spring, Hibernate), Perl, PHP, ASP, Visual Basic and Ruby. Well, I will have to say there is something to be said about agile processes and open source dynamic languages. Recently I have had the opportunity to work with Java/JSP, Perl, and PHP. I am porting a PHP web application to JSP and intentionally sticking with a JSP Model 1 implementation. This is a bit of a digression in development techniques or a few steps backwards but I am testing out a theory. I can always refactor to an MVC design or other if necessary.

The theory that I am testing is: "It is possible to ignore elegance temporarily for attaining speed and practicality of getting a solution working using a 'quick and clean' process. (agility)" The old cliche in programming of doing something 'quick and dirty' to just get the job done is a concept I never really liked but have had to do occassionally in my career. The 'quick and dirty' approach almost always got me in trouble. I try to avoid doing this at all costs if possible. Based on my experiences with agile 'quick and clean' development, I feel that it is possible to attain software development speed practically in a sustained manner without sacrificing too much elegance. In other words, getting the cleanest job done in the best possible manner in the shortest period of time.

What I have found interesting in the days I've spent porting PHP to JSP is that it is relativley straight forward if you ignore your inner programming voice that says you should refactor the PHP to a more elegant Java/JSP design. In just a few days work, I have functioning webapps in JSP that rival the development speed of the looser PHP. I have to note that the PHP webapp is not using any PHP framework, design patterns (Five Common PHP Design Patterns), or other MVC pattern frameworks. This would of course complicate the design and make porting PHP to Java/JSP slower in my opinion but would require an experiment to prove it.

One other thing I must note is that having a really good IDE is critical to making this work. I am currently using Eclipse 3.1, Netbeans 5, and Zend Studio 5 in these 'quick and clean' experimental processes and this is definitely a must. I recently added Netbeans 5 to my pallete of java programming tools and it has yielded quite a productivity improvement for JSP and servlet development for me.

My next set of experiments is to get into Ruby on Rails (RoR) development which is a 'quick and clean' architecture. I have been talking about this all year however, have not made the time to start an experiment with RoR.

Saturday, July 01, 2006

Archaeology and FOSS Trends

Archaeology has been a passion of mine since I was a kid. Prior to getting into computer science and music, archaeology was one of the professions I wanted to pursue. To this day, using the internet and reading as much as I can I try to stay involved in what is current in the archaeological field.

Much of the software technology used in the archeological field has been proprietary until very recently. I just bumped into an open source product called ArcheOS that is a GNU Linux distributionhas specifically configured for archaology! The 1.0 release was presented late in 2005 and has since been evolving following the open source model.

In the article, "Uncovering progress in FOSS-based archeology", it discusses the progress made to date with FOSS for the archaology. I will research more into what ArcheOS does and should have a cursory working knowledge of this stuff sometime this year if I can devote a few days to it.

I am surprised at how FOSS has been finding its way into the archeological field. I guess with continuing technology trends, open source technology appears to be invading just about every aspect of life where software is required and used. It makes logical sense that open source technology is finding its way into other fields other than business, science and technology.