What is the best practice to wrap up functions into dll for windows desktop application?
Is there any resources that how to create windows application, especially for how to design the dll to wrap up the api calls or the similar?
It seems that people don't compile the entire project into a single exe for release and what is the best practice to architect the windows application component bas开发者_StackOverflow中文版ed on MVC pattern?
Is the dll used for share the common api between different application (.exe file) ?
Is there any resources or any good book on this topic?
I appreciate if anyone can shed some light on.
You can read general overviews on dynamic link libraries (DLLs) on MSDN or Wikipedia or numerous other sites on the web. Some important uses/benefits of dynamic libraries include:
- Sharing common functionality between different applications/modules without duplicating the code
- Exposing APIs to other applications or programmers through a programmatic interface
- Breaking an application's code into smaller chunks for possible load-time/run-time performance gain (e.g. lazily loading infrequently used modules)
- Increasing granularity of application patches / service packs, etc.
- Providing a late-binding mechanism for conecting an application with the APIs that it uses, improving potential for cross-version compatibility and separate implementations of an API set
The best approach for factoring an application's binary modules varies widely, depending on the specific situation. Sometimes you can start by placing all code of an application in the same binary and, over time, identifying commonly useful bits and moving them out into DLLs. In other situations, it may be more clearly apparent up front how to slice and dice your application into a handful of libraries.
精彩评论