Where is the best place to store application parameters : database, file, code…?

后端 未结 5 1659
礼貌的吻别
礼貌的吻别 2021-01-03 10:24

I am developing a Ruby on Rails website and I have an \"architectural\" question : my application needs some parameters and I\'m wondering where to store them.

In co

5条回答
  •  遥遥无期
    2021-01-03 11:06

    I am not using Ruby but I will tell you that I started out (in ASP.NET) placing lots of settings in a Web.Config file (similar to a YAML). As time went on, though, the system evolved to the point where different instances needed different settings. So, almost all of them have migrated to the database. So...if you'll be deploying multiple instances of your site, I'd strongly recommend keeping settings in a table of your database (mine has just one record, with fields for various settings). If I had done this to start, I'd have saved a significant amount of time.

提交回复
热议问题