I am currently in a couple of minds about how to organize local and global resources inside an ASP.NET MVC project. My current thinking is to have a global resource file and to separate local resource files by the controller.
I have chosen the controller so that I can group any resources I need for any of the views which use the said controller. If I abstract these resources into a separate assembly I can use these resources in the following ways:
- Normal inside the markup
- With client side code using a handler
- Inside validation attributes
I have read arguments that managing multiple files can lead to duplication of the resources, but I have also seen the same resources being named differently inside the same resource file.
ALso, however number of resource files there are, they will be compiled down into their own dll for that said assembly based on the culture.
I am looking for advice on whether it is a good idea to use many resource files over one global and whether or not grouping these said resources by controller is a good idea.
TIA
Andrew