Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when to use multiple class libraries?

When should I use multiple class libraries in .NET. I have a situation where I need to use the functionalities of Microsoft Office Object Model to check certain attributes of Microsoft Office files. Should I use different class libraries to process different file types.

eg:- 1 library for word files, 
     1 library for ppt, 
     so on.

Or should I stuff everything into a single class library.

What are the question that i should to self before going to build multiple class libraries.

like image 298
logeeks Avatar asked Mar 17 '11 18:03

logeeks


1 Answers

Think about your consumers: If somebody might want to use the library for word files without the extra overhead of having all the other libraries, then separate them. If not, don't.

That said, keep in mind that separate assemblies is not necessarily the same as separate projects. You may want to use separate projects for each of these, even if you end up combining them into one big assembly in the end (see Single assembly from multiple projects). I've found it to be easier to manage version control on smaller projects.

like image 159
StriplingWarrior Avatar answered Sep 21 '22 23:09

StriplingWarrior