Hibernate and Flex? Please, dev in "Debug"!

If you're using Hibernate as the ORM behind a Flex application, I highly recommend running BlazeDS (or LiveCycle, or ColdFusion) with its services-config set to log "Debug" level to the console.

Why?

Short version: you may run a lot of unintended SQL, sometimes with really weird consequences.

[More]

Groovy Multiline Strings + HQL = Bliss.

In the home screen / dashboard for the Broadchoice Workspace, the second folder ("Spaces") in the tree on the left shows which workspaces Jack Conner participates in.

The data access method that generates this list shows one of my favorite things about combining Groovy and Hibernate: using Groovy multiline strings to create and run an HQL query.

In Groovy, triple-quotes indicates a string that spans multiple lines, solving one of my least favorite things about Java / C# / many other languages: writing well-formatted SQL was a pain. ColdFusion handles this wonderfully with the CFQuery tag. Groovy can be almost as pretty.

Here's what the underlying method for that list looks like: very familiar for ColdFusion folks, especially for Transfer users:


List findUsersJoinedSpaces(User user)
{
    return getHibernateTemplate().find (
        """
            select
                membership.space
            from
                SpaceMembership as membership
            where
                membership.user = ?
        """,
        user
    )
}

Behind The Curtain

As you may have guessed from the content of our earlier blog posts, we're working on an AIR application that involves some sort of real-time collaboration. As you may also have guessed from the slower flow of postings since mid-August, we've been very busy working on that application!

Broadchoice Workspace blogWe're finally ready to start showing the world what we're working on and to talk about the concepts and technologies behind it. We're also taking early signups for the forthcoming limited beta program. [You can download the public release from the main Broadchoice website]

This blog post contains the first public unveiling of the application and its capabilities. The fundamental concept of the application is to provide a central way to collaborate with your colleagues (or friends). All users have a personal workspace containing files they have uploaded, a blog, a GTD-style task manager and useful bookmarks they have found.

[More]

Hibernate and Inheritance

I'm already used to the magic that is Transfer and I can't imagine building a ColdFusion application without it. Adobe have said they're looking at integrating Hibernate into "Centaur" and showed some simple examples of how it might work in their keynote at CFUNITED (I expect we'll see more at MAX - you are going to MAX, right?). Hibernate is the de facto standard ORM for the Java world and it is very robust, scalable and feature-rich.

We've been using Hibernate for a while to manage the persistence of our business objects and that has driven us toward Groovy for those business objects since, right now, you cannot use Hibernate with ColdFusion Components in any meaningful way and we didn't want to write all the verbose code that Java would require.

A recent discussion on the Transfer mailing list has focused on how to model one-to-one relationships and why Transfer doesn't support them directly. This is one area in which Hibernate's features go far beyond what Transfer offers - and part of the reason for us to "switch" to Hibernate for future product development.

Another modeling quandary when it comes to persistence is how to handle inheritance.

[More]

BlogCFC was created by Raymond Camden. This blog is running version 5.9.2.002. Contact Blog Owner