2
votes

I am using the latest version of Grails which is 2.3.2

In my application there are admin and public site. But both share the same User domain class for example.

Here the problems come, I need to have two controllers for admin and customer. Obviously I have two options:

First: I create two controllers with different name: AdminController and CustomerController

Second: I have to different packages which is admin and customer, they both have a UserController under the packages.

My question is which is the best way to achieve my requirements? First or Second? If using second (different package), how can I do that? view or urlmapping? Any example?

1
Should I refer to this link?grails.org/doc/latest/guide/… - ttt

1 Answers

2
votes

You should make two different controller for admin and customer.

If you create Only one Controller with different package, then you always give name with full package name, also it create a hectic in your mind about package. In small application it is possible to take care about packages but in big application its very tough to manage it.