Guice
carbon-lang
Our great sponsors
Guice | carbon-lang | |
---|---|---|
31 | 174 | |
12,343 | 32,151 | |
0.3% | 0.4% | |
7.5 | 9.8 | |
4 days ago | 2 days ago | |
Java | C++ | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Guice
-
Hexagonal Architecture/Ports And Adapters: Clarifying Key Concepts Using Go
Historically, Ports and Adapters was born in the context where Dependency Inversion Principle (DIP) was getting hot, back in the beginning of the 2000’s. DIP was getting more present on development day to day, and an example of a framework that was a pioneer in such topic is Google Guice.
-
Inversion of Control Containers and the Dependency Injection Pattern (2004)
“There are many advantages to using dependency injection, but doing so manually often leads to a large amount of boilerplate code to be written. Guice is a framework that makes it possible to write code that uses dependency injection without the hassle of writing much of that boilerplate code”
This is a common misconception. Guice’s docs delineate between dependency injection as a pattern and Guice as a framework that supports that pattern.
- How to dependency injection
-
Why dependency injection?
You can (and it's very normal to) use that with new. Dependency injection frameworks (like guice) let you skip passing long parameter lists to constructor arguments like you mention. But you don't really NEED that. They also will solve circular dependency issues and some other things, although a strong argument could be made that you should simply restructure your code so that those issues don't exist.
-
Bob Lee, Former CTO Square, Creator of CashApp, Stabbed to Death in SF
Bob was a nice guy. We had an overlapping tenure at Google in the 2000s. He was one of the original authors of the Guice dependency injection framework: https://github.com/google/guice. When I was earning Java readability at Google, I was fortunate to have had him assigned as a reviewer. Huge loss; he left a very positive impression on me.
-
Bob Lee Was Killed
He was fairly well known figure in the Java world. RIP.
-
Handling two contexts
Usually each context has a different scope and lifetime associated with it. Here, it sounds like there are two distinct scopes: server and request (cf. how Guice models scopes: https://github.com/google/guice/wiki/Scopes). It is rarely sensible to merge the scopes or contexts together. If we think about a context, it contains several things:
-
Anyone succeed in running GL5 + Opensearch on FreeBSD?
Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors: 1) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? MoreSearchAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:57) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : MoreSearchAdapterProvider.(MoreSearchAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:57) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 2) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? V20200730000000_AddGl2MessageIdFieldAliasForEvents$ElasticsearchAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:65) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : V20200730000000_AddGl2MessageIdFieldAliasForEventsElasticsearchAdapterProvider.(V20200730000000_AddGl2MessageIdFieldAliasForEventsElasticsearchAdapterProvider.java:34) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:65) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 3) [Guice/MissingImplementation]: No implementation for Map>> was bound. Did you mean? QueryBackend bound at VersionAwareStorageModule.bindQueryBackend(VersionAwareStorageModule.java:72) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : ElasticsearchBackendProvider.(ElasticsearchBackendProvider.java:33) \_ for 2nd parameter at VersionAwareStorageModule.bindQueryBackend(VersionAwareStorageModule.java:72) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 4) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) QuerySuggestionsService bound at ViewsBindings.configure(ViewsBindings.java:245) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : QuerySuggestionsProvider.(QuerySuggestionsProvider.java:31) \_ for 2nd parameter at ViewsBindings.configure(ViewsBindings.java:245) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 5) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) ExportBackend bound at ViewsBindings.registerExportBackendProvider(ViewsBindings.java:255) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : ExportBackendProvider.(ExportBackendProvider.java:31) \_ for 2nd parameter at ViewsBindings.registerExportBackendProvider(ViewsBindings.java:255) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 6) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? IndexToolsAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:62) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : IndexToolsAdapterProvider.(IndexToolsAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:62) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 7) [Guice/MissingImplementation]: No implementation for Map> was bound. Requested by: 1 : ClusterAdapterProvider.(ClusterAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:59) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 8) [Guice/MissingImplementation]: No implementation for Map> was bound. Requested by: 1 : NodeAdapterProvider.(NodeAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:60) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 9) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? CountsAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:54) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : CountsAdapterProvider.(CountsAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:54) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 10) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? IndexFieldTypePollerAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:61) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : IndexFieldTypePollerAdapterProvider.(IndexFieldTypePollerAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:61) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 11) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? StreamsForFieldRetriever bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:53) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : StreamsForFieldRetrieverProvider.(StreamsForFieldRetrieverProvider.java:33) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:53) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 12) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? IndicesAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:55) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : IndicesAdapterProvider.(IndicesAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:55) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 13) [Guice/MissingImplementation]: No implementation for Map> was bound. Requested by: 1 : MessagesAdapterProvider.(MessagesAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:58) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 14) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? SearchesAdapter bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:56) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : SearchesAdapterProvider.(SearchesAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:56) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 15) [Guice/MissingImplementation]: No implementation for Map> was bound. Did you mean? V20170607164210_MigrateReopenedIndicesToAliases$ClusterState bound at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:63) SearchVersion annotated with interface DetectedSearchVersion bound at ElasticsearchModule.configure(ElasticsearchModule.java:30) SearchVersion annotated with @Named("elasticsearch_version") bound at NamedConfigParametersModule.registerParameters(NamedConfigParametersModule.java:80) Requested by: 1 : V20170607164210_MigrateReopenedIndicesToAliasesClusterStateAdapterProvider.(V20170607164210_MigrateReopenedIndicesToAliasesClusterStateAdapterProvider.java:31) \_ for 2nd parameter at VersionAwareStorageModule.configure(VersionAwareStorageModule.java:63) Learn more: https://github.com/google/guice/wiki/MISSING_IMPLEMENTATION 15 errors ====================== Full classname legend: ====================== ClusterAdapter: "org.graylog2.indexer.cluster.ClusterAdapter" ClusterAdapterProvider: "org.graylog2.storage.providers.ClusterAdapterProvider" CountsAdapter: "org.graylog2.indexer.counts.CountsAdapter" CountsAdapterProvider: "org.graylog2.storage.providers.CountsAdapterProvider" DetectedSearchVersion: "org.graylog2.storage.DetectedSearchVersion" ElasticsearchBackendProvider: "org.graylog2.storage.providers.ElasticsearchBackendProvider" ElasticsearchModule: "org.graylog2.bindings.ElasticsearchModule" ExportBackend: "org.graylog.plugins.views.search.export.ExportBackend" ExportBackendProvider: "org.graylog.plugins.views.providers.ExportBackendProvider" GeneratedQueryContext: "org.graylog.plugins.views.search.engine.GeneratedQueryContext" IndexFieldTypePollerAdapter: "org.graylog2.indexer.fieldtypes.IndexFieldTypePollerAdapter" IndexFieldTypePollerAdapterProvider: "org.graylog2.storage.providers.IndexFieldTypePollerAdapterProvider" IndexToolsAdapter: "org.graylog2.indexer.IndexToolsAdapter" IndexToolsAdapterProvider: "org.graylog2.storage.providers.IndexToolsAdapterProvider" IndicesAdapter: "org.graylog2.indexer.indices.IndicesAdapter" IndicesAdapterProvider: "org.graylog2.storage.providers.IndicesAdapterProvider" MessagesAdapter: "org.graylog2.indexer.messages.MessagesAdapter" MessagesAdapterProvider: "org.graylog2.storage.providers.MessagesAdapterProvider" MoreSearchAdapter: "org.graylog.events.search.MoreSearchAdapter" MoreSearchAdapterProvider: "org.graylog2.storage.providers.MoreSearchAdapterProvider" Named: "com.google.inject.name.Named" NamedConfigParametersModule: "com.github.joschi.jadconfig.guice.NamedConfigParametersModule" NodeAdapter: "org.graylog2.indexer.cluster.NodeAdapter" NodeAdapterProvider: "org.graylog2.storage.providers.NodeAdapterProvider" Provider: "javax.inject.Provider" QueryBackend: "org.graylog.plugins.views.search.engine.QueryBackend" QuerySuggestionsProvider: "org.graylog.plugins.views.providers.QuerySuggestionsProvider" QuerySuggestionsService: "org.graylog.plugins.views.search.engine.QuerySuggestionsService" SearchVersion: "org.graylog2.storage.SearchVersion" SearchesAdapter: "org.graylog2.indexer.searches.SearchesAdapter" SearchesAdapterProvider: "org.graylog2.storage.providers.SearchesAdapterProvider" StreamsForFieldRetriever: "org.graylog2.indexer.fieldtypes.streamfiltered.esadapters.StreamsForFieldRetriever" StreamsForFieldRetrieverProvider: "org.graylog2.storage.providers.StreamsForFieldRetrieverProvider" V20170607164210_MigrateReopenedIndicesToAliases$ClusterState: "org.graylog2.migrations.V20170607164210_MigrateReopenedIndicesToAliases$ClusterState" V20170607164210_MigrateReopenedIndicesToAliasesClusterStateAdapterProvider: "org.graylog2.storage.providers.V20170607164210_MigrateReopenedIndicesToAliasesClusterStateAdapterProvider" V20200730000000_AddGl2MessageIdFieldAliasForEvents$ElasticsearchAdapter: "org.graylog.plugins.views.migrations.V20200730000000_AddGl2MessageIdFieldAliasForEvents$ElasticsearchAdapter" V20200730000000_AddGl2MessageIdFieldAliasForEventsElasticsearchAdapterProvider: "org.graylog2.storage.providers.V20200730000000_AddGl2MessageIdFieldAliasForEventsElasticsearchAdapterProvider" VersionAwareStorageModule: "org.graylog2.storage.VersionAwareStorageModule" ViewsBindings: "org.graylog.plugins.views.ViewsBindings" ======================== End of classname legend: ======================== at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:568) at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:163) at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110) at com.google.inject.Guice.createInjector(Guice.java:87) at org.graylog2.shared.bindings.GuiceInjectorHolder.createInjector(GuiceInjectorHolder.java:34) at org.graylog2.bootstrap.CmdLineTool.setupInjector(CmdLineTool.java:502) at org.graylog2.bootstrap.CmdLineTool.doRun(CmdLineTool.java:306) at org.graylog2.bootstrap.CmdLineTool.run(CmdLineTool.java:260) at org.graylog2.bootstrap.Main.main(Main.java:45)
-
Dependency Injection in Scala - cake pattern
using libraries from java world, such as Guice;
-
Dependency injection with AWS Lambdas in java
As said in the title, we will focus on the dependency inversion principle and one of its application : dependency injection. For production-ready applications, it would be better to rely on a framework and not implement its own container. For it, the java ecosystem have 3 frameworks available : Spring, Guice and Dagger.
carbon-lang
- Carbon Copy Newsletter No.2
-
Cpp2 and cppfront – An experimental 'C++ syntax 2' and its first compiler
The roadmap for Carbon [0] mentions wanting to have basic, non-trivial programs written in Carbon by the end of 2024. They're aiming for a v0.1 release in 2025. If it gains traction, they're aiming for a v1.0 beyond 2027.
I don't think anyone outside Google will seriously adopt this before it reaches v1.0. Even within Google, they may choose other options.
[0] - https://github.com/carbon-language/carbon-lang/blob/trunk/do...
- Carbon Language Newsletter, the Carbon Copy, February 2024
-
Odin Programming Language
Carbon was started by Chandler Carruth, at Google, but they wanted to move it to broader governance quickly. It's not under the Google GitHub today, but its own org.
https://github.com/carbon-language/carbon-lang/blob/trunk/do...
-
C++ Should Be C++
What do you think about Carbon[1]? I am hopeful.
- The NSA advises move to memory-safe languages
- Carbon Language: An experimental successor to C++
-
Toward a TypeScript for C++"
https://github.com/carbon-language/carbon-lang/blob/trunk/do...
next year 0.1 will be usable, 1.0 is about 3 years away, sigh, back to my rust fight
-
Programming Languages Every Developer Should Watch Out For
1. Carbon
What are some alternatives?
Dagger2 - A fast dependency injector for Android and Java.
rust - Empowering everyone to build reliable and efficient software.
HK2
crubit
Weld - Weld, including integrations for Servlet containers and Java SE, examples and documentation
cppfront - A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Apache DeltaSpike - Mirror of Apache Deltaspike
Odin - Odin Programming Language
Dynamic CDI - Dynamic Context Dependency Injection
go - The Go programming language
Feather - Lightweight dependency injection for Java and Android (JSR-330)
hylo - The Hylo programming language