R2API icon indicating copy to clipboard operation
R2API copied to clipboard

It's API's all the way down.

Open paddywaan opened this issue 4 years ago • 4 comments

image image

Please name things a little less vaguely. Make use of verbs to describe behaviours of modules/libraries instead of calling everything an API. Pretty sure a conclusion was already reached by just formalising the issue for the sake of it.

Requires breaking changes to address.

paddywaan avatar Dec 27 '20 22:12 paddywaan

~~https://github.com/risk-of-thunder/R2API/projects/3~~

harbingerofme avatar Dec 27 '20 23:12 harbingerofme

We'd like help thinking about this issue!

harbingerofme avatar Apr 03 '21 21:04 harbingerofme

Something we have going on over in valheim is a merger between three libraries. One lib which we decided to base from had a structure such that Manager interfaces provided singletons to provide a standardised way to interact with collections via the means of abstraction layers of Entities such as CustomItem, CustomRecipe.. so on and so forth. Food for thought.

paddywaan avatar Apr 04 '21 06:04 paddywaan

You could put explicit design patterns in the names of each API structure.

Another idea could be to organise by what the APIs are trying to accomplish, for instance ItemAPI could be doing any of adding items, changing existing items, changing how items relate to another, changing how items display, etc. which could have APIs with narrower scopes but at the same level: CustomItem, VanillaItem, ItemLinking, ItemDisplay

AndreLouisIssa avatar Jun 07 '22 07:06 AndreLouisIssa

Is this even an issue with split assemblies anymore? sure we cant rename the submodules because that'd be a breaking change, but since each submodule is its own thing there's less reason to suffix everything with API

Nebby1999 avatar Dec 30 '22 16:12 Nebby1999

This issue was never a valid issue to begin with, you can only change such things when doing big refactoring breaking change, which will definitely not happen right now nor in the future due to such change being a preference / personal choice to begin with

xiaoxiao921 avatar Dec 30 '22 17:12 xiaoxiao921