If you're not aware about AureliaJS it's time to be aware about this amazing framework. Like Angular, Meteor, Polymer, Knockout and others it is a MV* framework for building the next generation web applications. To quote the authors:
Aurelia is a next generation UI framework. Whether you're building apps for the browser, mobile or desktop, Aurelia can enable you to not only create amazing UI, but do it in a way that is maintainable, testable and extensible.
..and not only that. It gets even more interesting here:
I believe I don't have to introduce the heap sort. It is notoriously known sorting algorithm. The wikipedia page speaks for all and if you're a beginner I would recommend you the MIT course about Heaps and Heap Sort which is very nicely explained:
Nice thing about heap sort is that it's relative fast and runs in O(n + n*log(n)) = O(n*log(n)).
In our example it's being implemented inside the engine.js file. Notice the ES6 way of defining the module where we export only those parts we want to:
..which is later on imported by calling the:
In the current ES5 way you would write something like this instead:
The animation itself is being done using CSS3 transitions. It is easy and very fast way how to animate css properties. The key here are the following css lines:
The main application class is pretty straightforward. We have just a constructor that initializes the properties and then two methods generate and heapSort that corresponds with buttons on view layer. The heap sort itself with a bunch of helper functions is located in the engine module.
Blog about my programming experiments, tests and so on.