• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Grails - A Quick Start Guide - Questions

 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
author
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic