T4 vs CodeDom vs奥斯陆 [英] T4 vs CodeDom vs Oslo

查看:127
本文介绍了T4 vs CodeDom vs奥斯陆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我正在工作的应用程序脚手架项目中,我试图确定是否使用奥斯陆 T4 CodeDom 来生成代码.我们的目标是将依赖性降到最低,并根据用户案例来驱动域驱动设计的代码生成.第一步将是根据用户故事创建测试,但是我们希望领域专家能够在各种不同的媒体(例如自定义应用,Word等)中编写他们的故事,并且仍然能够从用户故事中生成测试.故事.

In an application scaffolding project on which I'm working, I'm trying to decide whether to use Oslo, T4 or CodeDom for generating code. Our goals are to keep dependencies to a minimum and drive code generation for a domain driven design from user stories. The first step will be to create the tests from the user stories, but we want the domain experts to be able to write their stories in a variety of different media (e.g. custom app, Word, etc.) and still generate the tests from the stories.

到目前为止我所知道的:

What I know so far:

  1. CodeDom需要.NET,但只能输出.NET类文件(例如.cs,.vb).难度很高.
  2. T4需要CodeDom和VS Standard +.难度级别相当合理,尤其是使用 T4工具箱.
  3. 奥斯陆很新.我不知道依赖关系,但我想您必须至少在.NET 3.5上.我也不确定代码生成能力或添加新语法的复杂性.但是,领域专家可能很容易在Intellipad中编写用户故事.同样不确定将Word中的故事转换为MGrammar的难易程度.

使用以上任何一种工具,您的想法,经验等是什么.我们想坚持使用Microsoft或开源工具.

What are your thoughts, experiences, etc. with any of the above tools. We want to stick with Microsoft or open source tools.

推荐答案

选择T4-简单的决定.

Go with T4 - easy decision.

  • 奥斯陆(Oslo)太新了,工具太原始了,无法与仅基于评估的技术相提并论
  • 如果您需要在运行时生成CLR类,并且愿意牺牲对生成的输出的简单修改,则CodeDOM功能强大.
  • T4(带有T4工具包)是易于使用的通用代码生成工具.到目前为止,我唯一遇到的困难是构建时集成.

这篇关于T4 vs CodeDom vs奥斯陆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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