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 1,735 other followers

Archive for the ‘Design Patterns’ Category

Design Patterns aren’t the goal, especially if you can cover the pattern with a language feature

Posted by jpluimers on 2019/10/15

Interesting read: [Archive.is] Are Design Patterns Missing Language Features.

On various places, it has been claimed that use of DesignPatterns, especially complex ones like VisitorPattern, are actually indicators that the language being used isn’t powerful enough. Many DesignPatterns are by convention rather than encapsulable in a library or component, and as such contain repetition and thus violate OnceAndOnlyOnce. If it didn’t contain at least some repetition, or something that could be Refactored out, then it wouldn’t be a pattern.

When applying design pattern, always remember that back then the Gang of Four wrote their book, languages were less powerful than now.

So always check if a design pattern cannot be applied by using a feature of the language you are using.

Examples from that page:

A list of DesignPatterns and a language feature that (largely) replaces them:

 VisitorPattern  .............. GenericFunctions (MultipleDispatch)
 FactoryPattern  .............. MetaClasses, closures
 SingletonPattern ............. MetaClasses
 IteratorPattern............... AnonymousFunctions 
              (used with HigherOrderFunctions, 
               MapFunction, FilterFunction, etc.)
 InterpreterPattern............ Macros (extending the language)
               EvalFunction, MetaCircularInterpreter
               Support for parser generation (for differing syntax)
 CommandPattern ............... Closures, LexicalScope, 
               AnonymousFunctions, FirstClassFunctions
 HandleBodyPattern............. Delegation, Macros, MetaClasses
 RunAndReturnSuccessor......... TailCallOptimization
 Abstract-Factory,
 Flyweight,
 Factory-Method,
 State, Proxy,
 Chain-of-Responsibility....... FirstClass types (Norvig)
 Mediator, Observer............ Method combination (Norvig)
 BuilderPattern................ Multi Methods (Norvig)
 FacadePattern................. Modules (Norvig)
 StrategyPattern............... higher order functions (Gene Michael Stover?), ControlTable
 AssociationList................Dictionaries, maps, HashTables
                    (these go by numerous names in different languages)

Food for thought…

–jeroen

Posted in Design Patterns, Development, Software Development | Leave a Comment »

Many Computer Science concepts do not apply to Enterprise Applications

Posted by jpluimers on 2019/10/08

Old long read: [WayBackEnterpriseApplication; Martin Fowler 24 March 2014

Via: [WayBackWeekend Reader 2017.46 – reality-loop:

Characteristics of Enterprise Applications

It’s an old article but I like to come back to it from time to time: Martin Fowler describes the term “Enterprise Applications” and explains why some concepts from classical “Computer Science” are not applicable.

–jeroen

Posted in Design Patterns, Development, Software Development | Leave a Comment »

Design Patterns & Refactoring

Posted by jpluimers on 2019/07/16

Design Patterns and Refactoring articles and guides. Design Patterns video tutorials for newbies. Simple descriptions and full source code examples in Java, C++, C#, PHP and Delphi.

Source: [WayBackDesign Patterns & Refactoring.

And indeed a lot of examples in Delphi too; few sites have that: Delphi site:sourcemaking.com.

–jeroen

Via: [WayBack] I stumbled upon this yesterday, very informative, accessible and also with Delphi examples – among other languages. – Steffen Nyeland – Google+

Posted in .NET, C, C#, C++, Delphi, Design Patterns, Development, Java, Java Platform, PHP, Scripting, Software Development | Leave a Comment »

On my research list: Event Sourcing

Posted by jpluimers on 2019/04/23

On my research list: [WayBackEvent Sourcing

Capture all changes to an application state as a sequence of events.

I got there via a very interesting thread [WayBack] A foreword===Hello everybody, the two major things that were recently introduced into my software architecture which led to significantly better main… – Edwin Yip – Google+

–jeroen

Posted in Design Patterns, Development, Software Development | Leave a Comment »

The Fallacy of DRY – Entropy Wins

Posted by jpluimers on 2019/04/18

A must read post on why “Do Repeat Yourself” can be a good thing [WayBack/Archive.isThe Fallacy of DRY – Entropy Wins by Jeroen de Dauw (of WikiMedia Germany fame).

Ultimately, you want code to be easy to understand. This that when you apply the “Don’t Repeat Yourself” principle you need to ask yourself if the resulting code is still easy to understand.

He did some great talks too, for instance bit.ly/econ-cleancode, aan almost half our talk with open source slides which he [WayBackpresented during Source Code Berlin 2016

–jeroen

Read the rest of this entry »

Posted in Design Patterns, Development, DRY - Don't Repeat Yourself, Software Development | Leave a Comment »

 
%d bloggers like this: