5 ms·
But in Java you have to use frameworks since the std lib does not offer anything for web / DB. Does not matter if the language is simple but you're forced to us
by Thaxll 5y ago
But in Java you have to use frameworks since the std lib does not offer anything for web / DB. Does not matter if the language is simple but you're forced to used a framework.
- gmfawcett 5y agoServlet API and JDBC are as standardized as you can get. If you want more than that, in any language, you're reaching for a framework.
- heurisko 5y agoJava has JDBC and HttpServer for a rudimentary server.
- qsort 5y agoThere are plenty of alternatives to ORMs. We use JDBI (https://jdbi.org https://jdbi.org) which is dead simple and a happy medium between pure JDBC and a full blown ORM. Even using the built-in JDBC support is an option with modern Java, PreparedStatement and ResultSet implement AutoClosable, which means you can write code like this: try ( final var rs = conn.prepareStatement(""" <SQL here> """).executeQuery(); ) { while (rs.next()) { // do your thing } } catch (SQLException e) { // your code here } Which is just the standard library and no more verbose than most other frameworks. As for web frameworks, there's a million of them. Pick a non-magical one if you don't like magic.