Comments (8)
Hypodermic is also one of the runtime DI libraries, it's more similar to Wallaroo than to Fruit.
For example, if you forget to bind a type that's a compile-time error in Fruit (and Boost.DI) but it's a runtime error in Wallaroo and Hypodermic.
from fruit.
I will include a page comparing Fruit to other C++ DI libraries in the Fruit website, thanks for the idea.
I'll work on the 1.1.0 release first though, once that is released I was already planning some work on the documentation (i.e., in 1 month or so).
I'll keep this issue open until I add that page, so that you know when it's there.
The TL;DR version is that Wallaroo is a completely different beast (run-time DI) while Boost.DI is more similar to Fruit, but there are some differences in the features (some are Fruit-only, some Boost.DI-only) and in performance (I expect Fruit to have noticeably faster compile time and slightly faster run-time, but I need to write/run some benchmarks to have actual data on this).
from fruit.
Cool. That's very helpful. Thanks.
from fruit.
Thank you for Fruit.
I'm also interested in a comparison with hypodermic.
from fruit.
ITNOA
@poletti-marco thanks for information, and what about autowiring?
from fruit.
from fruit.
And what about Kangaru? Seems to be pretty complete: https://github.com/gracicot/kangaru/wiki
from fruit.
From a quick look at the documentation it also seems to be runtime DI, so using an approach similar to Wallaroo and Hypodermic.
That means that it won't be able to report many compile-time errors that Fruit (and Boost.DI) can report, like missing bindings.
They provide a debugging facility for 1 class of errors:
https://github.com/gracicot/kangaru/wiki/11.-Debugging
But you need to modify your code in order to use it.
So I imagine that even for the few classes of errors where it does fail at compile-time, the errors are not very readable until you change your code to use that.
Fruit (and Boost.DI) give you the guarantee that certain classes of errors are always detected at compile-time, so if your code builds you're sure they won't happen at runtime. E.g. missing bindings (both libraries) or binding dependency cycles (Fruit only).
from fruit.
Related Issues (20)
- build with vcpkg for ARM64:Android is getting errors HOT 3
- Trying to compile with NDK R22 fails HOT 11
- [Docs] Possible outdated documentation HOT 1
- Fruit does not build in Visual Studio Versions 2019, 2022 or 2022 Preview with CMake HOT 8
- what should I do to use a string as an annotion of some bind? HOT 3
- VS2022 Just My Code for Fruit Library fails using CMAKE HOT 6
- Create a fruit::Component by iterating over a list of fruit::Components HOT 7
- Can fruit be used with C language? HOT 2
- Handling lifetimes HOT 6
- Providing non-injected arguments to DI Objects HOT 14
- Build fails with Visual Studio 2022 with C++20 HOT 8
- Fruit with QT HOT 4
- Factories with reference types broken in fruit 3.7.0
- Generic binding? HOT 2
- Defining Factory Functions for Objects with Multiple Constructors HOT 11
- Replace boost HOT 1
- Creating Collections of DI Objects HOT 3
- [Suggestion] ExtractFirstError meta function SHOULD be non-error safe HOT 2
- Can no longer build examples in VS2022 Preview built by Visual Studio, VS CMake builds OK HOT 7
- Examples miss virtual dtor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fruit.