SSWUGtv
With Stephen Wynkoop
In todays edition Steve meets with Laura Rose asking the question "What is the place of socializing (texting, IM, etc) in the workplace?" You may be surprised at some of the answers.
Watch the Show
SOLID – Dependency Inversion Principle
This is the last in the series of SOLID principles, covering the topic of Dependency Inversion. Dependency is essential to make software work. However, if your class dependencies are based on abstractions (Interface or abstract class) then the classes implementing the abstractions may be replaced without impacting any and every consumer.
Dependency Injection is a good implementation of the Dependency Inversion Principle. Using Dependency Injection, a consumer passes a desired kind of implementation to a class capable of resolving the correct implementation required, returning the correct object.
One of my favorite examples is having a web app that can save data to a web service, an XML File, or a relational database. The user says, Save to XML. The web application knows nothing about how to save XML; but it knows how to call a persistence controller that returns a class that will save the data as an XML file. The Class supporting XML is based on an interface shared by the web application. The Web site, in this instance is injecting through a controller, the information necessary to implement the correct type of Class to persist the data to XML.
Dependency Injection is a popular technique in Model/View/Controller and has gained rapid popularity as MVC 4 has been released in Dot Net. There are a number of tools out there that automate this process from one degree to another. It would be worth your time for a Google search on Dependency Injection.
Dependency Injection is one technique of implementing Dependency Inversion. They are not equivalent concepts.
I hope you have found this review of SOLID principles to be beneficial. This is the second time I have done this topic here at SSWUG. I find each time I get better at understanding and implementing the principles in my daily work. I wish you find the same success.
Cheers,
Ben
$$SWYNK$$
Featured Article(s)
Don’t Forget DISPLAY as a Part of Your DB2 Tuning Efforts (part 3)
Although a DB2 performance monitor is probably the best solution for gathering information about your DB2 subsystems and databases, you can gain significant insight into “what is going on out there” using the simple DISPLAY command. The DISPLAY command can be used to return information about the status of DB2 data sharing groups, databases and table spaces, threads, stored procedures, user-defined functions, utilities, and traces; it can also monitor the Resource Limit Facility (RLF) and distributed data locations. Let’s take a quick tour of the useful information provided by the DISPLAY command.
Featured White Paper(s)
All-At-Once Operations
Written by Itzik Ben-Gan with SolidQ
SQL supports a concept called all-at-onc… (read more)