Im really new to Grails and I am trying to understand how this works. I did some lessons and wrote an example application with mysql database connection. Ive got three tables and therefore three domain classes and three controllers using def scaffold = true. Thus, views are generated automatically. Now I can add and delete and ... data in my tables. It works.
But now I do not know how to proceed. I mean, creating these tables and filling them in is nice, and it's nice that it is possible so quickly, but ... Now I really want to develop an application! I usually work with Spring Framework, Spring Security, Spring MVC, etc. To create web applications. Everything is logical there. I have requests entering the system, mapping to controllers, classes that work with requests, the answers are back, jsps rendered .... logical!
In Grails, I don’t even know where to start for a real application! All the tutorials that I find show the same thing: setting up these tables and being able to fill them out is nice, nice - but after that?
Where can I save "main.gsp". Do I need a controller? How the application is redirected to "main.gsp" at startup.
Where can I define "real logic" - I want to develop something like "questions with several answers - try to choose the right answers" applications. Well, I have to admit, I really don't know where to start. And I do not see the use of controllers and the ability to add data to my tables in my application. Thats for admins, but not for users.
Can someone give me a hint how to proceed? Or maybe someone knows a good tutorial that is not related to “setting up domain classes, scaffold controllers, adding data to your database” - I don’t see that much point.
Thank you for your help!: -)
[EDIT] Thanks for the answers! Services, this is exactly what I was looking for. I guess I just need to know more about this. The textbooks just baffled me, but now I understand better!