Live data from Hacker News

Ask HN: What's the best API you've worked with?

news.ycombinator.com

11–18 of 18 posts

Re: Ask HN: What's the best API you've worked with?

#12

Win32 API

When I saw this I actually laughed. But then I thought about it more. I’m actually inclined to agree with you, for a native API it is quite extensive, well documented, and fairly easy to use. I prefer its verbosity to Unix-style 6-character-long syscalls, though I can see why it made sense at the time it was developed. But it could just Stockholm syndrome after 5 years of use.

It's reliably stable. With a current Mac, running an app that was built 10+ years ago would be a nightmare if not impossible without source. With Windows, I can still run apps from the late 90's with little effort (with the exception of some DirectDraw issues).

Re: Ask HN: What's the best API you've worked with?

#13

Google Guava, Java Collections. Most Java OSS library feels a lot better than NodeJS (been in JS land for more than 5 years and I can count "historically" stable JS library using my left hand)

That's very odd, since I moved from Java to NodeJS and felt the opposite. Especially, building and modifying API in NodeJS is just JSON.parse/stringify, while in Java you need a PhD in DAO.

Re: Ask HN: What's the best API you've worked with?

#15

Google Guava, Java Collections. Most Java OSS library feels a lot better than NodeJS (been in JS land for more than 5 years and I can count "historically" stable JS library using my left hand)

That's very odd, since I moved from Java to NodeJS and felt the opposite. Especially, building and modifying API in NodeJS is just JSON.parse/stringify, while in Java you need a PhD in DAO.

> Especially, building and modifying API in NodeJS is just JSON.parse/stringify, while in Java you need a PhD in DAO.

First of all, I'm talking about OSS library as API not REST endpoint so I believe your statement is totally unrelated to my point.

Second, you don't need a PhD in DAO, it's just one simple pattern.

Third, you have a few options: have your JPA entity converted to JAXB-annotated java-class using Dozer (if it's a straight up mapping, you don't need XML). Or annotate your model with JPA and JAXB. Again, this is only if you use JPA which is heavily geared toward RDBMS. If you followed NodeJS "pattern" which implies the only arsenal is MongoDB... then it's a different story. Most projects that use MongoDB has simple(ish) data structure so you probably don't need to deal with DAO and whatnot.

Fourth, I can understand your statement coming from NodeJS since NodeJS doesn't even have a good ORM that can managed different DB providers. Specific vs Battle-hardened for years => design trade-offs. Heck, NodeJS forces you to choose a specific DB drivers...

https://stackoverflow.com/questions/14514048/whats-the-equiv...

Re: Ask HN: What's the best API you've worked with?

#17
LINQ by Microsoft. It's expressive, elegant and very useful when dealing with all types of data. In addition, it pushed many OO programmers closer to functional languages.

> "...the design of LINQ query comprehensions was heavily influenced by the design of Haskell. Haskell expert Erik Meijer was on the C# language design committee when we designed LINQ; his insights were very valuable".

Re: Ask HN: What's the best API you've worked with?

#18
Mapbox in Unity. The API might lag behind updates to the JavaScript SDK, but I'll be damned if they didn't at least make the end-user developer experience a pleasure to work with inside the editor. So many SDK implementations in Unity are quite clearly just a layer of likely poorly implemented web calls being jammed into the editor GUI.

Thank you based Mapbox Unity team.

Post reply on HN