The depth of choice of libraries and tooling on the JVM is one compelling reason to choose Java for writing an app.
I always try to use the right tool for the job, and in doing so, I'm impartial about the programming language. One of the apps I've written in the last year uses both Go and Java for different purposes, but they form one single application. DB wise, Go has a long long way to go to catch up to Java. The first major difference is the availability of platform native drivers for all sorts of database products. In Java, you don't need to search around for some OS native (read non-portable) driver that you link to. For better or worse, you'll generally find that database vendors provide a JDBC implementation of their own wire protocol. Go has something similar to JDBC called database/sql, but you'll only find a handful of implementations for this. The second major difference IMHO is JOOQ. JOOQ for me is a reason to stick to Java, if you have an application that uses an SQL database in a non-trivial way. In Go, there are a bunch of ORMs and non-ORM thingy's, which are fine if you want to just do a bit of CRUD. Similarly, if you just want CRUD in Java, then arguably you don't need JOOQ - there are even more ORM and non-ORM options for Java. What I am looking for in a database dongle is: * A way to back propagate DDL evolution to the code base that is accessing the DB whilst you are authoring the code. * A mechanism to leverage SQL's ability to sort, filter, aggregate and transform data so that you can write re-usable SQL query building blocks and tightly factor application APIs that access the DB. JOOQ offers the code generator in conjunction with the type safe fluent API to provide a solution for my first requirement. The second requirement is solved by the design of the fluent API such that queries can be composed and nested and that although you're hacking away in Java, you are actually thinking in SQL(*). So why would I bother with sqlc? Well if Lukas had never taken the time to come up with JOOQ, one might argue that Java looses a compelling reason to be used. Chicken and egg. I don't fully agree with the statement that in Go, lots of wheels still need to be re-invented. I think that many already have, and have been so with a high level of quality. But the JOOQ wheel hadn't been re-invented for Go as yet. In Go, you have a simple type checked language where code generation replaces generics and OO-stuff. So it seems conceptually it leans towards two vital ingredients of the JOOQ paradigm: code generation and type safe API access. (*) I'm implicitly assuming that because one uses JOOQ, one buys into the SQL concept. If you don't like SQL, but are obliged to store your data in a SQL database, maybe you won't feel at home with JOOQ. On Thu, Sep 25, 2014 at 8:17 PM, Stéphane Cl <[email protected]> wrote: > Have we, java guys, become spoiled by our fancy tools and database > frameworks? > I am personnaly interested by many languages and often get frustrated by the > lack of appropriate SQL toolkits or weak IDE support... When I first had a > look at GO when it came out, my first reaction was exactly that "How will I > query my database?" The inevitable question that comes next is "Will I be > productive enough"? It seems that once you have given up on manual string > concatenation to write your data access layer, there is no way back. > > Sorry for offtopic > > Le jeudi 25 septembre 2014 19:26:16 UTC+2, Ben Hood a écrit : >> >> On Thu, Sep 25, 2014 at 5:06 PM, Lukas Eder <[email protected]> wrote: >> > ... I don't exactly envy you Go guys. I guess for now, I'll be sticking >> > with >> > Java ;-) >> >> That's the first time I've been called a Go guy - statistically >> speaking I still write more lines of Java per week than I currently do >> with Go, hence I must also be a Java guy :-) > > -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
