Mine
←Older revision | Revision as of 05:56, 27 August 2012 | ||
Line 11: | Line 11: | ||
The other way to look at an [[API]] is from the point of its maintainer. For us, those who maintain some [[API]], this is the view through our own eyes. This is view is our daily bread. This is the view we get when we design our [[API]]s, document them, maintain them. As this is what we do day be day, we may start to believe that this is the most common view, that this is the most important one. | The other way to look at an [[API]] is from the point of its maintainer. For us, those who maintain some [[API]], this is the view through our own eyes. This is view is our daily bread. This is the view we get when we design our [[API]]s, document them, maintain them. As this is what we do day be day, we may start to believe that this is the most common view, that this is the most important one. | ||
- | Indeed, as regular human beings, we'd like to see beauty around us. We want to feel more happy by writing nicer code. However keep in mind there is just one maintainer of an [[API]] and many users. As such when you need to decide whether make life simpler for us, or for our users, it should be a simple choice. This is actually the point of view presented in [[TheAPIBook]] and this is the reason why I often suggest that ''beauty does not matter'' - it does, but not the situation where an [[API]] maintainer refuses to simplify life of its [[API]] users because it would make his own code ''ugly''. | + | Indeed, as regular human beings, we'd like to see beauty around us. We want to feel more happy by writing nicer code. However keep in mind there is just one maintainer of an [[API]] and many users. As such when you need to decide whether make life simpler for us, or for our users, it should be a simple choice. This is actually the point of view presented in [[TheAPIBook]] and this is the reason why I often suggest that ''beauty does not matter'' - it does, but not in the situation where an [[API]] maintainer refuses to simplify life of its [[API]] users because it would make his own code ''ugly''. |
Good [[API]] is a facade over the internals of the [[API]] implementation. A nice facade can [[Cluelessness|cluelessly]] hide all the mess and ugliness visible to the maintainer. It is just necessary to have maintainers willing to sacrifice, giving up on own desire to have ''beautiful'' code and not giving up on writing ''correct'' and ''reliable'' code. Because, beware, abstractions leak over facade. And as soon as unmaintainability leaks, even your users will not be able to write beautiful code. Which, obviously, can make them feel unhappy when struggling with the [[API]]. | Good [[API]] is a facade over the internals of the [[API]] implementation. A nice facade can [[Cluelessness|cluelessly]] hide all the mess and ugliness visible to the maintainer. It is just necessary to have maintainers willing to sacrifice, giving up on own desire to have ''beautiful'' code and not giving up on writing ''correct'' and ''reliable'' code. Because, beware, abstractions leak over facade. And as soon as unmaintainability leaks, even your users will not be able to write beautiful code. Which, obviously, can make them feel unhappy when struggling with the [[API]]. |