views:

99

answers:

3

I've gotten to the point where I have made a few classes that I have found to be rather useful for a variety of different projects, they're either extensions of the already existing .Net ones or something entirely new.

Although I may not use them for EVERY project I would most certainly use them again at some point, my questions is what is the best way to keep these stored?

I was thinking about compiling them into a .dll that I can simply reference if necessary but at the moment there are only about 4 different classes, I've always thought that a .dll is more suited towards a larger amount of classes.

Would it just be simpler to store them somewhere in the cloud so I can access them from pretty much any computer?

What has worked best for you?

Edit: I'll be using more than one computer as I sometimes use the university computer facilities.

The classes range from memory management helper classes in XNA to niche functions in regular .Net/C#

+1  A: 

Are these classes in any way related? If you want to use one of them, do you need the others? If not, then those don't belong in a common package together.

Robert C. Martin provides some decent introduction in the chapter "Principles of Package and Component Design" of his book "Agile Software Development". There is also a C# adapted version with very similar content called "Agile Principles, Patterns and Practices in C#".

What I'm just saying is, packaging components is not only about thinking components X and Y are "cool enough" to be reused, but also about how you organize things and how well libraries or packages fit into the big picture.

Jim Brissom
I understand about the organisational sides of things, I'll more than likely have multiple ways to solve a given solution or multiple classes for a particular framework (XNA). Would it be wise to perhaps compile different .dll's for the different uses they have? Such as one for my XNA work and one for my other C# projects?
Jamie Keeling
A: 

You could compile them as a DLL and install them to the GAC. Then you can reference the DLLs from any project you need, just like any native C# library.

And I agree with Jim Brissom. Compile only the classes that go together as one assembly.

Joel
I get the impression that this is only suitable for one computer, or am I reading it wrong? I'll be using different computers as I am at university.
Jamie Keeling
I really wouldn't put anything in the GAC unless you love versioning nightmares.
GraemeF
+1  A: 

If the classes don't fit together naturally as an assembly, keep the source files somewhere like Github and include them in your projects where needed. You can always rearrange them into components at a later date, when you feel it's worthwhile.

GraemeF