Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Organizing assemblies (assembly structure) in C#

Tags:

c#

.net

Say you are writing an app like Photoshop where you have effects (filters), etc, should one make each of these filters a separate assembly using a separate project?

The main idea is to have each of these filters as nodes, so think of it like:

sourceImage -> Sharpen -> Darken -> Contrast -> Blur ...

It seems to me that it would make sense to have dll files like:

[Filters folder]   
Sharpen.dll  
Darken.dll
Contrast.dll
Blur.dll

But it would be hard to manage them like that, and that would prevent me to use the internal keyword for class members, right?

So right now I only have 1 dll for all filters.

What's the best practices for organizing assemblies?

like image 238
Joan Venge Avatar asked Nov 29 '22 07:11

Joan Venge


1 Answers

I wouldn't restrict yourself to one filter per assembly. You may well want to group assemblies which implement similar functionality - e.g. colour/contrast together, while keeping them separate from very different kinds of filters (e.g. edge enhancing).

Just one bit of anecdotal evidence: I've often seen applications be difficult to manage due to having too many assemblies. I can't remember ever seeing one which had problems because it hadn't split the assemblies up enough. I'm not saying it can't happen - just that I haven't seen it.

like image 87
Jon Skeet Avatar answered Dec 01 '22 20:12

Jon Skeet