Question

I'm trying to figure out how to share domain and service classes between a Grails and Griffon projects.

Since this at a 'bird's eye view'/planning stage, I'm wondering if creating a standalone pojo library project would be a good approach for this. Then if I need to, reuse the same lib in an Androind project as well.

Or is it asking for a bit much in this context?

Edit 8/29/12 Just found out that a POJO with Hibernate annotations seems to work out of the box on Android. As in Hibernate annotations not causing any issues at this point. That was one of big concerns for me. So I had the domain model build out as much as possible, tested it in a swing app (no Griffon yet), Grails and all's well.

Was it helpful?

Solution

If said domain classes are real POJOs (no GORM attached) then it should work, particularly on Android as that platform has stricter restrictions.

It's possible to have GORM domain classes in Griffon, by leveraging standalone GORM, however that will fail in Android right away. Also, standalone GORM can be quite heavy in the number of dependencies added to the Griffon application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top