Live data from Hacker News

Show HN: Given an API, Generate client libraries in Node, Python, PHP, Ruby

github.com

21–30 of 76 posts

Re: Show HN: Given an API, Generate client libraries in Node, Python, PHP, Ruby

#21

Earlier quoted context omitted.

I tried searching for a program which generates client libraries in different programming languages and failed. Could you please link if something does it? From what I gather, the above mentioned sites only provide methods of describing the API and/or Automating the API on the server side. Nothing is said about client libraries. Thanks

http://thrift.apache.org/

I think that creates an API, then exposes it in numerous languages. This writes wrappers to existing APIs. Not the same thing. (Lots of code similarity under the hood, though.)

Re: Show HN: Given an API, Generate client libraries in Node, Python, PHP, Ruby

#25
Wouldn't it be wiser to choose a hypermedia format for the API, and then use a generic hypermedia client on whichever platform you like? Then you write just as many client libraries (zero), but the problem of pushing updates to your clients is solved as well.

Full disclosure: I wrote such a library for Ruby, called HyperResource. https://github.com/gamache/hyperresource

Re: Show HN: Given an API, Generate client libraries in Node, Python, PHP, Ruby

#27
post #15

Just tried this out and Alpaca is an awesome tool. However, I'd never want to release this in production without tests. Alpaca doesn't generate tests, so you're back to maintaining the tests for your N different platforms/languages. But you'd have the same problem with its competitors, too; Thrift [0], for instance, doesn't generate tests either. Overall, I'm not sure that the time savings is as big as it first appea…

Tests is one of the main priority and I am planning to do them soon. This current program just a small step in the right direction. :) EDIT: Currently, I have a test suite at https://github.com/pksunkara/alpaca/tree/testing which tests the generated client libraries of an example API with the respective server.

That sounds cool! Is there a way to automatically generate BDD style Tests? Have a look at http://funkload.nuxeo.org/intro.html

Re: Show HN: Given an API, Generate client libraries in Node, Python, PHP, Ruby

#28
post #26

Regarding bug reports: > Guaranteed reply within a day. That seems difficult to achieve--wonder how they're doing that? (Also, why??)

I am just a single guy. I always make a point to reply back to issues/pull-requests on my open source projects within 24hrs.

Yes, sometimes I fail to make it. But it's a rule I want to live by.

Re: Show HN: Given an API, Generate client libraries in Node, Python, PHP, Ruby

#29
post #25

Wouldn't it be wiser to choose a hypermedia format for the API, and then use a generic hypermedia client on whichever platform you like? Then you write just as many client libraries (zero), but the problem of pushing updates to your clients is solved as well. Full disclosure: I wrote such a library for Ruby, called HyperResource. https://github.com/gamache/hyperresource

I agree its nice to do it that way. But I found that not all APIs use hypermedia format. So, I did it this way. :)
Post reply on HN