Questions tagged [grails]

Grails is an open source web application framework which uses the Groovy programming language (which is in turn based on the Java platform).

22 questions
30
votes
5 answers

Is Groovy going away?

I am sure this question has been asked many times. However, I like to ask it again with the intention of what is the future of these languages. I was first introduced to Groovy and really liked it. I felt the syntax was simpler and it was much…
Amir Raminfar
  • 402
  • 1
  • 4
  • 8
29
votes
2 answers

When to use def in Groovy?

I have been developing in Groovy for a little while now and I'm wondering how often I should be using the dynamic casting def? A co-worker of mine believes we should use it always as it helps Groovy in some way I don't understand. Currently, when…
PJT
  • 393
  • 1
  • 3
  • 6
12
votes
5 answers

Pitfalls in the Grails Framework

What are some of the biggest issues/pitfalls with using the Grails framework? I'm learning the framework now, and I really like it, but I need to know what major issues I may encounter when using it and how to avoid them.
jmq
  • 6,048
  • 5
  • 28
  • 39
12
votes
1 answer

Migrating a Grails application to Scala Play/Spray

We have a moderately sized Grails web application using GORM/Hibernate over PostgreSQL and GSPs serving HTML, and also a few REST APIs. We are standardising on Scala, and would like to migrate this application to Play or Spray, with Slick to access…
John M
  • 221
  • 1
  • 2
7
votes
2 answers

How difficult would it be to migrate a Struts/JSP application to Groovy?

I have taken over development of a JSP/Struts application. Right now it's a bit of a mess, and I'm finding the JSP pages with Struts tags to be insanely verbose. Has anyone migrated a Struts application to Groovy/Grails? Can it be done…
kevin cline
  • 33,608
  • 3
  • 71
  • 142
7
votes
2 answers

Why Java does not have a framework like Rails?

I am a Ruby on Rails developer and I like its simplicity and rapidness. On the other hand we need to use Java for some projects that we develop for our clients. My question is why (pure) Java does not have a framework like Rails? I searched and…
xaph
  • 187
  • 1
  • 4
6
votes
2 answers

How do I set up a micro-services architecture that can take advantage of a common, centralized security service?

I've obviously heard a lot about the Micro-Services Architecture and think it makes a lot of sense (especially with the success stories of Netflix). I'd like to implement a small Grails application in Micro-Services (although the framework doesn't…
5
votes
2 answers

What is it called when you test a microservice by mocking the dependencies?

I've a RESTFul microservice written in Grails. This microservice has it's own DB. It also depends on two other microservices. A typical workflow of the service is: Receives a GET request from a client e.g. browser Calls another microservice through…
Nayan
  • 169
  • 5
4
votes
3 answers

What class structure allows for a base class and mix/match of subclasses? (Similar to Users w/ roles)

I have a set of base characteristics, and then a number of sub-types. Each instance must be one of the sub-types, but can be multiple sub-types at once. The sub-types of each thing can change. In general, I don't care what subtype I have, but…
cdeszaq
  • 322
  • 1
  • 13
2
votes
4 answers

What's the alternative to DRY code when it requires too many parameters?

What is the best strategy for maintaining easy to follow code when keeping things DRY means you have to pass a lot of parameters to shared functions? In my specific case, I have a grails based app, and have implemented a system where to reference…
Dave
  • 131
  • 4
2
votes
1 answer

Dropping database in Grails is too easy. How to prevent accidental drops?

I just dropped production database. It happened because I used dbCreate = "create" instead of "update" in DataSource.groovy. I was changing some domain models and wanted to update the database. dbCreate value was empty string (""), and I…
Uros K
  • 123
  • 4
2
votes
1 answer

Moving business logic from services to classes?

I have a Grails application with a number of services that are starting to get very large. The flow in the majority of my service methods is Database read (Returns DBCursor from MongoDB) Iterate through the cursor and perform some…
Travis
  • 135
  • 5
2
votes
1 answer

Should the domain model include all the domain entities in my project?

I have currently reading Grails and I love it. In order to get hands on experience with Grails I decided to create a web application for some Management System. Ya as you can guess there are plenty of entities that goes into the domain model for my…
Ant's
  • 732
  • 6
  • 17
1
vote
1 answer

Does Groovy/Grails have code completion/pre-runtime error detection/find refrences like Java?

I have been using Java for a while and PHP recently. Some things I miss from Java is Code completion suggestions from the IDE Error detection before runtime Find places where a method/function is called While these seem like IDE features, from…
Can't Tell
  • 1,151
  • 1
  • 10
  • 21
1
vote
1 answer

Best practice for comments above methods in a grails application?

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…
Travis
  • 135
  • 5
1
2