Answer the question
In order to leave comments, you need to log in
Is it worth spending time on a self-written client / sdk for some (rest) api?
Recently, I found some libraries for different api services, for example: for working with api twitter, their website lists a whole list for various languages. I saw a couple of videos how people implemented self-written sdk. I myself recently decided to write an sdk for a project for one little-known service and realized that it is quite difficult to cover a couple of dozen api methods, and even keep them up to date. The most, for me, causing vague doubts is that you just write wrappers for http requests so that you can easily implement them in the OOP style. Basically all the code is a boilerplate.
I recently learned that some tools, such as swagger or grpc / rpc, allow you to automatically generate a client in just one command. Compared to one library-sdk, which has been being finalized on github for 7 years already, it seems a little faster)
In general, I would be very grateful if you could explain whether automatic generation has any disadvantages, and what are the advantages of self-written tools? Thank you.
Answer the question
In order to leave comments, you need to log in
The main disadvantage of code generators is that they think for you. On typical tasks, everything is fine, but "suddenly" MS changed the mechanism for obtaining a token, and you are in front of a broken trough. From personal experience.
Are there any downsides to automatic generation?In addition to what was voiced, there is still a problem with the fact that the generated code is usually difficult to read.
what are the advantages of self-written tools?So it all depends on the developer. For example, there are usually tests, usage examples, +/- understandable code, maybe someone else will work with you on the project, this is unlikely to happen with auto-generation. But in general, people do not often need a full-fledged sdk, so many people can just file a couple of their functions to interact with the service.
Compared to one library-sdk, which has been being finalized on github for 7 years
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question