什么是更好的,很多小的组件,或者一个大的组装? [英] What is better, many small assemblies, or one big assembly?

查看:84
本文介绍了什么是更好的,很多小的组件,或者一个大的组装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一切都在标题:)

目前,我们已与20多个projets一个VS2005的解决方案。像

Currently, we have a VS2005 solution with 20+ projets. Like

MySolution
MySolution.Modules.Foo
MySolution.Modules.Bar
[insert many here]
MySolution.Modules.Baz

才会有伤害合并MySolution.Modules。*在一个项目?所有的命名空间将是preserved,因此在这里没有问题。

Can there be a harm to "merge" MySolution.Modules.* in one project ? All namespaces will be preserved, so no problem here.

但是,有什么我也没多想?

But is there anything I didn't think about ?

注:目前,还不能循环引用:如果MySolution.Modules.Foo引用MySolution.Modules.Bar,MySolution.Modules.Bar不能引用MySolution.Modules.Foo。所以,我们必须要小心,不要制造一些。

Note : Currently, there can't be circular references : if MySolution.Modules.Foo references MySolution.Modules.Bar, MySolution.Modules.Bar can't reference MySolution.Modules.Foo. So we'll have to be careful not to create some.

推荐答案

我一直在几家公司有太多的项目中一直以各种方式有疼痛感。我还没有得到任何地方它有太多的几个的项目,虽然这当然是可能的。

I have been in a couple of companies where having far too many projects has been a pain in various ways. I haven't yet been anywhere which had too few projects, although that's certainly possible.

想想一个项目作为回用的单位,除其他事项外。是任何产品将需要美孚但不是吧,还是相反?如果没有,把它们合并起来。

Think about a project as a unit of reuse, amongst other things. Is any product going to need Foo but not Bar, or vice versa? If not, merge them together.

我喜欢让不同层(presentation,业务逻辑,数据存取)分开,这是很好的有一个共同的,与产品无关的工具库,但仅此而已,在许多情况下。

I like to keep different layers (presentation, business logic, data access) apart, and it's nice to have a common, product-agnostic utility library, but that's about it in many cases.

呵呵,并保留当然是测试在不同的项目,以生产code,:)

Oh, and keep tests in a different project to your production code, of course :)

这篇关于什么是更好的,很多小的组件,或者一个大的组装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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