Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you write good highly useful general purpose libraries?

Tags:

api

I asked this question about Microsoft .NET Libraries and the complexity of its source code. From what I'm reading, writing general purpose libraries and writing applications can be two different things. When writing libraries, you have to think about the client who could literally be everyone (supposing I release the library for use in the general public).

What kind of practices or theories or techniques are useful when learning to write libraries? Where do you learn to write code like the one in the .NET library? This looks like a "black art" which I don't know too much about.

like image 562
danmine Avatar asked Nov 27 '22 06:11

danmine


1 Answers

That's a pretty subjective question, but here's on objective answer. The Framework Design Guidelines book (be sure to get the 2nd edition) is a very good book about how to write effective class libraries. The content is very good and the often dissenting annotations are thought-provoking. Every shop should have a copy of this book available.

like image 198
rp. Avatar answered Dec 23 '22 20:12

rp.