Framework / Library API Design (NOT Web API)
Hi everyone,
it appears that these days there are various API Designs (e.g. Fluent) commonly used in Frameworks (e.g. the .NET Core Framework) and 3rd party libraries (such as provided by Nuget Packages etc).
(I am NOT talking about Web APIs!)
I would like to know if there are books or resources on the net where one (such as myself) can learn about the various designs and their pros and cons.
Answers I am looking for primarily:
- What design approaches are there / are commonly used?
- When to use which approach? (Hence what are the pros and cons of each of the possible designs)
- How to design a modern day API that is well designed and "good" to use by others?
But really I just want to try to reach a new level in my software development craftsmanship and therefore I want to learn about API design. But so far it seems there is no one single resource to get all the answers or even get any kind of know-how resources on API design (or I wasn't simply able to find it yet).
3 comments · 70% upvoted · other discussions
Great question. You're talking about design patterns. I don't necessarily have the answer because I'm in the same boat of learning. Hopefully someone more senior than I can chime in with their fav resources. From asking senior devs at work, it usually boils down to experience and practice rather than learning from one single resource.
I find what I do frequently is try to study some of my favorite APIs and mock how they're used in my own. For example, entity framework exposes a few different ways of instantiating a database context. So if I'm designing a class to connect to some remote resource, I'll first look at entity framework and see the different ways it works.
Hummigbird1 [OP] 1 points · Dec 2019
I know what design patterns are and certainly API design does make strong use of various design patterns. But as far as I can see API Design is one more abstraction level above design patterns.
I as well am trying to imitate API design I see but I am wondering why there seems to be no more concrete resource about this topic when it seems to be a rather important topic.
Especially in regards to somehow other developers need to keep up to date on what is obsolete and what is the new current "gold standard" (so to speak).
[deleted] 1 points · Dec 2019
Architectural design. Not the infrastructural design; how the different sub-systems would interconnect and are decoupled are key.
And if I can continue the abstract, that’s the thing people appreciate between different building designs and utility.
One book that studies these architectural patterns is for open source. However, the messaging is that this is an evolutionary process- http://a.co/5BSVwKs