Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLL Guidelines 1

Status
Not open for further replies.

OzDing

Programmer
May 1, 2001
7
AU
Hi,
I have a number of sites, all asp which share code running in IIS5 Windows 200 srvr. Maintaining this code is becoming a chore as I have to reflect the changes in all sites that use it, upload etc. Im converting this common code to a VB Dll so only one change will be needed.

Im looking for guidelines. Currently I have one dll with a number of classes, eg database selects in one class, functions in another, etc. Is it wise to do this, or should I seperate each class into its own dll and have one class reference a class in another dll. Also, does size (kb) matter with the dll on the web server as many sites=many users=many instances of the dll.
Thanks, Simon
 
You can really do this any way that you want to. It's a question of design preference....

Usually, a good key to go by is:

"Do all these routines have something in common? Do they work together? Functionally and logically, does it make sense to put them all into one dll?"

A dll is compiled code, and so is going to run fast no matter what you do with it -- you call the methods you need to call, and that's all that's loaded into memory, so from a performance standpoint, I don't think you're going to see much difference one way or the other, but from a "good programming practice" point of view, does it make sense to put them into one dll?

Sometimes, I try designing stuff from a standpoint of selling it as a component, even though everything I do is for my company. That might help you make the decision. Just break it into logical parts, if needed.

hope that helps. :)
Paul Prewett
penny.gif
penny.gif
 
One good way is to use a tiered architecture, combine all your database calls into its own 'Data' Dll, all you business logic into its own 'Business' dll and all the GUI code into another. If you do it this way when you want to change just the look of the site you only need to update the GUI dll etc etc. Remember to set binary compatability on your Dlls as every time you recompile a dll the GUID for that dll will change.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top