Grails One Domain many applications…. Bad Developer ?
Hello …. I think this maybe one way of doing common domain with Grails for multiple applications. Say you have this adserver you are writing or some type of administration you need to do. Create Users , manage a bit-o-content whatever. Your site is moderately popular you get a few 10k hits or so. Why would I want my admins running on my production server sucking up the resources? I don’t so here’s what I’m doing.
I created three grails applications …. I may just cut this down to two and a groovy project later. But I like the framework making test and stuff.
I called one domain-gr , one admin-gr, and one client-gr.
Created a sym-link from the grails-app/domain from each of the domain-gr and the client-gr to the domain-gr/grails-app/domain
Created unique controller for each of my client and domain scaffolded them out changed my datasource to the same ds. BAM one domain two different apps. remember to grails -Dserver.port=9090 run-app on the second app.
Now I can host the admin app locally and the client on my prod server.
Yes …. Yes I know what about a plugin you say? Well I thought about that and I didn’t like the idea of reloading a plugin for a domain while in development. I guess I could roll the plugin later.
That’s my latest hack. Ask me about my layout div control for site-mesh sometime.
My question is anyone got a better way? Is this bad good or ugly. I like it for the DRY principle.
-Doyle
PS… Worked fine importing them into eclipse. I don’t think this will work on Windoze.