Using dll in a Web Page?

Rate It (1)

Last post 11-06-2009 6:47 AM by alaa9jo. 7 replies.

Sort Posts:

  • Using dll in a Web Page?

    11-04-2009, 6:11 AM
    • Member
      14 point Member
    • aspnetiano
    • Member since 05-05-2009, 12:26 PM
    • Posts 24

    Hi all.

    I'm thinking about extract some code from my application an do this part in a dll. What do you think about this if the server have a lot of work and how could it do a lowest page?

    The code will be a .cs generic for the application.

    Thank you.

  • Re: Using dll in a Web Page?

    11-04-2009, 8:02 AM
    • All-Star
      36,592 point All-Star
    • rtpHarry
    • Member since 10-01-2006, 12:51 PM
    • Lincoln, England
    • Posts 5,909

    Hi,

    You can create a Class Library project and put your code in there.

    Then you will need to add a project dependency to the main website project so that it copies the assembly (dll) over at compile time.


    This is a good approach to take so that you can separate your concerns and re-use code between projects.

  • Re: Using dll in a Web Page?

    11-04-2009, 8:03 AM

    You can very well create a seperate dll (Class Library) in .NET and reference those in Web Application. 

    Thanks
    Hari
    ---------------------------------------------
    Dont forget to click "Mark as Answer" on the post that helped you.

    My Site
  • Re: Using dll in a Web Page?

    11-04-2009, 9:25 AM
    • Member
      14 point Member
    • aspnetiano
    • Member since 05-05-2009, 12:26 PM
    • Posts 24

    I don't know if the first reply is the same that the second because both may have a class but I think that the way that page use the code is different so. Which one is the faster solution?

    There is any difference instead of the way of using the code in the page?


    Thank you very much!!


  • Re: Using dll in a Web Page?

    11-04-2009, 9:54 AM
    Answer
    • Contributor
      6,454 point Contributor
    • alaa9jo
    • Member since 07-01-2009, 9:17 AM
    • Jordan
    • Posts 1,179

    Which one is faster? Both are the same because both are compiled but in case you used a class (not in a  dll) and publish the site,it's code and other pages's code are all compiled into multible dlls. So from performance perspective you will never notice a difference,but from other perspectives..there are many advanteges of using a separate dll for your class:

    1)Re-usability:If you intend to use a specific code in multible places/projects,a separate dll is the best choice

    2)Maintainability: If you want to fix a bug/update code inside your classes ONLY(you didn't make changes that may effect any page's code),dll is the best choice since all you have to do is to replace the dll and that's it.Imagine if you didn't make a dll for your class,you will have to publish the whole website..;)

    I only mentioned two of the most important things,there are also security and other advantages..


    Best Regards,
    Ala'a Alnajjar
    ----------------------------------------------------
    Please remember to click “Mark as Answer” on the post(s) that help(s) you even if they were for the same person.
    Also remember to close the thread by selecting “Resolved”,you will find it in your first post.

    Convert C# to VB.net and visa versus

    My Webblog
  • Re: Using dll in a Web Page?

    11-04-2009, 10:04 AM
    • Member
      14 point Member
    • aspnetiano
    • Member since 05-05-2009, 12:26 PM
    • Posts 24

    So its the same solution called with different names.

    Thank you I'll use a dll.

  • Re: Using dll in a Web Page?

    11-06-2009, 5:12 AM
    • Member
      2 point Member
    • xlncaman
    • Member since 04-04-2008, 12:56 PM
    • Posts 1

    thts really coool !!!!

  • Re: Using dll in a Web Page?

    11-06-2009, 6:47 AM
    • Contributor
      6,454 point Contributor
    • alaa9jo
    • Member since 07-01-2009, 9:17 AM
    • Jordan
    • Posts 1,179

    yeah it's coool,and above all..non of the posts were marked as an answer!!! 

    Best Regards,
    Ala'a Alnajjar
    ----------------------------------------------------
    Please remember to click “Mark as Answer” on the post(s) that help(s) you even if they were for the same person.
    Also remember to close the thread by selecting “Resolved”,you will find it in your first post.

    Convert C# to VB.net and visa versus

    My Webblog
Page 1 of 1 (8 items)