Coder Social home page Coder Social logo

muice's Introduction

NOTE

Although this library may perform better than Guice, I (author) strongly DISCOURAGE ANY USAGE OF THIS LIBRARY!

In most cases, Guice is the way to go. Startup performance problems in mobile apps should to be dealt with by applying lazy loading technique. Changing DI framework for performance-related reasons is a form of micro-optimization, which should be used as last resort in most extreme cases.

If micro-optimization is really needed, Dagger may be a better choice. It is actively developed and provides more features. Dagger presents better performance than Muice and Guice, because its injectors do not use Java reflection.

Inject with Efficiency!

Muice is a clone of Google Guice dependency injection library. In comparison with the original, Muice is far more efficient at cost of limited functionality. Motivation behind Muice is that Guice is hardly applicable for use in mobile applications, which require fast start-up time.

Differences from Guice

Most of Guice Wiki applies also to Muice. Following Guice features are currently unsupported:

  • @Provides Methods
  • Built-in Logger Binding
  • Just-In-Time Bindings
  • Binding Annotations with Parameters (including @Named)
  • Stages
  • Eager Singletons
  • Method Injections
  • Field Injections
  • Optional Injections
  • Static Injections
  • @Nullable Injections
  • Aspect Oriented Programming
  • Elements SPI
  • All Guice integration mechanisms
  • All Guice extensions

Guice provides its own version of @Inject annotation and declares @BindingAnnotation. javax.inject.Inject and javax.inject.Qualifier are used in Muice.

Internals of Muice are completely different than Guice internals.

Besides Guice functionality, Muice provides a possibility to customize injector creation process (see MuiceBuilder).

Documentation

Documentation can be found in the source code. !JavaDoc of Muice and Binder classes are good starting points.

Downloads

Project archives can be downloaded from maven central repository.

License

Copyright © Maciej Chałapuk 2016. Released under Apache License 2.0.

muice's People

Contributors

mchalapuk avatar muroc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.