Code Monkey home page Code Monkey logo

Comments (3)

mbierlee avatar mbierlee commented on August 12, 2024

Your second example hits close to how you can solve this:

SessionFactory sf = new SessionFactoryImpl(mySchema, mysqlDialect, myDatasource);
auto container = DependencyContainer.getInstance();
container.register!(SessionFactory).existingInstance(sf);

See TUTORIAL.md (Dependency scopes) for more details.

Constructor injection is on my list of features I want to look at in the future as well as simplified integration with libraries which weren't made with dependency injection in mind.

from poodinis.

SingingBush avatar SingingBush commented on August 12, 2024

thanks, I ended up spotting that in one of the unit tests and tried it out and found that I couldn't use it with my version of dmd. So I've now updated to dmd v2.069.2 but that breaks hibernated, so I'm now waiting to see if they release a new update.

My day job is mostly Java with Spring, so I'd really like to be able to use more of the convenient features I'm used to having.

As well as constructor injection I'd really like to have the ability to essentially do an annotated app context. So Configuration, Value, and Bean or something similar with the Service and Component annotations.

Jpa style orm is my main need though. Do you have any plans to do something like: poodinis-orm?

from poodinis.

mbierlee avatar mbierlee commented on August 12, 2024

Annotated context configuration and eventually auto-scanning are on my list of things I will look at in the future. Unfortunately D's runtime (and compile-time) reflection capabilities are not as flexible as that of Java's so anything meta-programming related takes some more effort to work out.

I have no plans for integration with (jpa-like) ORM frameworks as of yet since my primary use only involves integration within my own frameworks. Whenever I have to integrate with an external library I write a service around it.

from poodinis.

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.