多个DLL与单个DLL [英] Multiple DLL's Vs Single DLL

查看:88
本文介绍了多个DLL与单个DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们计划设计一个包含5个模块的项目.作为一名即将到来的开发人员,我不知道如何设计一个项目以及它在大型公司中如何发生.

我想用很多不. DLL的类很少.这是设计的更好方法,还是我应该使用具有更多类的少数DLL?

具有多个类的一个dll或具有较少类的更多dll,它们的性能更好.

建议我,书籍或pdf,以了解现实世界中的项目设计方案.

请帮帮我..

谢谢大家.

S.V. Hyd

Hi ,

we planning to design a project which has 5 modules.As an upcoming developer,i don''t know how to design a project and how exactly it happens in big scale companies.

I would like to use many no. of dll''s with few classes.Is this better way of designing or shall i go with few dll with more classes.

One dll with many classes or more dll''s with fewer classes,which performs better.

Suggest me,books or pdf to learn real world project design scenario.

Please help me..

Thanking you all.

S.V.Hyd

推荐答案

这取决于您要对dll进行的处理.
假设您为您的项目创建了一个自定义控件,并想在其他项目中重复使用它.在这种情况下,您将创建一个包含自定义控件的dll.现在,在其他项目中,您只需引用您的dll,您就可以开始使用了.如果您没有超出控制范围,则必须引用整个不同的项目,这似乎不是一个好主意.
因此,基本上,所需的dll数量取决于要在其他项目中使用的代码量.

这里有一些有关良好设计的文章 [
That depends on what you want to do with your dll''s.
Let''s say you create a custom control for your project and want to re-use it in different projects. In this case you would create a dll which contains your custom control. Now in your other projects you simply have to reference your dll and you''re set to go. If you didn''t make a dll out of your control you''d have to reference the entire different project, which does not seem like a good idea.
So basically the amount of dll''s you need depends upon how much of your code you want to use in other projects.

Here are some articles on good design[^]. The first five are all about SOLID principles. The remainder is about how to structure your dll''s (or at least one way to do it). Hope it helps.


通常,类是按功能或用途分组的.很多时候,一个dll就足够了.我唯一的多个dll是代码是第三方库还是代码在多个程序集中共享.
Usually, classes are grouped by functionality or purpose. Many times a single dll will suffice. The only time I have multiple dlls is if the code is a 3rd party library or if the code is shared among several assemblies.


这篇关于多个DLL与单个DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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