Intro to Elixir (Phoenix Framework 1.3 Chat Application)

in #utopian-io6 years ago (edited)

It has been a while since I have made a tutorial for Elixir on my channel. It has also been a while since I have made a Phoenix framework tutorial on my channel as well. However, since my last Phoenix video, the framework has matured up to version 1.3 from version 1.2. Seeing as my first Phoenix tutorial video was a chat app, I figured that it would be a good idea to do a chat application on Phoenix 1.3 for contrast.

Phoenix 1.3 brings some fairly interesting things with it. The release adds new code generators, a better project structure that supports umbrella projects, and scaffolding that re-enforces the framework as a web-interface. The Models have been removed in favor of Contexts and Schemas. A Context is a dedicated module that exposes related functionality from the data model which is contained in the schema. In other words, you can have one schema that supports multiple contexts which allows you to have more flexible data structures overall.

While our app does not make use of Contexts, we do look at Schemas and we use the channel generator to generate our Chat Room channel. We also use a small amount of JavaScript to build out the chat functionality and connect the front end to the back end/web socket. We then create a persistence layer which allows us to save and load chat messages so that new users and users entering the chat channel can see older messages.

We will be going back to Rust in a few videos, but because the library that I want to use is currently broken; I've had to make the choice to start doing other languages in the meantime. I will also post a poll that will let the readers pick the next language that they would like to see when the time is right.

Full Github Source Code is here

If you enjoy the video, feel free to follow me on YouTube to get updates on the channel as well as more content.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

As always, thanks for taking the time to read/watch my content.

Hey @tensor I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.028
BTC 57296.76
ETH 3055.75
USDT 1.00
SBD 2.32