Live data from Hacker News

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

github.com

11–20 of 76 posts

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

#12

Am I right in thinking about this like a WSDL, but based on JSON?

Being a WSDL is not the aim here. Generating client libraries in multiple programming languages is.

But, to do that I need a format using which people can define their API. I used JSON and only supported the elements that I needed to generate the client libraries.

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

#14

Am I right in thinking about this like a WSDL, but based on JSON?

Being a WSDL is not the aim here. Generating client libraries in multiple programming languages is. But, to do that I need a format using which people can define their API. I used JSON and only supported the elements that I needed to generate the client libraries.

Right, the format affords generic description documents from which to generate client code. This seems very similar in spirit to WSDL. No?

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

#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 appears, but I think it's great for quick projects.

[0] http://thrift.apache.org/

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

#16
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.

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

#17
So, this is markedly similar to the project I've been working on in grad school, only without static typing. http://research.cs.vt.edu/vtspaces/realtimeweb/ Also, mine is explicitly geared towards education purposes. I'm about one third of the way thru version two, but I wonder if we can cross pollinate our code bases to get something even better.
Post reply on HN