Discussion Locked

Creating and using DLLs

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

This week's Visual Basic newsletter talks about the advantages of creating and using Dynamic Link Libraries (DLLs). Do you create and use DLLs in your development work? If not, will you after reading this tip? Can you think of any other advantages to using DLLs? Let us know.

If you aren't subscribed to our free Visual Basic newsletter, click the following link to automatically sign up:
http://nl.com.com/MiniFormHandler?brand=builder&subs_channel=bldr_front_door&list_id=e065&tag=fb

4 replies

by jserdy

Peter Aitken asserts in his 'Advantages of creating and using DLLs' article in the Oct 22 2004 Visual Basic at Builder.Com newsletter that it is better to use DLLs in Active Server Pages because DLLs don't expose source code. I think it's important to point out that ASP page code is not exposed to the site visitor either, the page is compiled and only outputs the HTML that the ASP code produces. You would need web administrator access to view the actual ASP code.

From my experience, DLLs are inconvenient to code maintenance. If you only ever had to write and deploy code once they would do just fine. But to revise/correct/upgrade DLLs, they need to be recompiled, installed and registered on the web server, and then IIS needs to be restarted. In a multiple server environment this is rather inconvenient. By contrast, the equivalent ASP code can be replaced on the fly without requiring an IIS restart.

by chriskfau

DLLs are not easy to maintain in an ASP environment. This get even worse when the DDL documentations were poorly written, and that's always the case with developers who were not good documentators.

I suggest to keep a DLL as simple as possible, where it performs only a single task and that's all. Having many objects in a DLL may complicates troubleshooting.

Proper documentation of a DLL is important and cannot be ignore.

by gaston nusimovich

Dynamic Link Libraries have another important advantage that rises from this "dynamic link" nature. In a multi-tasking OS like Windows, is very frequent that users launch and use two or more applications at the same time.

Some of these applications may use common routines. If these common routines are contained in a DLL, that block of code is loaded in memory only once and in one common block of memory, with all the applications linking dynamically to the initial address of that block of memory.

Besides to this, any installer checks if any of the DLLs that it has to install are installed already (it checks for version compatibility), and if that is the case, it doesn't install that DLL twice.

by maryweilage

In the newsletter, there are several instances that reference "DDL"; those should have read DLL. I apologize if this caused any confusion.

Thank you,
Mary Weilage
Newsletter Editor

This discussion is closed to new replies.