Hi All, If this is about unit testing on DAO, we are also experimenting with simple JDBC approach[1]. No Dependency Injection. We could test the DAO, the SQL correctness etc. because there is no Mock objects.
I am not in favor of DI on developing a platform as we have no control over which get wired at the runtime. OSGI is already a kind of "dependency injection" and we have more than enough issues with that. [1] https://github.com/wso2/carbon-identity-providers/blob/master/components/identity-provider/org.wso2.carbon.identity.provider/src/test/java/org/wso2/carbon/identity/provider/dao/IdentityProviderDAOTest.java Cheers, Ruwan On Tue, Nov 1, 2016 at 4:10 PM, Manuranga Perera <m...@wso2.com> wrote: > I like Guice as well, but since we already have OSGi, (if we do have OSGi) > shouldn't we leverage that ? > > On Tue, Nov 1, 2016 at 5:37 AM, Uvindra Dias Jayasinha <uvin...@wso2.com> > wrote: > >> >> >>> Spring too supports dependency injection (since its first release in >>> early 2000s), anyone knows the differences between Spring and Guice? >>> >>> >>> I checked up on this, mainly Spring was the alternative to the bloated >> JavaEE. So its a fully featured framework with lots of stuff including the >> ability to do dependency injection. >> >> Guice is a light weight library that only focuses on DI. So if you want >> just DI, Guice is nice and simple as opposed to a heavier framework like >> Spring that has a lot more in it. >> >> -- >> Regards, >> Uvindra >> >> Mobile: 777733962 >> >> _______________________________________________ >> Architecture mailing list >> Architecture@wso2.org >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> >> > > > -- > With regards, > *Manu*ranga Perera. > > phone : 071 7 70 20 50 > mail : m...@wso2.com > > _______________________________________________ > Architecture mailing list > Architecture@wso2.org > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > >
_______________________________________________ Architecture mailing list Architecture@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture