Al: ControlAddIn Examples

Created on 11 Jul 2018  路  6Comments  路  Source: microsoft/AL

For one of my customers I am creating some prototype ControlAddIn objects using an extension.

I am very impressed with the ease of deployment and so is my customer with the result we got in two days of programming.

The examples I can find online are helpful and it got me started. They all seem to use jQuery.

In one of the threads about ControlAddIn objects Dennis Frostlander suggests to use Angular or React.

Can you provide a simple example of both?

I would love to also use TypeScript but that probably also requires a compiler to be added to the build process that converts the ts files to js files.

Can you please share your thoughts on how and where this is relevant and which frameworks you would suggest using?

Where do you think is the flipping point where instead of ControlAddIn development we should use Asp.NET Core instead?

question

All 6 comments

Please elaborate further, where does dotnet core come into place in the context of a js addin? Dotnet core is a server side framework. And if you want to use frameworks like angular or react, there is no difference when using them in the context of a control addin. So you can just follow the wide range of tutorials out there. And I would suggest vue.js.

I was afraid that the last sentence was ambiguous.

With ControlAddIns you can customize the look and feel. For example, render a factbox or a subpage in HTML5.

However, if your customer requires a full-page UI like a POS I can imagine you would use a Single Page Framework like Angular and the API.

But in the Windows client (aka RTC) there is an option to start the client with the ControlAddIn full-size. This has been implemented as per request of companies like LS Retail.

I am curious what the recommendation would be and what other peeps are using.

You can connect an Angular app directly to the API endpoints, but you can also use ASP.Net Core as a server-in-the-middle. I've used both and I am curious what others do/suggest.

@dennisfrostlander , any updates on this?

@StanislawStempin , @kalberes ?

Unfortunately, we don't have samples showing how to use Angular/React or other similar frameworks with control add-ins.

It's hard to give a general recommendation on which framework to use - it really depends on the use case, and as it was mentioned here, there are lots of comparisons/tutorials online. Angular or React, by the way, are not the only options. Typically a new frontend framework appears by the time you finish reading the documentation for the previous one :)

Using TypeScript should be no problem with the popular frameworks. They usually incorporate typescript compilation within their development tools.

Ok, thanks. We'll start trying out different options and share our experiences back with the community. I think it's going to be the next big thing to get this to work properly and make Business Central do miracles.

Was this page helpful?
0 / 5 - 0 ratings