Last post Nov 06, 2009 06:47 AM by alaa9jo
Nov 04, 2009 06:11 AM|aspnetiano|LINK
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.
Nov 04, 2009 08:02 AM|rtpHarry|LINK
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.
Nov 04, 2009 08:03 AMfirstname.lastname@example.org|LINK
You can very well create a seperate dll (Class Library) in .NET and reference those in Web Application.
Nov 04, 2009 09:25 AM|aspnetiano|LINK
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!!
Nov 04, 2009 09:54 AM|alaa9jo|LINK
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..
Nov 04, 2009 10:04 AM|aspnetiano|LINK
So its the same solution called with different names.
Thank you I'll use a dll.
Nov 06, 2009 05:12 AM|xlncaman|LINK
thts really coool !!!!
Nov 06, 2009 06:47 AM|alaa9jo|LINK
yeah it's coool,and above all..non of the posts were marked as an answer!!!