DLL文件数 [英] number of DLL files

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

问题描述

你好,

我想知道是否有经验法则或建议为解决方案创建多少个DLL文件?

从性能的角度来看,将解决方案分为各种DLL库的优缺点是什么?

Hi there

I am wondering if there are rules of thumb or suggestions as to how many DLL files should be created for a solution?

What are the advantages / disadvantages to partitioning a solution into various DLL libraries from a performance standpoint?

推荐答案

我从来没有听说过有人遇到任何限制.

将代码划分为程序集有很多(我认为是显而易见的)好处:

0)代码重用-其他应用程序可以使用相同的程序集,从而避免了再次编写代码的麻烦.

1)功能分离(或抽象,如果您更喜欢该术语的话)

2)易于维护,因为您通常可以替换应用程序的一小部分,而不必强迫用户进行完整的更新

我可能还没有想到很多其他好处.
I''ve never heard of anyone running into any kind of limit.

There are a number of (what I see as obvious) benefits to compartmentalizing code into assemblies:

0) Code re-use - other applications can use the same assembly, thus aleviating having to write the code again.

1) Functional separation (or abstraction if your prefer that term)

2) Ease of maintenance because you can often replace a small component of an application without forcing the user to do a complete update

There are probably a lot of other benefits that I haven''t thought of.


对此没有经验法则.

使用dll的原因是,无需共享源代码即可在任何应用程序中使用dll.您可以共享一些功能,并秘密地知道如何做到这一点.但是仍然可以重用某些功能/

您可以更改某些功能,而无需重新编译,也无需重新安装完整的应用程序.大多数更新都是以这种方式提供的.

如果某些功能经常更改,或者不确定将来是否需要更改某些特定功能,则可以将该特定功能放入其自己的dll中.这使得更改,更新和测试变得容易.您只需要测试该dll中更改的功能,因为这是唯一更新的内容.较大的公司喜欢这一点,因为它们否则需要对整个应用程序执行回归测试.

顾名思义,dll也是动态的.您可以在运行时加载应用程序编译时未知的dll.当然,您将需要一些基本规则才能上手,并且还知道是否创建了dll以与您的应用程序一起使用.但是通过这种方式,您可以在应用程序中添加插件功能.通过这种方式,您可以发挥自己的作用,并且还可以使其他开发人员可以扩展应用程序的功能.

因此,没有具体的经验法则.只是不要创建不必要的dll,因为那样会使您自己更难.

祝你好运!
There is no rule of thumb for that.

A reason for using dll''s is that a dll can be used in any application without having to share the source code. You can share some functionality and keep it a secret how you have done that. But it still makes it possible to reuse certain functionality/

You can change some functionality without having to recompile and maybe the need to re-install the complete application. Most updates are supplied in this way.

If some functionality changes rather often or it is uncertain if something specific needs to change in the future, you could put that specific functionality in it''s own dll. This makes it easy to change, update and also easy to test. You would only need to test the functionality changed in that dll because that''s the only thing that was updated. Larger companies love this because they otherwise need to perform a regression test of the complete application.

Like the name says, dll''s are also dynamic. You can load dll''s at runtime that were unknown at compile time of your application. Of course you would need some ground rules to get started and also know if a dll was created to function with your application. But in this way you it is possible to add plug-in capabilities in your application. This way you give yourself, and could also give other developers the possibility to extend the features of the application.

So, there''s is no specific rule of thumb. Simply don''t create unnecessary dll''s because you would simply make it harder on yourself.

Good luck!


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

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