Code Monkey home page Code Monkey logo

Comments (3)

Ocramius avatar Ocramius commented on June 4, 2024 2

Didn't have much time to work on this, but I'm currently building Roave/DependencyResolver (currently private).

The idea is to have following:

  1. analyze existing code
  2. build complete dependency graph (find constructors, setters, etc)
  3. run "compiler passes" on the dependency graph (allows replacing dependencies, providing dependencies for when none could be resolved, etc)
  4. select dependencies (we don't need everything)
  5. run further compiler passes to define which ones are consumer-exposed dependencies, and which ones are just private dependencies (services to never be exposed by the container directly)
  6. generate factory code (container-specific, in this case - this is not part of Roave/DependencyResolver)

What you'd do is probably expose a CLI script to generate factory snippets to be copied in the container. What you will get from Roave/DependencyResolver is a framework-agnostic dependency graph that you can traverse and modify.

from disco.

shochdoerfer avatar shochdoerfer commented on June 4, 2024

Just a quick thought: As for primitive value injection we could potentially do some name matching with the parameters injected to the bean configuration method.

from disco.

shochdoerfer avatar shochdoerfer commented on June 4, 2024

Instead of sprinkling annotations in the whole code base to configure setter injection, named injection etc. we could simply add those annotations to the bean configuration method.

from disco.

Related Issues (20)

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.