DEV Community

Thomas F Nielson
Thomas F Nielson

Posted on

Part 2: From OOP to FP...

Its been 3 weeks since my last post. It's been 3 weeks of full immersion into Elixir and Phoenix LiveView.

I had 3 weeks to learn the basics of Elixir and Phoenix LiveView to get my capstone project done. I decided to create a Chat App with the intention of showing; Elixir's efficiency in code writing and the benefits of data immutability, Phoenix WebSockets and LiveView!! I didn't write a single line of JavaScript code for this project.

heres the repo if you want to check it out:
https://github.com/tfnielson-se/LiveWave
Elixir 1.14.3
Phoenix 1.7
LiveView 0.18

Having everything done in the same environment was extremely efficient instead of having to communicate between different languages such as Ruby on Rails with React, fetching my own data seems odd to me now. Instead I used Ecto, another library offered by the Elixir environment with takes care of database management, really easy to learn and use.

I recommend everyone to learn Elixir and Phoenix. The principals of Functional Programming are used in OOP constantly specially with data immutability. We quickly learn that we want to use non-destructive methods to manipulate data and thats made easy with Elixir, I call it a no brainer.

Another great factor which helped me during my transition was the amazing and well written documentation. I have yet to find another programming language that offers such extensive and clear doc.

My main takeaway from this project was not adding another language to my belt. I am way more proud of the fact that I can learn anything I set my mind to and that I can understand the logic behind code.

Top comments (0)