Best practice for comments above methods in a grails application?

Posted by Travis on Programmers See other posts from Programmers or by Travis
Published on 2013-11-05T10:14:01Z Indexed on 2013/11/05 16:11 UTC
Read the original article Hit count: 195

Filed under:
|
|

I'm writing a grails application and am not sure what the best practice is with regard to comments outside of method blocks. I've done a bit of research and there seems to be conflicting views on how and when these sort of comments should be used.

In lots of source code I have seen there seems to be comments above every method detailing what that method does. I'm not sure if grails should be differnet?

My question is should I have a comment above each method in my controllers, services and domain objects?

i.e

/*
* This method displays the index page
*/
def index(){
render view : "index"
}

© Programmers or respective owner

Related posts about comments

Related posts about groovy