Re:Show HN: Yet Another Node.js Framework
by activitypea on Sunday November 27, 2022 @10:51AM
(#33763706)
I've done enough Spring Boot to know I never want to do Spring Boot in my life again.
[ Parent
| on HN ]
Re:Show HN: Yet Another Node.js Framework
by racked on Sunday November 27, 2022 @12:46PM
(#33764858)
Help me out here, what does that bit of JS have to do with Spring Boot?
Re:Show HN: Yet Another Node.js Framework
by dmalvarado on Sunday November 27, 2022 @01:02PM
(#33765006)
Magic decorators is the trigger, I think.
Re:Show HN: Yet Another Node.js Framework
by dextreem on Sunday November 27, 2022 @01:02PM
(#33764994)
Probably that @use thing?
Re:Show HN: Yet Another Node.js Framework
by simlevesque on Sunday November 27, 2022 @01:37PM
(#33765310)
Yeah, decorators were a mistake. I don't want any in my code or my dependencies.
Re:Show HN: Yet Another Node.js Framework
by popotamonga on Sunday November 27, 2022 @01:58PM
(#33765538)
Why does it need the use if its already a parameter?
Re:Show HN: Yet Another Node.js Framework
by eurasiantiger on Sunday November 27, 2022 @02:14PM
(#33765690)
It’s a dependency injection pattern. The decorator is telling some other piece of code what to pass in to that method, or to set some hidden context.
I’d check the docs for what it specifically does, but the site is completely unusable on iOS.
Re:Show HN: Yet Another Node.js Framework
by rswskg on Monday November 28, 2022 @05:28AM
(#33771870)
It would make more sense if the injected variable was an interface, the decorator telling you what the concencrete type should be. I think? Otherwise, yeah totally pointless.
Re:Show HN: Yet Another Node.js Framework
by _madmax_ on Sunday November 27, 2022 @02:56PM
(#33766134)
I share the hate.
Re:Show HN: Yet Another Node.js Framework
by donaldpakkies on Thursday December 01, 2022 @03:28AM
(#33813745)
So this is only meant for DI, and the main benefit is request validation. You could also opt to use the controller's validation helper if you don't want to use the `@use` decorator.