The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,386 other followers

Archive for the ‘Inversion of Control / IoC’ Category

Cape Cod Gunny Does Delphi: Gunny Meets Uncle Bob – Part 1

Posted by jpluimers on 2018/08/16

I like how Michael Riley compares his learning quest of software development to things he learned in real life:

  • Gang of Four Patterns = Chess
  • POSA Patterns = Golf

Note that JJDIDTIEBUCKE is actually 14 parts of Marine Corps leadership.

Software development is all about learning and making connections. Like life: learn new things and relate them to existing ones each and every day.

Given Michaels military background, I understand the comparison and the reference that Eric Grange makes. I think good software development is finding the balance between guerrilla and traditional thinking. Don’t loose yourself into patterns and processes, pick the ones that fit you best at the time you use them. This requires reflection which is often neglected.

I also like the comment thread in the post, so I’ve extracted some really useful information below.

Source: [WayBackCape Cod Gunny Does Delphi: Gunny Meets Uncle Bob – Part 1

From the comments

Note I don’t agree with everything, but I they make me think about my profession.

Joseph Mitzen:

Don’t give in to the conventional thinking about “design patterns”. Design patterns are language smell. They’re a sign of places where a language is broken. They’re not some sort of gospel truth. Most of the patterns don’t even exist in languages like Lisp.

Google’s Joe Gregorio emphasized this point in a talk in 2009:

You don’t need to understand 24 patterns for a language you don’t program in to be a good programmer.

Embrace Joe Gregorio, Dr. Peter Norvig, and Paul Graham… become the anti-Hodges!

Michael Riley:

+Joseph Mitzen I agree when Martin says, “Your system architecture should be as ignorant as possible about how it is to be delivered. You should be able to deliver it as a console app, or a web app, or a thick client app, or even a web service app, without undue complication or change to the fundamental architecture.”

I agree when Martin says at a minimum software professionals should be able to describe the GoF patterns and have a working knowledge of the patterns describe in the POSA books.

My pursuit to learn Dependency Injection is taking me in directions I didn’t know about and didn’t expect I be going.Hodges is my fallback position because the only mainstream language I know is Pascal. When I see the code examples he uses I understand them… it’s the concepts I’m having a hard time with.

I just now today am learning Java. This time around it is very exciting and fun. I’m totally amazed at the NetBeans IDE. I’m very impressed with JavaDocs. At this point I’m finding myself question why I should continue to pursue Delphi.

The bottom line is this: I want to make the next release of my software able to support mobile customers, web customers, windows customers and mac customers.

I feel like I’ve been given a chance to go back to high school and start over again.

Michael Thuma:

It’s not Java that confused you. It’s the combination of the Class Library and Framework. Object Orientation simply starts with using Objects. No one needs to go further beyond, which is the original idea.

There is no such a ‘dumb’ Delphi developer for example who just uses components or the classes provided. The programming world is not divided into programmers or not. Those who define classes and provide them share a common space with those who simply use (Framework). You need to play first and play it loud.

Different example from the relational world. A DB design has nothing to do with Entity Relationship which is maybe the dominating approach. The relational model is capable of a lot more than this tiny but widely used subset.

Thinking in terms of E/R limits the scope of taking opportunities. The same way you limit yourself to one specific paradigm when it comes to programming languages. All the others make up the difference.

The Java framework is heavy. It was redesigned about 15 years ago with design patterns in mind. Design patterns were introduce to extend or put the focus on reusability which does come for anything but free even in the object oriented world. That’s why these patterns became integral part of software architecture.

Eric Grange:

All good points, but one key difference with military is that in development, Rambos routinely trounces whole armies, and not just in movies. And guerilla tactics usually win over more formal armies and approaches.

IOW shops with established methodologies are regularly overtaken by startup proof of concepts, and experienced teams are all too often outsourced by management that think they’ve found a (cheaper) guerilla team.

Don’t let that stop you from learning, but it’s a wholly different battlefield…

The comment thread also reminded me that  the GoF patterns in Delphi has moved since I wrote GoF Patterns in Delphi | Implementations of the famous Gang of Four Design Patterns in Delphi language – via Nick Hodges, so I learned this:


via: [WayBackLars Fosdal – Google+

Read the rest of this entry »

Posted in Dependency Injection, Design Patterns, Development, Inversion of Control / IoC, Software Development | Leave a Comment »

Inversion of Control explained in a few sencences

Posted by jpluimers on 2015/02/04

One of the difficult things with design principles like Inversion of Control, is that virtual all descriptions are lengthy and therefore difficult to grasp.

I’ve been using interfaces to decouple software for a long time, but it also took me a while to get IoC, especially the Inversion part.

The first time I got the Inversion principle was when reading the answer  by Derek Greer to What is the Dependency Inversion Principle and why is it important? and especially the summary in the comment by Patrick McElhaney:

The difference between MyService → [ILogger ⇐ Logger] and [MyService → IMyServiceLogger] ⇐ Logger is subtle but important.

A similar explanation can be found in the somewhat longer, but very well written articles Dependency Injection Is NOT The Same As The Dependency Inversion Principle and A curry of Dependency Inversion Principle (DIP), Inversion of Control (IoC), Dependency Injection (DI) and IoC Container.

The whole point of the “Inversion” part is twofold:

  1. you declare the interface (ILogger) between a service user (MyService) and a provider (Logger) close to the user.
  2. you do this so that MyService does not need to change when you switch to a different provider: a new Logger provider needs to implement the ILogger interface too, even if it is from a completely different source or vendor.

Keeping that interface stable has the consequence that there will be more work on the provider side, for instance by using the adapter pattern to map the provider to the interface.

Knowing this, it was far easier to understand these articles that are often regarded as the fundamental ones, most from Martin Fowler’s site:


Posted in Dependency Injection, Design Patterns, Development, Inversion of Control / IoC, Software Development | 1 Comment »

Some links to Delphi Unit Testing history

Posted by jpluimers on 2015/01/29

Unit testing has been here for a long time, and so has Unit Testing in Delphi. Below a summary of historic links together with some notes on how the state of affairs changed over the years.

Charlie Calvert

I’ll start with one of the first large Delphi Unit Testing articles was a paper by Charlie Calvert summarizing the state of the art on Delphi Unit Testing in 2004. It is present in the wayback machine as DUnit Talk and on his site.

Note that the site is sometimes slow or hard to reach. Since his evangelist days at Borland/CodeGear, Charlie has moved through a few evangelist jobs at Falafel and Microsoft and finally went back to his old profession: being a great teacher – this time at Bellevue Collegeoften using script based languages and cloud computing, with less focus on his web-presence.

Many of his IT books (during his writing period, he wrote both as Charles Calvert and Charlie Calvert) are still relevant though.

DUnit; Juanco Añez Read the rest of this entry »

Posted in Agile, Conference Topics, Conferences, Delphi, Dependency Injection, Design Patterns, Development, Event, FreePascal, History, Inversion of Control / IoC, Pascal, Software Development | 3 Comments »

%d bloggers like this: