Quantcast

Maximum PC

It is currently Thu Aug 21, 2014 7:02 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: c# libraries question
PostPosted: Wed Aug 31, 2011 3:24 pm 
Little Foot
Little Foot

Joined: Tue Apr 22, 2008 9:24 am
Posts: 126
Say for instance, you have your own personal library of your own code you like to re-use. If one uses their own code in their own personal library, do they have to then bundle that library with the application when they are finished in order for the application to work? or do people just do a cut and paste job from their library into a seperate library for said application?

Is it more common for professional developers to have one giant library they use very often? Or lots of tiny specialized libraries?


Top
  Profile  
 
 Post subject: Re: c# libraries question
PostPosted: Thu Sep 01, 2011 8:12 am 
Bitchin' Fast 3D Z8000
Bitchin' Fast 3D Z8000
User avatar

Joined: Mon Jun 14, 2004 4:04 pm
Posts: 985
Location: Earth
xs0u1x wrote:
Say for instance, you have your own personal library of your own code you like to re-use. If one uses their own code in their own personal library, do they have to then bundle that library with the application when they are finished in order for the application to work? or do people just do a cut and paste job from their library into a seperate library for said application?

Is it more common for professional developers to have one giant library they use very often? Or lots of tiny specialized libraries?



You'll need to bundle the assembly in your application. Never, ever, ever, ever cut/paste your code from one project to another. Keep your library in its own solution. If you must, either add the project into the solution you're working on or compile your library and reference the assembly. The first way is more efficient because it generates the assembly for you. However, if you don't want someone else touching your library and making mods to it (open/closed principle), bundle the assembly rather than the project. You'll need to have the assembly (DLL) regardless.

Is it more common to have one big library rather than a tiny one? That answer depends wholly on what you're coding. I have one library I use for everything: it carries my utility extensions, I use it for Active Directory searches and a bunch of other things. It's in one assembly. I could have bundled it in multiple assemblies but I hate managing multiple dependencies in the same project. However, I develop mostly WinForms and ASP.NET, where I have more room to play with in terms of computing resources. If I were go to mobile, I'd start partitioning the assembly into smaller ones so as to use only the ones that I need. Less assemblies, small application size thus leaner application.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group