Code Monkey home page Code Monkey logo

Comments (5)

tschneidereit avatar tschneidereit commented on August 17, 2024

Turns out I'll probably not implement this feature after all. If anyone absolutely wants to implement it and sends a pull request with good implementation and tests, I'll probably merge that, but I'm mostly of the opinion that a real binding solution should be used here, instead.

from swiftsuspenders.

darl2ng avatar darl2ng commented on August 17, 2024

Hi,

Just for the record, I don't think a general circular case such as A needs B, B needs C and C needs A should fit with a binding solution. Indeed, binding to me would be the case where A needs B and B needs A, thus both direction.

Thanks for your great work,

from swiftsuspenders.

darl2ng avatar darl2ng commented on August 17, 2024

I'd like to add that a setter injection that supports circular injection as in Spring could be interesting :-)

http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#d0e2299

from swiftsuspenders.

tschneidereit avatar tschneidereit commented on August 17, 2024

I'd like to add that a setter injection that supports circular injection as in Spring could be interesting :-)

http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#d0e2299

While I agree that having support for circular dependencies would be
handy, supporting it would require a major rewrite of core parts of
Swiftsuspenders. I'm very unlikely to do this rewrite, so I'm afraid
this isn't going to happen, sorry.

from swiftsuspenders.

MindScriptAct avatar MindScriptAct commented on August 17, 2024

Hi,

circular dependencies are supported in mvcExpress. Currently it is on the branch : release_1.0

MindScriptAct/mvcExpress-framework@9e15e2e

My approach is simple - if dependency is not satisfied AND pending injection feature is enabled - injection goes to pending dependencies registry.
If dependency is set in fixed(can be changed) time frame... all is well.. if not - error is thrown.

By default I disable the feature because some nasty synchronization problem might occur if programmer does not know what he is doing...

Maybe it will help.

cheers.

from swiftsuspenders.

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.