JVM Language: Java 11+
Webserver: https://javalin.io/
Templating: https://j2html.com/
Enhanced html attributes: https://htmx.org/
Database helper: http://jdbi.org/
Database: Sqlite or Postgres depending on the expected scale.
The startup time is very fast. I usually see times under a second, which makes iterative changes significantly less painful than something like Spring.
Also setup is ridiculously simple, just throw those libraries in a pom file and use a CDN for htmx. No front end build tools needed since htmx removes the need for most if not all of your javascript.
The whole setup feels kind of old school, but man it makes developing CRUD apps dead simple again.
Lastly, project onboarding is as simple as having someone download intelij and pulling the project. The built in maven and jdk to intelij is all they need. That is as long as you don't need them to run their own Dev database instance, but that's not the end of the world if you utilize docker.
Even if you decide on something else take a look at the above libraries, they're all pretty fantastic.
- Database: Postgres or SQLite
- Frontend: None, the backend serves html + js by combining htmx[1] and hiccup[2]
I would consider trading these for faster build times... I heard good things about javalin.
I would definelty use Java. I like it and there are tonns of new features in the 11+ versions. Boilerplate is greatly reduced by Lombok.
I would consider Kotlin for even less boilerplate and null handling.
* Scala as Python: https://github.com/com-lihaoyi/cask, maybe https://github.com/getquill/quill
* Scala as Haskell: HTTP4s, https://tpolecat.github.io/doobie/
* Scala as Rails: Play
Play is the closest thing to Rails-like CRUD productivity IMO, and honestly for CRUD most times I would like to write as little code as possible and just get it done, even using low/no-code solutions (postgrest, hasura, htmx), but that wasn't the question :)
But yeah, I use Scala at work for what should be a simple crud app, and I absolutely hate it. Never felt less productive in my life.
The biggest problem with Scala is the type system. Types are great for catching bugs _within_ a program, but don't really help much for catching bugs when the program interacts with the outside world, which CRUD apps do a lot with a database. So I'm paying the cost of having to learn this complex type system and all the wacky ways the type checker can fail, but I'm not reaping much of the benefits that comes from actually using Scala's type system.
And if I'm not using Scala's type system, then what's the compelling reason for choosing it over Kotlin, or even Java?
I can write programs without code covering all scenarios by stubbing out methods with types, using ADTs etc then it’s a case of implementing a function to run it all.
However, I completely understand where you are coming from.
I had some of the same issues until I worked with a great team who showed me the abstractions, why they are useful and how they work.
If I hadn’t of worked with the team I did I would likely of still been agreeing with you. I think the biggest problem is it’s hard to understand on your own unless you are deep in to the theory. You don’t need to know the theory deeply to use the abstractions but unless someone shows you how to apply them it’s hard to discover.
With that your last comment is exactly right. If you are not utilising Scala type system and other features Kotlin or Java will be better. Java is moving quick these days and Kotlin is closer to a better Java than Scala is.
Also I've spent some time with Kotlin now and ... it is just pure shit lol - its ADT support is comically inadequate. It's like the designers wanted them but only made a superficial copy without the hard part (real pattern matching.) Amatuerish. The language is pure sugar.
Http4s, zio-json, zio-config, scalate templates, doobie for the db.
These are libraries not frameworks but the way it’s designed you don’t need a framework as so easy to slot together.
Think of it as writing a crud app with Express on NodeJS. Or one of the other bare bones HTTP server/routers.
Admittedly it’s an acquired taste but if understand them it’s the most flexible/simple I’ve used across various languages.
You also have Play framework which is a full stack framework, Java like but Scala syntax and closer to Spring Boot than Http4s etc.
My understanding is that Micronaut and Spring can be used together [1].
[0] https://micronaut.io/ [1] https://micronaut-projects.github.io/micronaut-spring/latest...
It's a nice mix of simplicity and effectiveness.
If you want performance above all else, Vert.X isn't too hard to use. But the async API's are a PITA, much like ExpressJS.
If a CMS solution is required, LifeRay or Adobe Experience Manager.
Preferably with Oracle as database, and most performance critical queries written in PL/SQL.
Although I am sure this is a not welcomed solution in this side of Internet.
Whichever stack gets you to build your mvp fastest, or the one you already know and enjoy, or the new shiny one you've been dying to try out, or the one your buddy challenged you to use..
They are just tools, which you pick is a matter of preference. Just pick one unless you enjoy spending your time thinking about which to pick rather than get to work and build your project
For example, Clojure is a very expressive and fun programming language but I would never build a startup on that as it would be far more challenging to find experienced developers.
I think I misunderstood the sentiment of the question anyway. It was trying to start a discussion rather than get a pragmatic answer :-)
Sorry for being emotional and slightly off topic, but why would you fire a cannon at sparrows?
“Today” some things changed, new more team-scalable and simple languages matured. Old one got more performant and stable (like nodejs, ruby etc).
What’s there in CRUD that you win with jvm?
You imply that Java is big and heavy when JS/Node Python and Ruby use more ram and run slower than Java in basically every benchmark. And V8 runtime and JS language complexity is just as big as Java these days.
Java is very scalable. If I was force to work on a million+ line project I would pray it was Java or C#.
Java ain't going to win any beauty pageants but it's a solid all rounder. The guy you keep on roster because he can fill any position, not because he's the star hitter.
I’ve worked a lot both with java and nodejs. Your words about js complexity “just as big” are simply wrong.
Think about multithreading for starter. And all the bugs and developer mental overhead that comes with it.
JS has become a huge language, just as big as Java. So is the runtime, V8 is gigantic, comparable to JVM. I use both every day.
Vert.X is nearly identical to Express JS including all the callback stuff. And that's one of the harder Java frameworks to use
As for java frameworks like spring they mostly suck because of way too verbose java syntax and over engineering mentality usually coming with any java framework.
Also i never said express js is a great example of web framework.
But i know for sure that i can spin up simple crud with db, tests and some logic behind it in less than hour in rails.
While java devs still arguing about “right” architecture.
Java gets a bad rap which bothers me because it's really a good choice for backend work even today. Sometimes it bothers me enough that I lash out needlessly.
And i also lash out sometimes when people (especially beginners) trying to solve simple problems with heavy artillery, sorry.
Peace.