Your application should not have its own folder anymore (and should not use another software hidden folder like .gnome2).
User data should go into $XDG_DATA_HOME (which default to .local/share), user preferences should go into $XDG_CONFIG_HOME (which default to .config) and cached data should go to $XDG_CACHE_HOME (which default to .cache).
Of course, there's no need to read the environment variable yourself : most language provide a library to use XDG folder. For example a patch for a GTK application or one for a python application.
-- Modify your application to use XDG folders - Where is Ploum ?
There's a nice discussion at the linked blog. I disagree with some posters' view that XDG goes against Unix history. I think the spec is well though-out and helps everyone know where to find stuff, which is difficult with a bunch of dot files and directories in $HOME. Is Rhythmbox config in .rhythmbox? No, it's in .gnome2/rhythmbox. Ugh. If you are interested in the details of this spec and how it's evolving, you should join Freedesktop.org's XDG mailing list.
There's a nice discussion at the linked blog. I disagree with some posters' view that XDG goes against Unix history. I think the spec is well though-out and helps everyone know where to find stuff, which is difficult with a bunch of dot files and directories in $HOME. Is Rhythmbox config in .rhythmbox? No, it's in .gnome2/rhythmbox. Ugh. If you are interested in the details of this spec and how it's evolving, you should join Freedesktop.org's XDG mailing list.