CFHibernate
In order to "put my money where my mouth is" about open source ColdFusion software, today I registered a new project at cfopen.org called CFHibernate. If you're familiar with Hibernate for Java, what I'd like to do is give ColdFusion users the tremendous capabilities that Hibernate has to offer. If you're not sure what Hibernate is, read on ...
Hibernate is an object-relational mapping (ORM) persistence framework for Java. What this means is that you define XML mapping files that describe your objects to Hibernate, and Hibernate creates your relational database model for you as well as many of your business objects (beans). Then in your application code, you literally don't ever have to write any SQL code. That's right, no SQL code. You make calls to the Hibernate service and it handles the database interaction for you. Being able to pass objects to Hibernate and not worry about all the "junk" that we typically have to concern ourselves with when persisting objects in an RDBMS is extremely powerful and very cool stuff.
The CFHibernate project is obviously in the pre-planning stages. I've been messing with Hibernate for Java for a little over a week now is all, but I'm extremely impressed and would absolutely love to be able to use this same functionality in my CF applications. Maybe it was the tedium of writing a bunch of DAOs that brought this on. ;-) At any rate, if you're interested in this effort and want to help, please consider registering on cfopen.org and signing up for the project. It's a big undertaking but I think it would be a huge benefit to OO CFers, and since the Hibernate code is in Java it might even be relatively leverageable (if that's even a word).
the model, and coldfusion for the view and controller.
I've been thinking about the issues with running hibernate on CF for a while and have come up with
the following idea.
Part 1
------------------
1. Download the source for the Commons Logging package
2. Create an Eclipse project for it
3. Refactor the base package for commons logging to be:
cf.org.apache.commons.logging instead of
org.apache.commons.logging
4. Build a jar. cf-commons-logging.jar
Part 2
------------------
1. Download the souce for Hibernate
2. Create an Eclipse project for it
3. Refactor the base package for Hibernate to be:
cf.org.hibernate instead of
org.hibernate
4. Buidl a jar. cf-hibernate.jar
Part 3
------------------
Place the 2 jars you created above, along with all other supporting jars where CF can pick them up
and start/restart ColdFusion
In part 2, before you build the cf-hibernate.jar, there should be an additional step:
** Do a search and replace in the entire hibernate source and update all references to: org.apache.commons.logging
to instead point to: cf.org.apache.commons.logging
So ignore the following instruction:
3.) Refactor the base package for Hibernate to be:
cf.org.hibernate instead of
org.hibernate
and instead do the following:
3.) Do a search and replace in the entire hibernate source and update all references to: org.apache.commons.logging
to instead point to: cf.org.apache.commons.logging
i tried building hibernate versions 2.1.2, 2.1.3, and 3.0CR2.
In each case the source files are missing this package
org.hibernate.hql.antlr
i can find nothing about this through extensive searching. building commons logging with the renamed packages went smoother.
See my post to the hibernate forum (perhaps a solution will come)
http://forum.hibernate.org/viewtopic.php?p=2306368
See the notes at the bottom of the page:
http://www.hibernate.org/hib_docs/v3/api/org/hibernate/hql/antlr/package-summary.html
And checkout this line in the build.xml file.
...
...
....
Man, I've got to spend some time and get this working. Back to work...
It looks like you actually have to build hibernate using the build.xml file that comes with it to generate this package. Then you'd have to do the refactoring..
See the notes at the bottom of the page:
http://www.hibernate.org/hib_docs/v3/api/org/hibernate/hql/antlr/package-summary.html
And checkout this line in the build.xml file.
...
property name="parser.src" value="${generated.src}/org/hibernate/hql/antlr"/
...
target name="init.antlr" depends="init"
description="Check ANTLR dependencies."
uptodate property="antlr.isUpToDate"
targetfile="${parser.src}/.antlr_run"
srcfiles dir="${grammar.dir}" includes="*.g"/
/uptodate
/target
....
Man, I've got to spend some time and get this working. Back to work...
I followed the steps I outlined in my prevoius posts, which was pretty much refactoring the commons-logging and log4j packages to be "cf.org.apache..." instead of "org.apache..." and then I updated any references in the Hibernate source code to the commons-loggging and log4j packages to now point to my new "cf.org..." packages.
So after that I had 3 jar files
cf-commons-logging.jar
cf-log4j.jar
cf-hibernate.jar
I then put these files in:
__cfinstall__/wwwroot/WEB-INF/lib
and restarted MX
(I also put in the MySQL connector JAR and a JAR that my application uses - my app is a cf/java hybrid)
I created a simple test CFM template which executed a number of business actions (Java Classes) which handle all my hibernate access, and detaching objects.... and I could do everything, with NO complaints from CF!!
Can you publish the modified .jar files somewhere, so anybody can use these files?
Thanks,
-dipak
Our site provides Rolex replica, replica Rolex Watches,
The Ugg UK are very comfortable, i'm surprised about chestnut ugg, I will tell all friends to buy Ugg Bailey Boots from you.
53.These high-end designers like to see UGG Boots KnightsBridge! You will definitely impress your friends come to when you walk in your new boot.Fashion is looking good, warm and comfortable. All infants erin baby boots are fit for these standards. You will feel you are surrounded by warmth.This winter make your fashion is your Ugg Short Boots.
Welcome to purchase online or contact us and we will be happy to provide you with the best quality service of replica rolex .
replica watches paypal is loved by many young people.It’s one of hot items of our company.If you haven’t worn fake rolex watches you are missing out.They are fashiona and nice.
Thank you.Hot Shoes Cheap Jordan shoes michael jordan shoes and are on sale-Free shipping.
High quality fake rolex paypal of well known brands - Jacob & Co, TAG Heuer, Cartier, Panerai and much more. *If you want to buy replica watches paypal, you have come to the right place! We are leading supplier of all kinds of strongfake watches. The leading name in luxury watches, replica rolex paypal has been the pre-eminent symbol of performance and prestige for over a century. Replica Swiss Rolex men's and ladies' watches.
Aion Kinah,
Buy Aion Kinah
Welcome to our website,and you will enjoy the sunshine service. Let's abandon all the worry,and enjoy the happy shopping travel.All
thefake rolexandfake rolex watches are most in fashion boutique this year.rolex replica and rolex replica and the fake rolex watches show your chaming temperament. In addtin, the rolex replica and the other fake rolex make you mold your unique glamour this winter.The swissrolex replica have the high quality but low price. fake rolex and replica rolex have all the style and cheapest price fake rolex watches. Enjoying the fun of net purchase! rolex replica We will supply you the perfect service and after sale support system. Our honest will bring you absolute satisfaction.
2010????
Wow, thanks for the insightful post. I look forward to reading more from you.