I am a veteran backend developer. I’ve spent most of my time during the past decade working on Erlang and Elixir projects.
Recently (for the past 3 months) I’ve been learning OCaml and now I feel quite comfortable with it, to the point where it’s my new favourite language.
I’m working on a project which will be a mix of:
- OCaml native at the backend for doing the heavy lifting of the business logic. I’m quite “ready” with this part, or at least at the stage where it’s usable and ready to start integration with the other parts.
- Erlang/Elixir as orchestration and middleware layer. Mostly because I’m familiar with it and this way will be the easiest for me to provide things like websockets etc.
- Bucklescript/ReasonML on the frontend with possible sharing of some libraries using js_of_ocaml (already able to compile them and do some simple tests to check that they work in the browser).
Now I’m a bit lost on how to continue.
I “know” some JavaScript and have worked on relatively big projects ~ 10 years ago when Ext JS was big (now it’s called Sencha). Also, some years ago I played with Mithril.js and quite liked it (but since have forgotten it). But that’s it, I haven’t done “modern JavaScript” and I don’t know how to continue.
The basic tutorials and examples are quite easy for me, as I know OCaml and don’t hit the wall that I presume most of the newbies are hitting (coming from JS land). So I feel reasonably good if I have to write just “vanilla js” that does simple things.
But I have no idea what’s going on when I try to read tutorials about Reason React, as they are written with the intention to target React/JS developers and I don’t know React.
So I have some random questions, and also I’ll very much appreciate “general advise” on what to do.
-
Do I have to learn/use React. Of course, I know that the answer is “no” as everything is possible, but still, will I have hard time if don’t use react? I have nothing against it, just want to know my options and not waste my time with other things if they are not “practical” with Reason/Bucklescript.
-
Can I learn directly through OCaml/Reason or will I have to read a lot about JavaScript? Of course, I can understand JavaScript syntax, but obviously, I feel a lot better in the OCaml type system. In general, can you recommend resources to read in my situation?
-
By reading comparisons of JS frameworks, I quite like EmberJS, so how hard would it be to use it and what tradeoffs do I make if I go that route?
-
What do I lose if I decide to use the OCaml syntax?