Qafoo GmbH - passion for software quality

Help you and your team benefit from new perspectives on cutting-edge quality engineering techniques and tools through the Qafoo team weblog.

Object Oriented Design

  • OOD: Injectables vs.Newables

    by Tobias Schlitt on Fri, 29 Sep 2017 08:40:59 +0200

    Many projects I join - even those that claim to already do dependency injection - suffer from issues that result from mixing injectable and newable classes. Keeping these two appart seems to be challenging for many developers so that I try to give them a handy guide with Do's and Dont's in this blog post.

    Read more on OOD: Injectables vs.Newables…
  • Methods Of Teaching

    by Kore Nordmann on Wed, 28 Jun 2017 07:26:46 +0200

    There are many different ways to teach topics of software developments. From recorded lectures to pair programming. Over the time we tried many of them with different customers and different topics. I want to provide you with an overview of what worked best for us for which topic.

    Read more on Methods Of Teaching…
  • When To Abstract

    by Kore Nordmann on Tue, 17 May 2016 12:30:54 +0200

    One of the most difficult challenges in a developers life is finding the "right" abstraction, or at least the best one given the current circumstances. The core problem is that abstraction is a bet on the future development of the software and we know that future is volatile. The circumstances will change, so will the view on the best abstraction change.

    Read more on When To Abstract…
  • Never Use null

    by Kore Nordmann on Tue, 03 May 2016 08:58:13 +0200

    When doing code reviews together with our customers we see a pattern regularly which I consider problematic in multiple regards – the usage of null as a valid property or return value. We can do better than this.

    Read more on Never Use null…
  • Teaching and Learning Domain-Driven Design without Patterns

    by Benjamin Eberlei on Sat, 27 Feb 2016 11:01:20 +0100

    When development teams start to use Domain-Driven Design (DDD) in work projects, then one or more developers read the blue book by Eric Evans and start to apply patterns such as Entity, Repository, Services and Value Objects. In my experience with teams using DDD it can be very distracting to think in patterns. Read about a more practical way to get started…

    Read more on Teaching and Learning Domain-Driven Design without Patterns…
  • Developers Life is a Trade-Off

    by Kore Nordmann on Wed, 27 May 2015 10:58:03 +0200

    At Qafoo, we train a lot of people on topics like object oriented software design, automated testing and more. It happens quite often that an attendee asks questions like "Which is the best solution for problem class $x?", "What is the optimal tool for task $y" or "There is a new technology $z, is that the future of web development?". Some are disappointed when I reply "It depends" or "That does not exist", but that's the truth.There is no silver bullet and one of the most important skills every developer needs to hone is to assess possibilities and to find the best trade-off for the current challenge.To make that point clear I'm giving three examples from my personal experience, some where it went well and some where it did not.

    Read more on Developers Life is a Trade-Off…
  • Utilize Dynamic Dispatch

    by Tobias Schlitt on Thu, 16 Oct 2014 07:00:50 +0200

    A while ago I replied to the tweet by @ramsey

    Traits are a nice way to provide common functionality to unrelated classes without using static methods on a global Util class.
    with
    Which makes them exactly as evil as static access. Funktionality you dispatch to becomes irreplaceable destroying a fundament of OO: Dynamic dispatch.
    I want to use this blog post to illustrate the concept of dynamic dispatch which I use a lot recently to motivate creating clean OO structures in my trainings. In my experience, this helps people to understand why we want to write code in this way. After that I will show why traits are bad in this direction.

    Read more on Utilize Dynamic Dispatch…
  • Learn OOD - to unlearn it again

    by Tobias Schlitt on Tue, 11 Feb 2014 07:09:59 +0100

    One topic we regularly teach in workshops for our customers is object oriented design (ODD), i.e. the art of crafting classes/interfaces in a way that the result is an easy-to-understand, maintainable and flexible code base. With the agile focus on shipping working software, some might consider the skill of OOD less important. One popular argument is that quick reaction to change is more important than designing objects and their interaction carefully. I personally look at it the exact other way around. This blog post summarizes why you need to learn OOD first, in order to avoid it to some degree again.

    Read more on Learn OOD - to unlearn it again…
  • Code Reuse By Inheritance

    by Kore Nordmann on Mon, 20 Jan 2014 11:19:12 +0100

    To me, inheritance has two properties:

    • Defining an is-a relationship
    • Making it possible to share code between classes by extending from a common base class
    The is-a relationship between classes is one thing I like to use inheritance for. So, to me, a concrete Cache - for example a MemcacheCache implementation - extending from an abstract Cache base class is a very sane thing to do. Implementing an interface means, in my opinion, adding an additional usage aspect / feature to a class, while the base class defines the type of a class. Mind: The base class, most likely, only defines abstract methods and does not provide any implementation in this case. I discussed this in more detail in a dedicated blog post, which is why I skip a detailed explanation now.

    Read more on Code Reuse By Inheritance…
  • ContainerAware Considered Harmful

    by Tobias Schlitt on Mon, 07 Oct 2013 11:25:46 +0200

    A while ago I tweeted

    ContainerAware is the new Singleton.
    While many people agreed by retweeting and faving. I feel the need to elaborate some more on this statement and safe the explaination for the future.

    Read more on ContainerAware Considered Harmful…
1 - 2