I love the idea of dependency injection. I started doing psuedo dependency injection on my own before I knew about DI because I was frustrated programming without it. I then discovered Guice. From a program design point of view, I like it a lot. Everything is much more decoupled and testable. But from a programming perspective, I absolutely hate it. First off, using generics (because of type erasure) is a nightmare. Creating factories for everything that has paramatized constructors (basically everthing) is almost painfull. When I have a generic factory... I sometimes just stop programming and give up. It's too …

Member Avatar
Member Avatar
+1 forum 2

Good morning all I'm having a problem with injecting a class into the constructor of another class. I am creating an MVC framework, for learning purposes. In bootstrap.php, it loads the various classes needed, and also instantiates a few classes Code snippet for bootstrap.php below. <?php /** * file: /system/core/Bootstrap.php * System initialization begins here * Retrieve all essential files, and * instantiate classes */ // Start the autoloader require_once(__DIR__.'/../core/Autoload.php'); // Load files from /system/config $autoload->config( array('config', 'paths') ); // Load files from /system/core $autoload->core( array('router', 'template', 'loader', 'database', 'KW_Controller') ); // Load helper files from /system/helpers $autoload->helper( array('formatter', 'date', …

Member Avatar
Member Avatar
+0 forum 1

Having just found 'traits' - see http://www.daniweb.com/web-development/php/threads/468928/php-trait-method-conflicts-trait-inheritance#post2043565 I was wondering whether they could be used to share a DB connection object across disparate classes, or would the old singleton or dependency injection methods still be the way to go? I'd value any views on this.

Member Avatar
Member Avatar
+2 forum 2

I'm having trouble identifying the functional dependencies! relation schema is SCHEDULE = {course, teacher, time, room} What are the functional dependencies for: 1. The same course is always taught by the same teacher? 2. Different courses can never be taught in the same room at the same time? 3. The same lecturer can never teach in different rooms at the same time? Cheers.

Member Avatar
Member Avatar
+0 forum 1

If i have a jar file on a server, and i have a program that needs to use the file as a dependency on the server also. How could i patch up the code to build without the dependecy before i deploy it. I know it can use the dependency once it is up on the server, but if i take it out now in the IDE it will give errors. How do i get around this?

Member Avatar
Member Avatar
+0 forum 1

Hi All, I'm using SOAP::Lite to do some online payments. The whole mechanism is set on separate machine which is communicating with payment gateway. So WWW machine sends a message to invoke SOAP::Lite and SOAP message is sent to payment gateway. In development I had both "machines" running on one (separate instances) and there was no problem, but the moment it went on two separate machines I got this error from SOAP::Lite : Code execution error: Method [ method_name ] returned error: Insecure dependency in eval while running with -T switch at /usr/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm line 3225 Any idea? Milos

Member Avatar
Member Avatar
+0 forum 2

Hello would anyone be able to help me to understand how the following answer is derived? Given R < A= {V,W,X,Y,Z}, [CODE]Gamma = {V -> Y, YW -> Z Y -> W}> [/CODE] RTP VWY -> Z and VXY ->Z Answer: augment 3 by Y Y -> W Thank you

Member Avatar
+0 forum 0

Does anyone know of a tool, or any solution (preferably free), to automatically generate editable assembly dependency graphs (such as Visio diagrams)? I have found similar threads online, but the several tools recommended (.Net Reflector Graph add-in, Dependency Visualizer, GraphViz, etc) generate only image files (PNG, JPG, SVG, etc). The solution I need to reverse engineer is composed of over 75 projects, with hundreds of dlls. Even sub-system graphs are unintelligible, so we want to tweak / edit them, find common recurrences to isolate them into separate graphs, etc. We need something that can do the bulk brainless part for …

Member Avatar
Member Avatar
+0 forum 1

Hi all, Our small business is currently using an online file server for our file sharing needs. Recently, there have been complaints around the office about the server. In particular, the problem people have the biggest issue with is file linking. MS Excel links don't work for files on the server (where you link cells in one worksheet file to automatically update based on cells in another worksheet). After speaking with customer support, the service told me that we should get a NAS device and set it up to work with their file backup. I'm fine with the idea of …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have created a window service and set some dependencies like on MSMQ, MSSQLSERVER and so. Everything is working nice. but i need to send another dependency for my service. That is on internet connection. My service is responsible for sending emails. As soon my server starts, my service starts too and it finds if there is anything to send, if there is, it starts to send email, if during sending it is not able to connect to the internet it cannot send email. so i guess i should set my service dependency on internet connection too. I already …

Member Avatar
+0 forum 0

The End.