Results 1 to 5 of 5

Thread: [1.0/1.1] What is the advantage of creating a DLL over a normal class?

  1. #1

    Thread Starter
    Hyperactive Member drattansingh's Avatar
    Join Date
    Sep 2005
    Posts
    395

    [1.0/1.1] What is the advantage of creating a DLL over a normal class?

    Hi guys. I just need your opinion. Someone just gave me a DLL that they created to do some encryption. All I have to do is to access 2 methods and I got through with it, it's working.

    However I was wondering, what is the advantage of creating a DLL to simply let the user of this DLL access 2 methods, why not just create a normal class and then simply create an object of that class. I mean I'm thinking of a lot of things I could put in a DLL, I have a lot of class here but then i ask myself, WHY? Why not just leave it as a class, and whenever i want to use it, simply copy the class into the project and create an object out of it.

    So does anyone know what are the real advantages of creating DLLs for functionality that you could use in a normal class?

    - Jennifer

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [1.0/1.1] What is the advantage of creating a DLL over a normal class?

    Reusability, mainly. You can have all the code once, and many projects can use it. It aids maintainability, since you only have to edit one version of the code.

    There are also tricks you can do with DLLs, like making plugin systems.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [1.0/1.1] What is the advantage of creating a DLL over a normal class?

    You have just benefited from one of the benefits.
    Quote Originally Posted by penagate
    Reusability,
    You can share Dlls with other developers.

    Ok, I'll grant you could copy and paste a class to notepad and send it to someone for them to copy and paste into their program, but to me it makes more sense to compile it into a Dll.

  4. #4

    Thread Starter
    Hyperactive Member drattansingh's Avatar
    Join Date
    Sep 2005
    Posts
    395

    Re: [1.0/1.1] What is the advantage of creating a DLL over a normal class?

    Ok I understand. Is code hiding also another advantage of this? The DLL that was sent to me I couldn't view any of the code except for the constructors and methods. Is this another advantage?

    Jennifer

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [1.0/1.1] What is the advantage of creating a DLL over a normal class?

    If you want it to be You're correct, it's compiled so you can't see the original code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width