ContaSystemer AS current stats and thank you the community

In short, the distribution is following, all new code is written in Elm and all serious refactoring of existing code is done in Elm as well. Where serious means e.g. new version of the component which requires a “fundamental” rewrite. So we maintain two code bases.

What influenced that distribution the most?

We don’t want to rewrite existing AngularJS application to Elm from scratch. We want to come to that point naturally.

And are you planning to change that distribution in the future?

Now we have pretty heavy communication between AngularJS and Elm. It works very well for us. And we are moving towards Elm in all possible ways.

What parts of your application went where and why?

Routing is done in AngularJS. Because Elm routing would require a significant rewrite. It would be possible to move the Elm routing sometime in the future I think. The rest is in short story below.

We started to integrate Elm when we had big AngularJS code base already. There was a task to create a new AngularJS component with autocompletion functionality. It was done in Elm and wrapped with AngularJS component. So it felt natural for AngularJS application.

first

Then there was a task to create a new page. A page in our app may have any of the following parts:

  • Header
  • Alert boxes for system notifications
  • Tabs
  • Modal dialogues

We created a page manager in Elm which manages all of the page parts and the page program itself only manages the page content. All new pages will be created in Elm from now on. I’ll create a separate thread about page manager. In AngularJS we have components for each part as well. In Elm, it’s more clear and easy though.

second

Then there was a task to reuse some of the existing AngularJS components in Elm. So we don’t have to spend time rewriting them. We created an AngularJS service to do so.

third

This is a current situation, please let me know if I answered your questions and if you have any other questions.

1 Like