postgresql iconcatalyst iconperl iconmysql icontypo iconphp icon

Database Abstraction - code vs infrastructure

Posted in , , , , , , Wed, 05 Sep 2007 04:38:00 GMT

I've worked on a number of database-driven projects and no matter how much people want database abstraction, it was always difficult to code and maintain. I was recently reminded of this when I read this Drupal article on dropping PostgreSQL support. Not only can it be difficult to maintain support for multiple databases, but it may be difficult to find developers.

One solution of modern programming is to move database abstraction from the code to the infrastructure using a ORM (Object-Relational Mapper) or Data Mapper. A ORM and Data Mapper abstracts the database for you so you no longer have to do tie db abstraction to each app. Not only does it let you code once for multiple databases it lets your users migrate their data from one database to another. This blog runs Typo which is based on Ruby on Rails and ActiveRecord. I've been contemplating migrating Typo from MySQL to PostgreSQL and I've been told that it would be as simple as exporting the data with YAML, updating the database.yml file and importing the data. I haven't gotten around to doing it yet but it is a powerful idea. ActiveRecord is a data mapper and isn't as flexible as a full blown ORM but it gets the job done for the most part. For a full-blown ORM, I think of Perl's DBIx::Class which provides a full OO interface to the RDBMS allowing you to code just once for multiple DBs without limiting you when you want to use some esoteric database-specific SQL. DBIx::Class is often used with the Catalyst Framework but is also used by itself.

There are PHP frameworks out there like Symfony and Cake but do any of them have stand-alone ORMs? If so, could Drupal move to something like that and solve their maintainership problems once and for all? Drupal is part of the Go PHP5 effort so there should be no issue using PHP 5 OO. Something to think about for the Drupal folks if a PHP ORM is available. Abstraction - code vs infrastructure digg:Database Abstraction - code vs infrastructure reddit:Database Abstraction - code vs infrastructure spurl:Database Abstraction - code vs infrastructure wists:Database Abstraction - code vs infrastructure simpy:Database Abstraction - code vs infrastructure newsvine:Database Abstraction - code vs infrastructure blinklist:Database Abstraction - code vs infrastructure furl:Database Abstraction - code vs infrastructure fark:Database Abstraction - code vs infrastructure blogmarks:Database Abstraction - code vs infrastructure Y!:Database Abstraction - code vs infrastructure smarking:Database Abstraction - code vs infrastructure magnolia:Database Abstraction - code vs infrastructure segnalo:Database Abstraction - code vs infrastructure


php icon

Key Wiki Features

Posted in , , Sat, 30 Jun 2007 17:11:00 GMT

I just installed MediaWiki at an organization to manage some information I was researching. The primary reasons I chose MediaWiki were (a) it's open source, (b) it has auto-TOC (table of contents), (c) it has auto-categorization and (d) I was familiar with it already. I ran into some rough spots during the Win2K3 R2 / IIS 6.0 installation getting PHP 5.2.3 and the php_mysql extension working but other than that the installation was pretty smooth. It seems that the php_mysql extension that comes with PHP 5.2.3 doesn't work and you need to get it from PHP 5.2.2. Also, rebooting after installing PHP from the MSI helps but that doesn't seem to be mentioned in the installer. The other issue is that IIS doesn't seem to come with rewrite capabilities so I tried a third-party rewrite filter before tabling that for now. It's hard to believe that IIS doesn't have rewrite capabilities.

Some "Enterprise Wiki" solutions include Confluence and SocialText but I don't have any experience with these.

Which wiki do you like for "enterprise" purposes and what features do you find to be key? Do any other wikis have auto-TOC? Wiki Features digg:Key Wiki Features reddit:Key Wiki Features spurl:Key Wiki Features wists:Key Wiki Features simpy:Key Wiki Features newsvine:Key Wiki Features blinklist:Key Wiki Features furl:Key Wiki Features fark:Key Wiki Features blogmarks:Key Wiki Features Y!:Key Wiki Features smarking:Key Wiki Features magnolia:Key Wiki Features segnalo:Key Wiki Features