Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 67 results for
dependency-injection
- Page 1
dependency injection - angular 4 vs spring
Programming
Software Development
6 Years Ago
by ekka
hello guys I want to know about
dependency
injection
in angular 4 and spring , so I gonna start with …what I know : in angular 4 we inject the
dependency
by setting the service ( or something else ) in the constructor…, so is the same value, my question is: how the
dependency
injection
work in spring, I don't want a theoretical lesson…
Problem with dependency injection
Programming
Web Development
10 Years Ago
by flynismo
…->view('errors/controller'); } } Now, instead of trying to use
dependency
injection
by injecting the Router class as shown above, if I…
Using traits instead of dependency injection
Programming
Web Development
10 Years Ago
by diafol
… object across disparate classes, or would the old singleton or
dependency
injection
methods still be the way to go? I'd value…
Best practices when doing dependency injection with Entity Framework
Programming
6 Years Ago
by Pelle_3
… am using Entity Framework and decided to do some
dependency
injection
in order to make my functions more testable. This….Where( ... ) return true; } } Now, before I used constructor
injection
, I did like this inside every function in the class…'s your opinion? I'm quite new to
dependency
injection
with EF, so be kind :)
Java Basics - Dependency Injection
Programming
Software Development
1 Year Ago
by dimitrilc
… article, you would have learned: 1. What
dependency
injection
is. ## Prerequisite Knowledge ## 1. Basic Java. ##
Dependency
Injection
vs. Inversion of Control ## IoC refers to… classes that provide dependencies to your class. ### Common types of
Dependency
Injection
### The three most common types of DI are: 1. **Constructor…
Dagger 2 - Constructor Dependency Injection in Kotlin
Programming
Mobile Development
2 Years Ago
by dimitrilc
…learned: 1. How to use Dagger constructor
injection
. ## Prerequisite Knowledge ## 1. [What
dependency
injection
is.](https://www.daniweb.com/programming/software-…development/tutorials/538278/java-basics-
dependency
-
injection
) 2. Basic Kotlin. ## Tools Required ## 1. IntelliJ Community Edition. …
Re: Problem with dependency injection
Programming
Web Development
10 Years Ago
by flynismo
Okay, so I just deleted the __constructor() in the KW_Controller class, and instead, passed the dependencies directly into the dispatch method....see new code below: <?php class KW_Controller { private $controller; private $controller_class; private $controller_filename; private static $action; …
Re: Using traits instead of dependency injection
Programming
Web Development
10 Years Ago
by pritaeas
I like the introduction [here](http://www.sitepoint.com/using-traits-in-php-5-4/) but I'm afraid traits will most likely be used like global functions. Most applications I've seen so far are dubious, more play than proper design. Traits come near multiple inheritance, and there's good reason most languages do not support it. It gets messy quickly. …
Re: Using traits instead of dependency injection
Programming
Web Development
10 Years Ago
by diafol
Fair points. I was just looking at whether I'd be able to give classes DB methods without having to pass the object (DI) or creating a singleton/static. I didn't really think it through that well I suppose. Ah well, at least my string-manipulation functions don't need to be base-classed or DI'd any more :) Thanks for the link and your views.
DependencyInjection seem ugly and too much work, Am I doing something wrong
Programming
Software Development
9 Years Ago
by mgold
I love the idea of
dependency
injection
. I started doing psuedo
dependency
injection
on my own before I knew about DI because I …
Re: DependencyInjection seem ugly and too much work, Am I doing something wrong
Programming
Software Development
9 Years Ago
by JeffGrigg
… injected into its constructor!" you object. True, but the
Dependency
Injection
(and factory) code should worry about that. The factory method…
Please answer .net interview Questions
Programming
Software Development
10 Years Ago
by venkates.99
… "simple" do
Dependency
checking for collaborators
Dependency
checking for primitive types and collections No
dependency
checking
Dependency
checking for collaborators, primitive types….Net is used to configure your application using
Dependency
Injection
? Spring.Reference Spring.Core Spring.
Dependency
64)Which is not a valid memory…
How to create a RESTful API with Spring Boot
Programming
Web Development
2 Years Ago
by dimitrilc
…development/tutorials/538277/java-basics-annotations) 2. [Basic understanding of
Dependency
Injection
.](https://www.daniweb.com/programming/software-development/tutorials/538278/java…-basics-
dependency
-
injection
) 3. [Basic understanding of HTTP requests.](https://www.daniweb.…
Android Native - Load Images with Coil
Programming
Mobile Development
2 Years Ago
by dimitrilc
…/main/res/drawable/triangle.png</string> 6. The
dependency
to the Coil library to your module **gradle.build** file… instead if you plan to inject the ImageLoader instance using
dependency
injection
. If you are instantiating a custom ImageLoader instance and having…
JDBC connection error: Communications link failure
Programming
Web Development
7 Years Ago
by newbee_jv
… ref="dbManagerBean" /> </bean> The ^ above
dependency
injection
is working correctly, as I can see the sysout print… after my
injection
. However, when I attempt to use my JdbcTemplate.query() method…
Re: modifying a final variable
Programming
Software Development
11 Years Ago
by ~s.o.s~
… (as mentioned above). > In the Spring framework, when doing
dependency
injection
, even if a variable is private and there is no… directly access the class privates. Spring has two forms of
injection
: setter and constructor. If your class doesn't have setters…
Java Web Development - Starting [tutorials / resources / faq]
Programming
Web Development
14 Years Ago
by peter_budo
… topics (The Web Tier, Web Services, Enterprise Beans, Contexts and
Dependency
Injection
for the Java EE Platform, Persistence, Security and Java EE…
modifying a final variable
Programming
Software Development
11 Years Ago
by bibiki
…? Another question would be: In the Spring framework, when doing
dependency
injection
, even if a variable is private and there is no…
Ionic - Passing Data to another page
Programming
Mobile Development
6 Years Ago
by SimonIoa
… AuthService provider. See https://angular.io/docs/ts/latest/guide/
dependency
-
injection
.html for more info on providers and Angular 2 DI…
Android Native - Inject Coroutine Dispatchers Into ViewModels Using Hilt
Programming
Mobile Development
1 Year Ago
by dimitrilc
…, you can define [custom qualifiers](https://developer.android.com/training/
dependency
-
injection
/hilt-android#multiple-bindings) to assist Hilt in deciding which…
Class dependency injection
Programming
Software Development
15 Years Ago
by Acidburn
Hey guys I've got a Factory that can return a database writing object. It takes in a config file that points it to which class to create an object of. Now this is were I'm stuck. Factory -> returns a database writter now there's more than 1 way of writing a database writter. In my case I wish to create a databasewritter than will write …
Re: Class dependency injection
Programming
Software Development
15 Years Ago
by JerryShaw
Your interface should have a few more properties, such as the server, database name, credentials. Besides that if may either subclass the writer to handle a Filename in the place of the server. Then in your writeMsg method, you would append the text to the specified filename.
Re: Class dependency injection
Programming
Software Development
15 Years Ago
by Acidburn
Jerry I'm not asking *How* to implement each class, more how to tell the compiler at runtime which object to create based on a text file.
Re: Class dependency injection
Programming
Software Development
15 Years Ago
by JerryShaw
Okay, maybe you can provide more detail. Walk me through exactly what you are trying to do. I assume you have a text file that is read on startup that has something that tells you how you want to write data. From there you want to instantiate an object that will either use a live database, or another text file for output. So in the constructor …
Re: Class dependency injection
Programming
Software Development
15 Years Ago
by Acidburn
Your method is the tree I'm trying to bark up. However I'm not sure how to turn a string into a class implementation. The text file contains paths from interfaces to the actual concrete implemenation of that requested class. So if the applicaiton wants to run in demo mode, where no database will be deployed, Dummy information must be retrived…
Re: Class dependency injection
Programming
Software Development
15 Years Ago
by JerryShaw
[code] namespace WindowsFormsApplication1 { public partial class Form1 : Form { // Class level variable private IDatabaseWriter _myDbWriter = null; private string _demoMode = "yes"; public Form1() { InitializeComponent(); if (_demoMode == "yes&…
Re: DependencyInjection seem ugly and too much work, Am I doing something wrong
Programming
Software Development
9 Years Ago
by rubberman
… is what you are getting at. In any case, method
injection
(register a method with a class at run-time vs…
Re: modifying a final variable
Programming
Software Development
11 Years Ago
by ~s.o.s~
… way of setting a private field without constructor or setter
injection
*unless* you are OK with using reflection to set your…
Re: Connect database in Class.
Programming
Web Development
13 Years Ago
by mschroeder
…alternative to this is would be to use
dependency
injection
. Loosely all this means is passing the …information on the two topics.
Dependency
Injection
[url]http://www.slideshare.net/fabpot/
dependency
-
injection
-with-php-and-php-53[/…]http://www.potstuck.com/2009/01/08/php-
dependency
-
injection
/[/url] Singleton Pattern [url]http://en.wikipedia.…
Re: what is local no-interface view?
Programming
Software Development
13 Years Ago
by swosh
… exposes a local, no-interface view is accomplished through either
dependency
injection
or JNDI lookup. * To obtain a reference to the no…-interface view of an enterprise bean through
dependency
injection
, use the javax.ejb.EJB annotation and specify the enterprise…
1
2
3
Next
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC