Guice VS Apache Tomcat

Compare Guice vs Apache Tomcat and see what are their differences.

Guice

Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 8 and above, brought to you by Google. (by google)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
Guice Apache Tomcat
31 24
12,321 7,231
0.3% 1.1%
7.5 9.9
8 days ago 7 days ago
Java Java
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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

Posts with mentions or reviews of Guice. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-21.
  • Inversion of Control Containers and the Dependency Injection Pattern (2004)
    2 projects | news.ycombinator.com | 21 Feb 2024
    > Dependency injection has always been such a bad name for the concept. It is just passing dependencys as arguments.

    No.

    Dependency Injection means using tooling to "inject" the dependency, instead of passing an explicit argument.

    https://github.com/google/guice

    > Think of Guice's `@Inject` as the new `new`.

    Like many architecutral design patterns, toy examples don't illustrate the concept well. It's used for doing things like switching a large service-based system from using external databases and remote services for production, to in-memory everything for testing.

    2 projects | news.ycombinator.com | 21 Feb 2024
    “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.

    https://github.com/google/guice/wiki

  • Handling two contexts
    2 projects | /r/golang | 28 Mar 2023
    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:
  • Dependency Injection in Scala - cake pattern
    4 projects | dev.to | 18 Feb 2023
    using libraries from java world, such as Guice;
  • Dependency injection with AWS Lambdas in java
    4 projects | dev.to | 11 Feb 2023
    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.
  • "My Reaction to Dr. Stroustrup’s Recent Memory Safety Comments"
    11 projects | /r/rust | 2 Feb 2023
    And it doesn't really matter whether you have created circular reference structure of whether you have messed up your binding and now objects which was supposed to disappear after one request is only doing that when all database connections are quiescent (which happens easily in testing, but may not happen for days in production).
  • ᚣ the Rune Programming Language
    6 projects | news.ycombinator.com | 26 Nov 2022
  • Ask HN: Google Guice another abandonware from Google?
    2 projects | news.ycombinator.com | 17 Jan 2022
    https://github.com/google/guice/issues/1536
  • What is something you made in Java to automate/make your job easier?
    12 projects | /r/java | 24 Dec 2021
    ... with guice or Spring Boot,
  • About design patterns: Dependency Injection
    2 projects | dev.to | 13 Oct 2021
    The following section is an example of injecting our service using Guice, a dependency injection framework for Java made by Google. The concept is to reference bindings of every component you can inject in your program, so that the library can generate a class of any type, automatically.

Apache Tomcat

Posts with mentions or reviews of Apache Tomcat. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-02.
  • Spring Boot Monitoring with Open-Source Tools
    5 projects | dev.to | 2 Dec 2023
    Manual instrumentation allows you to define your Spans within the code itself rather than relying on automatic instrumentation finding the entry point for a trace. Manual instrumentation is especially helpful for applications that don’t use an application server such as Tomcat, JBoss, or Jetty.
  • Issue with chatgpy
    3 projects | /r/ChatGPTCoding | 23 Mar 2023
    99% is a huge exaggeration. Two essential deployment tools off the top of my head: https://tomcat.apache.org/ https://docs.jboss.org/author/display/AS71/Developer%20Guide.html
  • 7 years with Vaadin in production. Do we still enjoy it?
    2 projects | dev.to | 12 Feb 2023
    Do we still enjoy it? We are running many Vaadin apps in production since that first one. If there are not any specific requirements we use a “modular monolith” concept, which fits our stack best. We pack applications as WAR and deploy them under Apache Tomcat. And yes, we enjoy the development process. It’s very straightforward and Vaadin and SpringBoot fit together well.
  • TIBCO Jaspersoft Studio tutorial: Creating templates and integration with JasperReports Server
    3 projects | dev.to | 10 Nov 2022
    JasperReports Server Community requires a Java application server and a database to create a repository in order to work properly. After downloading JRS, the installation process can install Tomcat server and PostgreSQL database automatically for us and the services will run depending on the Jasper server. It's also possible to connect JRS to services already installed on the server. Moreover, while the free version supports the MySQL server, with the paid version you can also use commercial databases, for example, ORACLE Database, as a data repository.
  • Show HN: Open-source non-blocking NIO Java HTTP Server
    8 projects | news.ycombinator.com | 24 Oct 2022
    Regarding the venerable Tomcat, they [somewhat] recently added support for Unix domain sockets.

    * https://github.com/apache/tomcat/pull/402

    * https://github.com/apache/tomcat/pull/532

    We fronted the server with haproxy LTS. Our initial testing showed roughly and order of magnitude [10x] increase in the number of requests the server could handle.

    It's not completely plug-and-play; we still had a write a custom valve to set the request remote ip address and some other TCPish stuff, but nevertheless the capacity far outstripped our need for the technology.

  • The 12-Factor App Building Methodology
    3 projects | dev.to | 2 Jul 2022
    Example: Little Johnny was developing a Java web app and thinking about how he would configure Tomcat to listen to requests and redirect the data into his app... until he remembered this would violate Factor 7! Instead, he decided to declare Jetty as a dependency, keeping the HTTP service inside the app instead of configuring an external web server and then injecting its functionalities. Now, whenever he wants to instantiate another server for this app, all he has to do is installing dependencies and running the app, isn't it convenient?
  • Team 'print to console' assemble
    2 projects | /r/ProgrammerHumor | 12 Dec 2021
    Apache has multiple "server" projects- Apache HTTP Server is an a server program written in C, while Apache Tomcat is a server program written in Java.
  • Non Spring users what are you using ??
    7 projects | /r/java | 2 Nov 2021
    Multiple applications in the same JVM? Wildfly, Tomcat, Jetty.
  • Packaging and deploying Spring Boot applications as WAR files
    4 projects | dev.to | 2 Sep 2021
    Download Apache Tomcat from the project website. Make sure to download the correct version, depending on the Java and Servlet API versions that your application uses. For example, in the case of Vaadin applications, download Apache Tomcat version 9.
  • Apache Tomcat alternatives - tommy and DeepfakeHTTP
    3 projects | 15 Aug 2021

What are some alternatives?

When comparing Guice and Apache Tomcat you can also consider the following projects:

Dagger2 - A fast dependency injector for Android and Java.

open-liberty - Open Liberty is a highly composable, fast to start, dynamic application server runtime environment

HK2

WildFly - WildFly Application Server

Weld - Weld, including integrations for Servlet containers and Java SE, examples and documentation

Jetty - Eclipse Jetty® - Web Container & Clients - supports HTTP/2, HTTP/1.1, HTTP/1.0, websocket, servlets, and more

Netty - Netty project - an event-driven asynchronous network application framework

nanohttpd - Tiny, easily embeddable HTTP server in Java.

karaf - Mirror of Apache Karaf

Apache TomEE - Apache TomEE

Apache DeltaSpike - Mirror of Apache Deltaspike

Dynamic CDI - Dynamic Context Dependency Injection