rustyx
rustyx

Reputation: 85511

Grails bottom-up development

I'm considering Grails for my next project, but I will be given a complete database before I start writing the application around it. I have read that Grails is a domain-centric environment, supporting top-down development, so that does not fit my development mode.

Hence my question: is it possible to write a Grails app around an existing DB structure? What would be the best approach? Can Grails be used without a full ORM, but with a pattern like ActiveRecord? Or are there tools to generate Grails classes from an existing DB schema?

Upvotes: 1

Views: 233

Answers (2)

Dónal
Dónal

Reputation: 187379

are there tools to generate Grails classes from an existing DB schema?

Grails Reverse Engineering Plugin

Upvotes: 1

Jan Wikholm
Jan Wikholm

Reputation: 1575

Yes Grails can be used without an ORM.

We have written non-GORM domain classes that fetch their data from RESTful APIs without ever going to a permanent storage. So Grails is in no way forcing you to use GORM.

Depending on your legacy DB schema you can either just add params to your GORM classes to fit that schema or you can just write your own data accessors for your database.

Giving further tips / ideas without further information regarding your project and database schema is impossible, so I'll leave it at that :)

Upvotes: 1

Related Questions