Posts in Category: architecture

JSON Schema Regular Expressions

One of the best parts about the JSON Schema evaluation is the simple use of Regular Expressions to validate your data.  JSON Schema lets you embed any regular expression into the properties that you create using relatively simple syntax.

In this example, I have a property (called record-id) that uses a regular expression to only allow alphabet characters, spaces, underscores and dashes.

              "record-id": {

                "$id": "#/record/record-id",

                "type": "string",

                "title": "A unique identifier, used by the institution to identify the complaint in their source platform.",

                "default": "",

                "maxLength": 100,

                "examples": [

                  "RECORD-12_345 Y"

                ],

                "pattern": "^(?=.*[a-zA-Z])(?=.*[0-9])[a-zA-Z0-9 _-]+$"

              }

What’s great about this is that I can supply defaults and examples to what is being asked, simplifying the task and documentation for the user.

I love this because I’m not an expert at Regular Expression design and if I were to implement this in my own code outside of JSON-Schema – you’re looking at 4 – 5 lines of code on it’s own making my life a lot

Read More


Dynamics365 Development Promotion Model

Following up on my previous post about how to best leverage the Dynamics365 platform, the second question I get asked a lot about it is – how do we promote this stuff between our different environments?

I.e., how do we get A to B without messing up C (or something akin to that logic).  Or rather, where should I deployed managed vs unmanaged solution components?

There are a variety of ways, but for each of the models I mentioned in my previous post (How much are you using your Dynamics Platform) here is what a simple model could look like.

dynamicspromotionRead More


How to Use the Dynamics365 Platform

Generally, when starting a conversation with a new customer about moving to Dynamics365, the first statement they always make is…

We don’t want to change anything and we want to use it as is.

Which runs completely counter to the inherent capabilities of this platform at large not too mention what their requirements are and what they want to achieve.

I get it – you bought a car – you love it, it does almost everything you want to do so you don’t want to change it, but guess what, if you want to keep using it for life and get the most out of it, you’re going to have to make some changes.

Same with Dynamics365, with this in mind, I put together the following diagram that I hope will help new customers

Read More


Azure Functions Local File Logging

In case you don’t know (I had no idea), here it is – the location of your log files when using the ILogger interface for Azure Functions.

%temp%\LogFiles\Application\Functions

Once there, you will be able to drill into your functions by name and find the log file(s) associated with that function.

logfiles

It’s also good practice to enable local file logging in your host.json file using the following syntax.

  "logging": {
    "fileLoggingMode": "always"
  }

Read More


Comments = Good

In case you were unsure about whether or not you should be doing comments in your JavaScript, C#, SQL or Powershell Scripts or anything else for that matter, let me help you out – Comments are good, you need to do them, there is no excuse for not doing them.

You don’t need to be overly verbose in what you write in you comments going into major/minor versions, date of creation, what the weather was, etc, etc, you do need to find a format that accomplishes one goal…

Communicate the purpose of what you are doing.

Many times I have heard the following responses;

  • If they don’t understand it, they shouldn’t be working on it.
  • I speak differently than most.
  • My code is written in a way that it speaks for itself and doesn’t

    Read More