Decoupling dependencies in C/AL

  • Post comments:8 Comments
  • Reading time:12 mins read

Directions US 2016 (yes, 2016, sorry y’all who got the 2017 link in your mailbox) was quite an event. As Directions always is, a lot of people, enthusiastic about this market we strive to thrive in, and about the product we love no matter the limitations we often face when we aim for better, more scalable architectures.

If anything, it reminded me of a long to-do list I have had around for this blog for a while, and I decided to start cleaning it up. The topic of my main session this year was loose coupling of dependencies (I called it polymorphism, because that’s what I’d ultimately like to see possible in C/AL) and I presented two patterns I came up with during my past few years.

Before I present them here on my blog, I wanted to put them in a broader context: loose coupling. So, this is what this post is all about: explaining what loose coupling is, how to achieve it in C/AL, and why you will not want to live without it ever again.

(more…)

Continue ReadingDecoupling dependencies in C/AL

Directions US 2016: Goodbye, Phoenix!

  • Post comments:1 Comment
  • Reading time:3 mins read

Directions US. What more to say than: wow! This was an amazing conference, again. A lot of people, a lot of vibe, a lot of NAV. And this year, a lot to look forward to.

Microsoft didn’t disappoint with the news. Dynamics 365 is here with new paradigms, apps are the new big thing, and they really are. There are a lot of improvements in NAV 2017, in the technical stack and in the application alike, and there is a new code editor, something the geeky part of the NAV community has been waiting for a long time. All in all, quite something.

As always at Directions, I was busy. This year I got two sessions, and both of them went well. Thanks to all amazing people who participated and shared their thoughts and encouragement. The good tradition calls for me to post my content here on my blog, so here we go.

(more…)

Continue ReadingDirections US 2016: Goodbye, Phoenix!

OnAfter table event subscriber patterns and antipatterns

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

The purpose of events is to simplify business logic customization while not impeding upgradeability and general extensibility. However, there is one particular class of events that may cause troubles: OnAfter* table events. There are four of them: OnAfterInsert, OnAfterModify, OnAfterDelete, and OnAfterRename.

If you need them, you must be careful.

(more…)

Continue ReadingOnAfter table event subscriber patterns and antipatterns

NAV performance part 4: SQL Azure

  • Post comments:1 Comment
  • Reading time:9 mins read

SQL Azure is a very interesting service. It’s as interesting as it is misunderstood both in terms of how exactly it works, and what it’s intended to be used for.

First of all, it’s not really the same thing as SQL Server that you install on your box, virtual or physical. It certainly provides the same functionality, and from functional perspective most of things you can do with SQL Server, you can do with SQL Azure. But it behaves in so many different ways that you can’t truly compare them side by side.

Another thing is what SQL Azure was designed for. It’s designed for massive cloud workloads where concurrency is more important than sheer speed. And in that respect it is just brilliant. However, to get most out of it, you have to write and optimize your database access code specifically to take advantage of its features and behavior, otherwise, you simply get performance that can be qualified as mediocre at best.

What happens when you put NAV on SQL Azure? Well, that’s something that you certainly can do – Microsoft does it as well. The thing is – it works. It leaves a bit to be desired if you intend to run heavy processing, but my firm conviction – having tested it and having gone medieval on it with my tests.

Let’s take a look.

(more…)

Continue ReadingNAV performance part 4: SQL Azure