跨平台配置,选项,设置,首选项,默认值 [英] Cross-platform configuration, options, settings, preferences, defaults
问题描述
我对人们对如何在跨平台应用程序中存储首选项和默认设置的意见感兴趣。
I'm interested in peoples' views on how best to store preferences and default settings in cross-platform applications.
我主要在node.js和Perl
I primarily work in node.js and Perl on *nix and Windows but I'm also interested in the bigger picture.
在* nix世界中dotfiles(和目录)在系统范围内非常常见或通常驻留在一个路径中的应用程序默认设置以及主目录中的用户特定设置。这样的文件和dirs以点。开头。并默认从目录列表中隐藏。
In the *nix world "dotfiles" (and directories) are very common with system-wide or application default settings generally residing in one path and user-specific settings in the home directory. Such files and dirs begin with a dot "." and are hidden by default from directory listings.
Windows具有注册表,其中还包含默认路径和每个用户覆盖。
Windows has the registry which also has paths for defaults and per-user overrides.
某些跨平台应用程序以自己的方式进行,Firefox使用JavaScript首选项文件。
Certain cross-platform apps do it their own way, Firefox uses JavaScript preference files.
跨平台应用程序跨平台使用一个系统, dotfiles on * nix和注册表在Windows上?你最喜欢的编程语言有一个库或模块以标准方式访问它们吗?
Should a cross-platform app use one system across platforms or say dotfiles on *nix and registry on Windows? Does your favourite programming language have a library or module for accessing them in a standard way? Is there an emerging best practice or does everybody roll their own?
推荐答案
在DB中存储怎么样?它是群集友好的,一直为我们工作很好。在我上次的工作中,我们曾经将它们存储在目录服务器中。
What about storing in DB? It is cluster-friendly and has been working great for us. In my last job we used to store them in a directory server.
Java以 Preferences API 。
我不是。网友,但我认为他们有用户个人资料。
I am not a .Net guy but I think they have User Profiles.
Python具体讨论:什么是存储python程序设置的官方方式?
Python specific discussion: What's the official way of storing settings for python programs?
Ruby on Rails: Rails:存储用户设置的最佳做法?
Ruby on Rails: Rails: Best practice to store user settings?
这篇关于跨平台配置,选项,设置,首选项,默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!