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