Tuesday, November 2, 2010

Options in NoSQL

For 90% of projects done with PHP and similar tools the database engine of choice is MySQL, (Postgress gets a large chunk of what is left). So when starting a new project using PHP, Python, Ruby etc the choice of a data store will default to MySQL and in some cases that is great. There is still the choice between myism and innodb tables but that one tends to be pretty easy.

However of late 'NoSQL' has become all the rage with new data storage engines showing up every so often.
The Developer faces a few challenges when moving from MySQL to one of these NoSQL engines.

1) Most web developers understand MySQL pretty well (we hope). We know how to index things, how to layout tables etc. This level of know how has not yet been established with the new NoSQL products.

2) The tools like phpMyAdmin and such for MySQL have been around for a while and are pretty well established

3) There are at least three big NoSQL data stores in the free software arena. (CouchDB, MongoDB and Cassandra) While competition is very much a good thing for the programmer who is not familiar with these products having to try to figure out which one to use in any given case can be a bit problematic.

I expect all three of these issues will start to go away over the next few years as the tech literature catches up to the software

Monday, November 1, 2010

LAMP: PHP is past its prime

If one part of the LAMP stack has to be the week link at this point it is PHP. PHP is a great language for doing little things but as web applications get more complex it is showing its limits.

PHP suffers from a few major problems:

  1.  The need to have a <?php tag at the top of any file, and having the script send anything outside of the <?php tag to standard output.
  2. Almost no ability to do any form of asynchronous operations 
  3. Vulnerability to injection and XSS attacks (Though many languages have this problem)

There is also the fact that as languages go PHP is just not very elegant. spend a few hours with python, ruby or javascript and PHP will feel painful.