开发者

Tools and techniques for effective use of feature toggles in .NET

开发者 https://www.devze.com 2023-03-27 20:58 出处:网络
I have read a lot about feature toggles but have no practical experience of using them. What tools and techniques do people recommend for effective management of feature toggles?

I have read a lot about feature toggles but have no practical experience of using them. What tools and techniques do people recommend for effective management of feature toggles?

I imagine the simplest way would be to store toggles as true/fal开发者_如何学Cse values in the web.config file as appSettings but this doesn't sound a particularly good method.

Ideally I would like any method of managing feature toggles to:

  • Flag any uses of the toggle on removal. E.g. A compilation error
  • Highlight any old toggles. I.e. A toggle that is still in place after the feature has been released


One suggestion from a colleague is to store them in a .settings file. The advantage of this is that if you delete a toggle you get compiler errors anywhere the toggle has been used so you can be certain it's been completely removed from the code.

It's also possible to use some simple techniques to do feature toggling. It's not big or clever, but it's straight forward and it works.

UPDATE

Since asking this question I've had some more experience using feature toggles. I've looked at a few of the open source tools available and written about another simple database driven toggling mechanism I've used at work.


I'd just use a class with a number of boolean properties and deserialize the values from a config file.

0

精彩评论

暂无评论...
验证码 换一张
取 消