Tuesday, March 9, 2021

Re: New Article "10 Best Java Frameworks to Use in 2021"

Using a similar approach to your "whale" for 8 years or so too.
We add to that Lightbend Config and Picocli (after having tested args4j and jcommander), and jOOQ then indeed.
Using RestEASY or GraphQL-Java depending on needs, along with Handlebars-java and/or Jackson.
But I know I can easily switch from Jetty to Tomcat or Undertow or whatever, from RestEASY to Jersey (I've actually done the reverse, because integrating with Guice was hard at the time), from Guice to Dagger or H2 or whatever, from Jackson to Moshi or GSON, etc.
And more importantly, we copy/paste/adapt a couple files that glue those things together (Jetty with RestEASY and static files serving, RestEASY and Guice, etc.) from projects to projects, rather than packaging them into a lib that would try to be generic: patterns over frameworks.

On Tuesday, March 9, 2021 at 5:47:03 PM UTC+1 Gordan Krešić wrote:
On 09. 03. 2021. 17:28, Thomas Broyer wrote:
>
> Spring: I think the thing I dislike the most about Spring is what many
> people like about it: it's an entire, wide, and fat, ecosystem. You can
> hardly use one piece of Spring without using everything else; I mean, each
> Spring piece builds on top of another Spring piece, so it's basically an
> all-or-nothing. I also fear that people doing mostly Spring won't know how
> to do things without it (like most big/fat framework actually). I'm a
> no-framework guy; I think each library should be usable on its own (good for
> it if it provides adapters to make it easier to use within a particular
> framework, I won't care), and Spring is the exact opposite.

Besides being a kitchen sink, it's also very slow. We can argue about speed
of Spring layer in an app having database and network stacks, but comparing
just that one layer with non-Spring code may result in 10x difference in
throughput (not 10%, but 10x - order of magnitude).

If anyone is interested in details, here is sample test case I put to demo
this (it was a bet :) ):

https://github.com/gkresic/muddy-waters

"Whale" is the way we are building things past few years, but Shark may be
interesting if you are considering microservices. Notice that Whale is
feature-comparable to Megalodon (Spring), yet 3-4 times faster (and provides
interchangeable libs, as you pointed out).

Relevant fact: prior to that test I had zero experience with Rapidoid and
DSL-JSON - I found them simply by googling "fast java [ (rest server) (JSON)
]". Also, I had verly limited (and outdated) experiece with Spring. Yet,
both are implemented in only few lines of code, but they differ an order of
magnitude in speed.

-gkresic.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/675fdd9a-3745-46c5-a2e0-b9843c5d1c25n%40googlegroups.com.

No comments:

Post a Comment