File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Groovy and the fly likes Grails - A Quick Start Guide - Questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Grails - A Quick Start Guide - Questions" Watch "Grails - A Quick Start Guide - Questions" New topic
Author

Grails - A Quick Start Guide - Questions

Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Hello Dave,

I have a few questions with Grails after going through the TOC and the preface in Amazon.

1. To what extent the security provided by Groovy is different and matured/enhanced as that of Java? What do you call it as? (compared to JAAS in Java).

2. What is this "GSP view"? What way it differs from JSP? In contrast to JSP, GSP is managed by Groovy itself or any other container we need to have?

3. What does Grails depend on for the configurations? same old XML files? or is it leveraged to some extent?

4. How about Unit Testing for Grails applications? Do we have any specific/compliant tool for it?

Thanks,


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
Dave Klein
author
Ranch Hand

Joined: Aug 29, 2007
Posts: 77
Hi Raghavan,

Good questions. Let's see if I can answer them all:

1. Basically, Groovy security is Java security. Since Groovy code compiles to Java bytecode, when it runs it IS Java. So any security tool or framework that you would use with Java can be used with Groovy. There are several Grails plugins that bring popular Java security frameworks and make them easier to use. The two most popular are Spring Security and Shiro (formerly JSecurity) but there are many others. A quick search of the Grails plugin portal (http://grails.org/plugin/home) shows 26 different security related plugins.

2. GSPs are Groovy Server Pages. They are processed by a Groovy template engine built into Grails. They work very similarly to JSPs but are more flexible and easier to work with. One of the best things about them is that you can create custom tags with a single class file. No TLD, no interfaces to implement, no configuration.

3. Grails depends mostly on convention for configuration. Ultimately it still uses web.xml but it builds it for you based on conventions, while giving you the ability to control it directly if needed.

4. Grails includes both unit and integration testing "out of the box", with classes that extend the JUnit classes. Unit tests run in isolation and consequently don't have any of the Grails runtime mojo. Though the Grails testing classes provide a bunch of helpful methods to allow mocking of things like GORM (Grails Object Relational Mapping). Integration test include all the dynamic goodness that Grails provides, but run a little slower. There are also plugins available for several different forms of functional testing (Webtest, Selenium, GFunc, and more).

Whew. I did it . Now I have to head off to work.

Dave
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Dave Klein wrote:Hi Raghavan,

Good questions. Let's see if I can answer them all:



Thank you



Whew. I did it . Now I have to head off to work.

Dave


Having been waiting to see the answers and it so happened that mine was the very first post for this subject and you started off in the reverse order ! :P lol...

Thank you very much for the answers.
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Dave Klein wrote:Hi Raghavan,

Good questions. Let's see if I can answer them all:

1. Basically, Groovy security is Java security. Since Groovy code compiles to Java bytecode, when it runs it IS Java. So any security tool or framework that you would use with Java can be used with Groovy. There are several Grails plugins that bring popular Java security frameworks and make them easier to use. The two most popular are Spring Security and Shiro (formerly JSecurity) but there are many others. A quick search of the Grails plugin portal (http://grails.org/plugin/home) shows 26 different security related plugins.



That sounds good! Too much in number to choose? Great!


2. GSPs are Groovy Server Pages. They are processed by a Groovy template engine built into Grails. They work very similarly to JSPs but are more flexible and easier to work with. One of the best things about them is that you can create custom tags with a single class file. No TLD, no interfaces to implement, no configuration.


Pretty interesting and attractive


3. Grails depends mostly on convention for configuration. Ultimately it still uses web.xml but it builds it for you based on conventions, while giving you the ability to control it directly if needed.


A change to be welcomed! Can you please elaborate a bit on the part of 'ability to control it direclty if needed' ?


4. Grails includes both unit and integration testing "out of the box", with classes that extend the JUnit classes. Unit tests run in isolation and consequently don't have any of the Grails runtime mojo. Though the Grails testing classes provide a bunch of helpful methods to allow mocking of things like GORM (Grails Object Relational Mapping). Integration test include all the dynamic goodness that Grails provides, but run a little slower. There are also plugins available for several different forms of functional testing (Webtest, Selenium, GFunc, and more).



Of course, JUnit should be the first one as Groovy runs on Java! But the interesting aspect is the running in isolation and consequent mode! Thanks for the replies Dave!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Grails - A Quick Start Guide - Questions