5 ms·
It's wrong to focus on the reactive part - it's a feature that it is fully supported, but Micronaut is a generic framework that has both synchronous and async s
by zmmmmm 6y ago
It's wrong to focus on the reactive part - it's a feature that it is fully supported, but Micronaut is a generic framework that has both synchronous and async support. It's real secret sauce is the ability to make API building extremely concise, well type checked and performant (for JVM based apps - 10-100ms scale startup times etc.).
For example, this is a Hello World API in Groovy (this is almost literally the entire Application):
@Controller('/hello')
class HelloController {
String index() {
'Hello World'
}
}
- Nursie 6y agoWhile that is concise, the sparkjava version (without boilerplate): get("/", (req, res) -> "hello world") Is just as clear to me. Not saying micronaut doesn't have things to offer, but simplicity of setting up an http endpoint isn't unique.
- zmmmmm 6y agoSure - I was mostly just responding to the commenter implying that Micronaut leads you to "observable hell". The point is, if you apply it in standard synchronous mode it's just like any other framework these days.
- bcrosby95 6y agoAs someone that uses Java in my dayjob, I wish annotations were never invented. Debugging problems with them is hell. Why can't we just use method calls?
- pjmlp 6y agoBecause method calls don't compose as compiler plugins or runtime reflection. They were also not invented by Java, other languages like Dylan, Python and .NET actually go them first. Actually they are like a poor man's Lisp macros kind of.
- deleted 6y ago[deleted]
- thecupisblue 6y ago>Actually they are like a poor man's Lisp macros kind of. Best description of annotations I read. Literally this, a lot of times I figure an annotation is way simpler than fighting the generic system and all it's flaws.
- kazinator 6y agoIn fact, I invented a new kind of Lisp macro, the parameter macro, which decorates functions, but at compile time rather than run-time, and with much more flexibility. https://www.nongnu.org/txr/txr-manpage.html#N-00B4065C https://www.nongnu.org/txr/txr-manpage.html#N-00B4065C An example is given of a memoization parameter macro that you invoke simply by adding :memo to the front of the parameter list, as in (lambda (:memo ...) ...). This inlines everything; the function itself rewritten to do the caching with open code, rather than wrapped with a caching function. TXR Lisp's support for keyword arguments is also implemented as a parameter macro, using the documented define-param-expander public interface. http://www.kylheku.com/cgit/txr/tree/share/txr/stdlib/keyparams.tl http://www.kylheku.com/cgit/txr/tree/share/txr/stdlib/keypar... This is possible because the parameter macro can introduce identifiers into the scope of the function, and rewrite the parameter list.
- deleted 6y ago[deleted]
- vips7L 6y agoI have other issues with micronaut as well. I much prefer the EE spec over it. My choice of framework for where micronaut would be used is quarkus or helidon.