Fun with Interfaces

  • Post comments:4 Comments
  • Reading time:2 mins read

Today I've streamed the Fun with Interfaces video blog at https://www.youtube.com/watch?v=QSMHL32c5mg and the recording is now published online. This was the first session I ever delivered about interfaces, and I…

Continue ReadingFun with Interfaces

Codeunit interfaces in AL

  • Post comments:4 Comments
  • Reading time:10 mins read

Nearly two and a half years ago I had a dream. It was about codeunit references and codeunit interfaces. And today, nearly two and a half years later I am still here, still having the same dream. We still cannot do codeunit interfaces in AL. But it doesn’t mean we don’t need them. We do. We badly do.

Two things triggered me to write this post about how badly we need codeunit interfaces, or any kind of polymorphism: a NAV TechDays talk, and a github project I saw.

(more…)

Continue ReadingCodeunit interfaces in AL
Read more about the article Module Binder Pattern proposal
Zlata Praha, by Roman Boed

Module Binder Pattern proposal

  • Post comments:7 Comments
  • Reading time:24 mins read

Whoa! This has been quite an event, the Directions EMEA 2016 in Prague. There has never been this many people (1.700+) and it was quite a pleasure connecting again with old friends, and meeting new friends. Also, it has been quite a pleasure listening to many good sessions, and an even bigger pleasure delivering four of them.

And this is why I am blogging now – to follow up on my promise during my Polymorphic Event Patterns for C/AL. I promised you that I’d post my pattern proposal online, and here I am doing it.

Let’s get started.

(more…)

Continue ReadingModule Binder Pattern proposal

I had a dream: codeunit references

  • Post comments:20 Comments
  • Reading time:10 mins read

Polymorphism is a great thing. .NET, Java, C++ and other folks have enjoyed its benefits for a long time, some more than a quarter century already. Meanwhile, we, the meager C/AL bunch, can only dream about it and draft our little patterns that all come short of it if only by a tiny bit.

Sometimes it feels like writing code with a chalk on a blackboard. There may be no end to your imagination, but there is a very real end to what the board can do for you.

But dream we can. And let me have another dream.

(more…)

Continue ReadingI had a dream: codeunit references

Gentlemen’s agreement pattern, or handling the “Handled” pattern

  • Post comments:9 Comments
  • Reading time:13 mins read

I’ve delved deep into design patterns story with my last two blog posts, but I am far from over. The patterns I discussed are the ones we could use up until NAV 2015 (we can still use them, of course!) but some more robust loose coupling (excuse the near-oxymoron) can be achieved with what NAV 2016 brought along: events.

It’s the “Handled” pattern. This pattern comes from Thomas Hejlsberg, a chief architect and CTO of Microsoft Dynamics NAV, and was first described by Mark Brummel on his blog. It’s a powerful loose-coupling pattern that successfully addresses the shortcomings of all design patterns I discussed earlier. I would prefer calling this pattern Event Façade rather than “Handled”, but it’s not my baby to christen.

Let’s take a look.

(more…)

Continue ReadingGentlemen’s agreement pattern, or handling the “Handled” pattern