rc3.org

Strong opinions, weakly held

Month: July 2005 (page 4 of 7)

Unfair comparisons

IBM developerWorks makes an unfair comparison between Ruby’s Active Record persistence component and Hibernate, a persistence framework for Java. It also compares Rails and Struts, but I’m not interested in that comparison (it’s easy to see why Rails wins there). On the Hibernate front, Active Record and Hibernate are beasts of a different nature. Active Record creates a sort of proxy for database tables by examining the database schema itself. This makes your database schema tightly coupled with your business objects (since there aren’t any, really). Rails, in turn, is tightly coupled with Active Record. What this means in practice is that if you have the ability to design a schema with the semantics that Rails prefers, you can get a whole lot done in no time.

Hibernate, which has all those nasty mapping documents (shown in the article) takes you longer to get up to speed (although you can save a lot of time using something like Xdoclet rather than writing your mapping files by hand), but if you’re working with a legacy database schema, this flexibility pays off in a big way. Hibernate can deal with just about any existing schema you could possibly imagine — even if it uses composite, natural keys or other byzantine practices of database design.

I’m not knocking the tight coupling that makes Ruby on Rails easy to roll out, but I do caution people that when comparing it to Hibernate, they’re comparing apples to oranges. Hibernate is built for maximum flexibility in dealing with legacy databases, Rails is built for speed of development when you own the whole stack (and generally are working from scratch).

Also, for the sake of comprehensiveness, it’s worth noting that Hibernate ships with a number of tools for code generation that enable you to generate the code for other layers from any layer of code that exists. In other words, you can generate a DB schema from mapping files, Java classes from mapping files, mapping files from a DB schema, and so on. This comes in really handy when you want do something like run tests against a clean database when you’re regression testing.

So many blogging tools, so little time

Another reader writes to recommend b2evolution, a PHP/MySQL based blogging tool that supports multiple languages and multiple weblogs. It looks interesting.

Back to the drawing board

I was this close to moving everything over to Movable Type tonight, then I realized something that I think puts Movable Type out of the running. Here’s the scenario. I use pair.com as my hosting provider, and the files for this site live in a directory called public_html. As you may know, Movable Type lives in its own install directory and publishes static files to the directory where your content will live. Even if you max out your use dynamic publishing, it still wants to publish a few files on its own. (Let’s leave aside the fact that I couldn’t get dynamic publishing to work perfectly after a couple of hours of work.)

In order for Movable Type to publish files, the Web server process has to have permission to write to the directory where they will live. That leaves a few options:

  • Use cgiwrap or suexec. It’s to Six Apart’s credit that Movable Type supports these programs, which enable the Web server process to use your user ID when accessing files. Pair.com’s installation of cgiwrap sucks big time, so this isn’t an option for me.
  • Change the permissions for my main Web directory to 777, meaning that anyone can write to it. This seems like a really bad idea to me.
  • Let Movable Type publish to another directory with wide open permissions. This would work fine, but then the URL for this site would change. I could handle that with a redirect, but I don’t want to.

This seems like kind of an intractable problem, given that I don’t want to change hosting providers (perhaps the most logical solution) and that I don’t have that much invested in Movable Type. One thing I did discover is that it was easier to import my old entries into Movable Type by generating a massive SQL script to insert all of them into the mt_entry table than it was to use the Movable Type import facility, which is awfully slow (I have nearly 8000 entries).

Anyway, time to try something else tomorrow.

Update: I’m posting further updates on this issue here.

Good neighbor

Problem. Solution. Major props to Tim Bray and Sun for acting fast to help out the Drupal team.

Question answered

A reader tipped me off that the public beta of Movable Type 3.2 was going to be released today, and lo and behold, it was. I’m going to try to install it tonight and maybe even start hacking on some templates.

FogCreek Copilot

I just noticed that the FogCreek interns have announced the product that they’re working on. It’s a version of VNC that’s hacked up so that it’s more easy to use, with the idea of making it easy for someone to remotely assist someone else in using their computer. This is definitely a product I could see myself using.

Don Box on Objective C

Don Box:

Objective C has a great mix of flexible/dynamic features with classic C when you absolutely, positively want to overflow a buffer as efficiently as possible.

Scariest post of the week

Eric Umansky catches a post translated from a jihadi message board urging inexperienced jihadi wannabes not to come to Iraq. Not good news, if true.

The Plame scandal

If you, unlike me, have not been following the Valerie Plame/Joseph Wilson/Karl Rove thing obsessively since David Corn initially broke the story in the summer of 2003, you may find this summary helpful. There was also a great summary on the Daily Show last night, which you can view at the Daily Show web site under “More Best Leak Ever”.

Suggesting links

I’ve never been a big solicitor of links, and indeed, I don’t get that many links suggested. However, del.icio.us has a cool new mechanism for tagging things that other people may be interested in. To suggest a link to someone, you tag it with for:username where username is the username of the person for whom the link is intended. Anyway, I’m subscribed to the private RSS feed for links suggested to me at del.icio.us, so if you want to point me at something, just tag it for:rafeco. You can also view my del.icio.us links (which serve as sort of an adjunct to this site) here.

Older posts Newer posts

© 2024 rc3.org

Theme by Anders NorenUp ↑