Update documentation

This commit is contained in:
Alexis Métaireau 2024-02-15 11:45:18 +01:00
parent ba2347048f
commit 853691d6fc

View file

@ -56,32 +56,30 @@ yet, but I&#8217;ve made some progress that I will relate&nbsp;here.</p>
<h2 id="javasript-modules">JavaSript&nbsp;modules</h2>
<p>uMap is an &#8220;old&#8221; project. It&#8217;s been there <a href="https://github.com/
umap-project/umap/commit/0cce7f9e2a19c83fa76645d7773d39d54f357c43">since 2012</a>, at a time
when <span class="caps">ES6</span> [wasn&#8217;t out there yet](https://fr.wikipedia.org/wiki/ECMAScript#ECMAScript_Edition_6_(<span class="caps">ES6</span>)</p>
when <span class="caps">ES6</span> <a href="https://fr.wikipedia.org/wiki/ECMAScript">wasn&#8217;t out there&nbsp;yet</a></p>
<p>As a result, it wasn&#8217;t possible to use JavaScript modules, nor modern JavaScript&nbsp;syntax.</p>
<p>The team has been working hard on bringing modules to the mix, and it
wasn&#8217;t a piece of cake. But, the result is here: we&#8217;re <a href="https://github.com/umap-project/umap/pull/1463/files">now able to use modern
JavaSript modules</a> and we
are now more confident about which features of the languages we can use or&nbsp;not.</p>
are now more confident <a href="https://github.com/umap-project/umap/commit/65f1cdd6b4569657ef5e219d9b377fec85c41958">about which features of the languages we can use or&nbsp;not</a></p>
<hr>
<p>I then spent ~way too much~ some time trying to integrate existing CRDTs like
Automerge and <span class="caps">YJS</span> in our project. These two libs are unfortunately expecting us to
use a bundler, which we aren&#8217;t&nbsp;currently.</p>
<p>uMap is plain old JavaScript. It&#8217;s not using react or any other framework. The way
I see this is that it makes it possible for us to have something &#8220;close to the
metal&#8221;, if that means anything when it comes to web&nbsp;development.</p>
metal&#8221;, if that means anything when it comes to web development. We&#8217;re not tied
to the development pace of these frameworks, and have more control on what we
do. It&#8217;s easier to&nbsp;debug.</p>
<p>So, after making tweaks and learning how &#8220;modules&#8221;, &#8220;requires&#8221; and &#8220;bundling&#8221;
was working, I ultimately decided to take a break from this path, to work on the
wiring with uMap. After all, CRDTs might not even be the way forward for&nbsp;us.</p>
<h2 id="internals">Internals</h2>
<p>So, I went for the deep dive into uMap internals. To be frank, I was expecting
this to be hard : there is a lot of code, some legacy, and at first I was the
head under the water, not able to understand how all this code was working&nbsp;together.</p>
<p>After some time, I can now wrap my head around the logic of the project. As one
could expect, it&#8217;s not the complexity that was overflooding me, but the fact
that it&#8217;s sometimes not simple to get the big picture. To phrase it otherwise,
it was easy to get lost into the&nbsp;details.</p>
<p>I was not expecting this to be easy and was a bit afraid. Mostly because I&#8217;m out of my
comfort zone. After some time with the head under the water, I&#8217;m now able to better
understand the big picture, and I&#8217;m not getting lost in the details like I was at&nbsp;first.</p>
<p>Let me try to summarize what I&#8217;ve&nbsp;learned.</p>
<p>uMap apears to be doing a lot of different things, but in the end&nbsp;it&#8217;s:</p>
<p>uMap appears to be doing a lot of different things, but in the end&nbsp;it&#8217;s:</p>
<ul>
<li>Using <a href="https://leafletjs.com/">Leaflet.js</a> to render <em>features</em> on the map&nbsp;;</li>
<li>Using <a href="https://github.com/Leaflet/Leaflet.Editable">Leaflet Editable</a> to edit