September 21, 2017

Microsoft Portals Source Code Teardown - Episode 1 - The Solution

If you are reading this post you probably know that Microsoft released the source code of the Microsoft Portals (former ADX Studio) under the MIT license.

I have a fair experience with the code of ADX Studio 7.x but this release include also the source code of some DLLs, so I thought that analyzing parts of the source code can be interesting for Dynamics developers.

Download link: Microsoft Dynamics 365 Customer Engagement Portals Source Code
The file of interest is MicrosoftDynamics365PortalsSource.exe, after extracted the main Visual Studio solution (Portals.sln) is under the folder Solution\Portals\

In this post I will focus on the project in general, in the next episodes I will examine specific pieces of the source code that I find interesting.

The main project is MasterPortal, it is an ASP.NET MVC website configured to run with .NET Framework 4.5.2 and basically is the upgrade of what we got with the previous ADX Studio Portals.
The second project is Framework, this is the source code of the ADX Studio DLLs, like Adxstudio.Xrm.dll and the now "obsolete" Microsoft.Xrm.Client.dll, inside this project the first surprise, a project called SafeHtml, from a quick look (and as the name suggests) the purpose is to sanitize html inputs, a good candidate for a future post.

Now let's check the nuget packages, beside the standard packages used by ASP.NET MVC, the Portals solution also references these packages (this is not a complete list, only the ones that got my first attention)
  • Bond.CSharp - Bond is an open source, cross-platform framework for working with schematized data. It supports cross-language serialization/deserialization and powerful generic mechanisms for efficiently manipulating data. - I will check where this "framework" is used inside the portal
  • - Lucene.Net is a port of the Lucene search engine library, written in C# and targeted at .NET runtime users. - I worked with some years ago for one university exam, is a very powerful library
  • DotLiquid - DotLiquid is a templating system ported to the .NET framework from Ruby’s Liquid Markup. - So this is the library used by the Portals to handle the liquid templates
the first sneak peek inside the Portals source code ends here, see you soon!