|
ID: 28673, Roll Your Own Dependency Injection demo
This is a demo program provided for a blog entry in the ADUG blog.
|
Download
| Details
|
|
FTP
download also available
|
|
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
|
To download this, you must have registered:
|
For Delphi, Version 16.1
to 16.1
75 downloads
Copyright: No significant restrictions
Size: 16,157 bytes
Updated on Tue, 20 Dec 2011 17:59:34 GMT
Originally uploaded on Mon, 19 Dec 2011 23:07:18 GMT
SHA1 Hash: 4FD5B1B83CC77B650588197A21B36E42037A83D5
MD5 Hash: F6B4D03BE38A3959FFD6F54C84A59512
|
Explore the files in this upload
File Exploration is Disabled
We're sorry, but errors in the uploaded zip file prevent it from being explored.
The error generated by the Zip attachment is:
You may still be able to repair the zip file contents if you download the entire zip locally. You may also want to ask the author to repost the attachment.
|
Description
|
In Part 1 we covered the beginnings of rolling your own Dependency Injection framework as an alternative to using the Delphi Spring Framework. We discussed the patterns and objects involved and described using RTTI to perform the actual injection. Now we'll look at an example of using DI to inject logging functionality into an object.
So, here is what DI looks like in action. Let's say you build a car and all the salient action on that car, including construction, is logged in a logger. In Listing 1, ILogger is an interface to some event logger like CodeSite, SmartInspect or maybe just writes lines to a text file. ICar uses an instance of ILogger on the inside to record vehicle events.
(continued in blog)
|
|

Server Response from: ETNACDC04
|
Connect with Us