←Older revision | Revision as of 13:29, 7 May 2019 | ||
Line 3: | Line 3: | ||
In case of [[modular library]] the [[proximity]] of the [[API]] designer and the implementers is almost the same as the [[proximity]] of the [[API]] designer and the [[ClientAPI|users of the API]]. This requires the [[API]] vendor to prepare [[evolution]] plan for both - the [[ClientAPI]] as well as [[ProviderAPI]]. | In case of [[modular library]] the [[proximity]] of the [[API]] designer and the implementers is almost the same as the [[proximity]] of the [[API]] designer and the [[ClientAPI|users of the API]]. This requires the [[API]] vendor to prepare [[evolution]] plan for both - the [[ClientAPI]] as well as [[ProviderAPI]]. | ||
- | As my discussion at [[OSGiCon]] revealed, people facing this situation realize the difference between the [[Modular library|Many to Many]] and [[Vendor library|One to Many]] and [[Semantic versioning|Few to Many]] cases. However, without having [[experience]] with the [[Modular library|Many to Many]] case, they fallback to most obvious solution: Use of [[abstract class]] | + | As my discussion at [[OSGiCon]] revealed, people facing this situation realize the difference between the [[Modular library|Many to Many]] and [[Vendor library|One to Many]] and [[Semantic versioning|Few to Many]] cases. However, without having [[experience]] with the [[Modular library|Many to Many]] case, they fallback to most obvious solution: Use of [[abstract class]]es (or these days interfaces with [[DefaultMethods]]). While extending [[abstract class]]es with new methods is definitely more compatible than [[final interface|extending interfaces]], it can never be 100% safe. The safest solution is to [[APIvsSPI|separate API for clients and providers]] (taken to extreme, while demonstrating all benefits, in the extensible [[visitor]] case). |
Weak [[proximity]] changes everything. An [[API]] designer can simplify its life by claiming all [[ProviderAPI|providers]] are [[proximity|close]]. However sometimes there is just no way around than to admit they are [[proximity|distant]]. Then the best thing to do is to accept the design style suitable for [[modular library]]. | Weak [[proximity]] changes everything. An [[API]] designer can simplify its life by claiming all [[ProviderAPI|providers]] are [[proximity|close]]. However sometimes there is just no way around than to admit they are [[proximity|distant]]. Then the best thing to do is to accept the design style suitable for [[modular library]]. |