View Full Version : How to create a global class instance, data store or variable

17-10-2013, 04:36 PM
So this is potentially a rather generic question, and I guess I am really asking about best practice in the hope that I will generally improve my style.

So I started playing around with grails trying to write a simple app that loads some data from a google spreadsheet, more specifically reading Company and Name from one sheet and last actions and next action from another one. I wanted to use google spreadsheet because it makes my life simpler the other end.

Problem is, where is a good place to store global variables. At first I thought I could potentially create some kind of global class, but that may not be the worlds easiest tasks. The type of values are the specifics for the user (company name, which CSS to use, what logo to show) and following the google authentication and callback, the session key. Is there some global data store or even session specific data store I can use for that type?