官术网_书友最值得收藏!

DSLs and generators

DSLs and generators can be a point of hot debate among infrastructure coders. Some love them, some hate them. Some of the reasons why people love them include the following:

  • They allow CloudFormation to be written in a language that is more native to them or their team.
  • They allow the use some advanced programming constructs. Iteration is a particularly well-cited example.
  • Until YAML was supported by CloudFormation, using a DSL usually resulted in code that was easier to read and far less verbose.

Some of the reasons people dislike them are:

  • DSLs have a history of becoming abandonware or significantly lagging behind CloudFormation, although there are a couple of well-supported DSLs out there
  • Developers are potentially required to learn a new language and navigate another new set of documentation, on top of learning CloudFormation and navigating the AWS documentation
  • Google and Stack Overflow become a little less useful because one needs to translate questions and answers

Beyond what is written here, this topic won't come up again in this book. We can't give specific advice as to which road you should take because it's almost always a highly personal and situational choice. However, a sensible approach, especially while coming to grips with AWS and CloudFormation, would be to stick with YAML (or JSON) until you get to the point where you think a DSL or generator might be useful.

主站蜘蛛池模板: 安康市| 贵南县| 砚山县| 澄迈县| 迁安市| 兰溪市| 古丈县| 卫辉市| 开阳县| 磴口县| 南康市| 当涂县| 龙南县| 瑞昌市| 内江市| 酉阳| 辉南县| 永川市| 牟定县| 朝阳区| 井研县| 北京市| 通海县| 桂平市| 桦川县| 伊宁市| 陆河县| 奉贤区| 康马县| 安仁县| 齐齐哈尔市| 安徽省| 安塞县| 天门市| 新绛县| 长顺县| 琼海市| 诏安县| 龙陵县| 乡宁县| 三原县|