groovy - Using java classes in Grails -


I have a Java \ spring \ hibernate application - complete with domain classes, which are basically Hibernate POOSO < / P>

I want to reuse the domain JavaScript that I have created in the main Java app

What's the best way to do this?

Should I write new domain classes that extend Java classes? Is it very easy or can i generate controllers from java domain classes?

Grails \ Groovy has the best practices about reusing Java Domain objects. I'm sure some pieces have to be written in Greeks. I \ Groovy

If you have a Know about the tutorials that talk about this kind of integration - it would be awesome!

PS: I'm doing a lot of new jobs, obviously. Thanks!

Do you really want to use Grails instead of Groove?

Grails are really nothing you can use to add a part to an existing web application. The entire "Conference on Configuration" approach means that you want to play too much with the laws of Grails Otherwise, there is no point in using it. And one of those rules is that domain objects are Groovy classes that are heavily "enhanced" by the Grails runtime

It is possible that they can expand existing Java classes, but I do not bet on it - And all the parts of your current app will be abandoned in the spring and hibernate, or at least you have to make a lot of efforts to work in Grails.

  • From your app Repeat from scratch in the grill EEP, while possible as a code to use than the existing ones.
  • Keep your app the same and add new stuff to groove, without using Grails.

Later in your situation, Grails means better to create a new web application very quickly, that is where it shines. Adding stuff to an existing app is not just what was done for it.

Edit: About explanation in comments: If you are planning to write a data entry basically / maintenance for the data used by the other app Frontend and DB are among them as the only communication channel, which can really work well with Grails; This can definitely be configured to use existing DB Schema instead of domain classes (though later work is low).


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -