Skip to content

Differences with ditox #33

@BANOnotIT

Description

@BANOnotIT

Hello!

I saw a library called ditox which has almost same interface like your library do and several questions emerged:

  1. Isn't .inSomeScope() more error prone then ditox's {scope:"some"} argument? I sometimes forgive to add these scope calls and only remember that when see warnings in console
  2. Your approach for declaring injection gives people ability to declare it in place of Class declaration thus might lead to mix up DI and services. (this is already mentioned in DIP Violation #28). Ditox's approach with generating factories instead leans to group all DI-related declarations together.
  3. Your tag based conditional injection is a great idea! Do you think factory based instance generation is a little bit more flexible?

I wrote this issue not to clash you and @mnasyrov but to know your position on these design decisions. I already use your library in some projects and it might be better for others who find your or ditox to know which one fits their case best.

P.S. @mnasyrov @vovaspace don't you think it'll be great to have links to each other's projects to increase awareness of options?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions