DLUX as a Component Based Application (by Maxime Millette-Coulombe)

Posted · Add Comment

Angular 1.5 include a new service called ‘component’. This service is a specific kind of directive that should help the transition between Angular 1 to 2.0. This step will be a good opportunity to improve the current DLUX architecture while moving the source code to Typescript.

DLUX architecture

Using components will partly amend the current DLUX architecture; however, the main goal will still be the same. DLUX uses a custom modular approach as its architecture. Every module has its own scope and communicates through shared services.

This concept isn’t far away from a Component Based Application (CBA). In fact, both CBA and DLUX have the same root model – that is they are both based on modular programming. They have the same philosophy and try to achieve the same goal. The problem is DLUX architecture hasn’t improved since its adoption in OpenDaylight Hydrogen. Although there were proof of concepts (PoCs) to improve the DLUX architecture in future releases, none came to fruition for multiple reasons.

On the other side, we have the CBA architecture. This architecture already exists in software development and is now in Web Applications with the arrival of Web Components. With this being said, I am curious as to why we do not use something already implemented in AngularJs that also has a common architecture in modern software development?

Closer to that goal that you think

At any rate, we’re already slowly moving towards this new kind of architecture. The future change of the folder tree reflects a desire to move to a CBA [1]. The concept of components is already present with the current state. Directives are already used to load each module (thanks to ui-router).  At first sight, it looks as if the hard part would be the routing logic, but we have to be careful not to overlook. In other words, the pieces are there to assemble the puzzle, but it’s not as easy as a puzzle with three pieces.

External module impact

It’s difficult, for now, to evaluate the impact of an external module. Will this change be completely backward compatible? The answer is probably not. This upgrade might be a good opportunity to conduct a complete revamp of DLUX to solve major problems, such as the look and feel, and the complexity to develop a DLUX application.

The DLUX team has planned to improve the current API to something more user friendly. This implies that the API might be different. However, this is not a sure thing as I will explain later on…

Bad news

Sadly, there is a larger problem. The DLUX community is not very active mostly due to external commitments. Since the beginning of the Boron cycle, very little has been started. Time flies rapidly and the tasks are certainly not easy to accomplish. The end goal is clear but without the adequate resources it will take time to achieve this goal.

To conclude

As things stand right now, the move to Angular 1.5 isn’t technically planned. However, we can still hold on to the possibility that it may be introduced during the phase of changing to Typescript or during the API update timeframe.

[1]: https://wiki.opendaylight.org/view/OpenDaylight_DLUX:Boron_Proposal#Restructure_the_file_tree

Leave a Reply