« January 2007 | Main | March 2007 »

February 08, 2007

Execute Python in PHP

The project PiP - Python in PHP, sounds like a clever way to combine the clean, understandable, object-oriented code of Python with the convenience of PHP. I'm thinking of trying this out as a wrapper for some Python web applications I work on. Since I can easily start up MAMP on my computer for developing PHP, if I can write a simple PHP wrapper for my Python using this library, I could develop Python easier, too.

Posted by lsloan at 01:04 PM | Comments (0)

February 06, 2007

Automatic Table Naming with Hibernate

This article, "Hibernate: Simplify Mapping Documents With Naming Strategies", explains how to use Hibernate's DefaultNamingStrategy to influence the way it derives table names from class names. This can simplify Hibernate mapping files.

In my case, while I'm developing a new application, I'm using the database schema of another application. I would like to prefix all the table names used by my new application to make them easy to identify. I'd like to prefix them with "appname_".

I think the class demonstrated in the article should help me. I think I would rewrite the class' constructor to accept a string parameter of wha I want the table name prefix to be.

Posted by lsloan at 12:41 PM | Comments (0)