功能切换到功能分支 [英] Feature Toggles vs Feature Branches

查看:204
本文介绍了功能切换到功能分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是功能切换和功能分支,它们之间有什么区别?



有什么优点和缺点?为什么一个比另一个更好?



我在Google上发现了一些关于这方面的文章,我倾向于在功能切换阵营,但我不是

解决方案

功能切换是连续积分/连续的一部分交付链(敏捷/看板项目方法)。基本上,您在关闭状态下向生产发送新功能,然后在管理控制台中打开功能(如果您发现其已损坏,则关闭)。



特征分支(可以是)发布方法的一部分,并集成到持续集成链中。你可以是树干稳定/树干不稳定。如果您的树干稳定,您可以在功能分支中开发,部署到分支到dev / qa,获得认证,将功能分支合并到中继,然后将中继推到SIT / UAT / PROD环境。



每个都有优点和缺点作为发布方法。特征切换需要非常严格的规则,因为破损/黑暗代码正在使其生产。 (Chef / Puppet / cfengine等)(谷歌,Facebook,Linkedin,WordPress都部署到使用功能切换和系统自动化的生产环境) / p>

这里是正确完成功能切换的先决条件:持续交付/部署,持续集成,自动化单元测试,自动化集成测试,自动应力/性能测试,系统自动化。如果没有,请考虑一个更简单的发布策略(即功能分支)


What are "Feature Toggles" and "Feature Branches" and what's the difference between them?

What are the pros and cons? Why is one better than the other?

I found some articles on Google regarding this, and I tend to be in the "Feature Toggles" camp, but I'm not convinced that "Feature Toggles" is the better choice in all the cases.

解决方案

Feature Toggles are part of a Continuous Integration/Continuous Delivery chain (Agile/kanban Project Methodology). Basically, you send new features to production in the off state, then in an admin console turn the feature on (or off if you discover its broke).

Feature Branches (can be) part of a Release methodology and integrated into a continuous integration chain. You can be trunk stable/trunk unstable. If you are trunk stable, you develop in a feature branch, deploy that to branch to dev/qa, get certification, merge the feature branch to trunk, then push trunk to SIT/UAT/PROD environments.

Each has pros and cons as release Methodology goes. Feature toggling requires very strict discipline as broke/dark code is making it to production. Great for startups and shops where management knows how to pull this off and have System Automation in place.(Chef/Puppet/cfengine, etc)(Google, Facebook, Linkedin, WordPress all deploy to Production environments using feature toggling and System Automation)

Here are the pre-requisite "techs" to do Feature Toggling properly: Continuous Delivery/Deployment, Continuous Integration, Automated Unit Testing, Automated Integration Testing, Automated Stress/Performance Testing,System Automation. if not, consider a simpler release strategy (i.e., Feature branching)

这篇关于功能切换到功能分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆