r/javascript • • Apr 29 '24

BunyJS: Another IoC but a framework this time.

https://bunyjs.com/
0 Upvotes

14 comments sorted by

4

u/definitive_solutions Apr 29 '24

What is the value of this? Meaning, why should we use it?

Not trying to be dense, just wondering what was the intention behind it, what problem, if any, does it solve, and why is its way a good way of solving it. Especially when the examples look convoluted (at least to me, and compared to the usual solutions)

1

u/meslzy Apr 29 '24

We all agree sometime ioc is bad practice, but i used NestJs and TsEd a lot they heavily use this pattern and when i start to develop others apps ( not backend server) (bots or automation, scrappers, etc) i wish to had that ioc patten to easily use others modules, and easily use externals packages without any additional files to be added.

With buny i have great plans and features, with very large ecosystem this framework will be used over NestJs and TsEd or maybe they will adopt the teamwork.

5

u/coolcosmos Apr 29 '24

...
"experimentalDecorators": true,
...

yeah, no, thanks

0

u/meslzy Apr 29 '24

Lol, try it once you won't regret it.

4

u/TorbenKoehn Apr 29 '24

But they are obsolete, the new, standardized API is already in TS without that flag

0

u/meslzy Apr 30 '24

It doesn't support parameters decoration, without parameters buny.Js is useless. In the future they are planning to support parameters when that happen I'll migrate buny js immediately.

6

u/jessepence Apr 29 '24

Lol... Let me guess, you learned Java first? You know that you don't need decorators for inversion of control, right?

Regardless, congratulations on the release! I hope this library helps you and many others!

2

u/meslzy Apr 29 '24

No i have never touched or wrote single line of code with Java, but after many years with nest js and ioc libraries i I started to use this pattern everywhere that's why I built this framework.

5

u/jessepence Apr 29 '24

Okay, well I just want to warn you that your decorators won't work with the actual decorators that are coming to the language.

You are using the same experimental decorators as Nest

And, parameter decorators haven't made progress in TC39 in over a year

So, you're latching on to a legacy system that may never work in the same way as the actual language. NestJS seems to have a pretty active community, but it's something that I've never personally understood. I hope this works out well for you. I just wanted to fully clarify my hesitation for the usage of experimental decorators.

4

u/meslzy Apr 29 '24

Ohh I'm really thankful for this info, didn't pay attention to it but as you mention i just indie but nestjs is a whole org they will figure it then ill just follow up xd.

1

u/snuffinnz Apr 30 '24

Your README needs to explain WTF is IoC if it wants to be framework-of-the-day.

1

u/meslzy Apr 30 '24

It's not yet published, and the link redirect to the docs site so no one said go Readme file.

It's more abt read the goals, see examples, give advices do or not to do.

It's not yet ready to be used.

1

u/LemonAncient1950 May 01 '24

The "why" section should include reasons to choose this project over other more mature DI frameworks (Nestjs, TSyringe, Inversify, etc).