This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm new here, so forgive me if I've posted in the wrong forum.
I am a Java greenhorn: about three years of core Java development with a smidge of Swing. I may have an opportunity to work with Groovy on Grails and want to get a head start by working with it at home, beginning with the basic tutorials.
I now have Eclipse EE on my home PC. It was easy enough to find instructions for downloading and installing SpringSource Tool Suite and Grails, however I'm unsure of what else is needed. Should I install a DB such as MySQL? Do I also need a webserver, and if so, which one? I installed Tomcat 7 on a work PC and got it to work well enough with Eclipse (so I could tinker with JSP), but an acquaintance suggested Glassfish instead.
Also, is there a preferred order of installation? For example DB first, then webserver, then STS, then Grails? The same acquaintance mentioned that he'd encountered some serious problems with his own PC when switching between DBs and webservers. So, I'd like to avoid potential pitfalls (or am I worrying too much?)
As such Grails comes with an embedded Tomcat container and embedded db which can be used for development. There should be an option to generate the war and deploy to some other container. Same goes with db- you can configure to use another db. The good thing is that Grails supports different configuration for development/production/test, so you can configure the db as required for each setup.
I am not sure which one is better among Glassfish/Tomcat, but if you are planning to deploy the application to some cloud service then you would be bound to the container which they provide. And the order in which you install db, web container doesnt matter.
There shouldnt be a problem as such when switching the db, because the ORM insulates your application from the underlying db, so if you want to switch the db, you just have to update the db configuration in your grails app. And as far as switching the container is concerned then you can use any container which supports war deployment.
I would suggest you try with the stack which comes with Grails (using the embedded Tomcat and embedded db), I dont think you would even need Eclipse/STS for a quick grails application or may be to learn. Once you are quite familiar you can always look for tutorials on how to deploy to other containers or how to use other db.
Thank you for the welcome and the information, Mohamed. At this point I don't need to worry about deployment, I just want to start with basic tutorials. Thank you for confirming that I can get going without having to worry about adding a db or container. If/when I get to use Grails I believe the dev environment will be set up with STS and Eclipse, however I will take your advice and begin with just Grails... that's the way the Grails tutorial is written, and I might as well keep things as simple as possible at first, I can always link with STS/Eclipse later. Thanks again!