Building a mini-reddit to learn?

Hello everyone,

For the longest time I’ve been meaning to properly learn a web framework (as a hobby). I have had exposure to Java and Python, and some exposure to JS (jquery), and also general familiarity with SQL, but I never committed to learning a web framework.

Now that I have some free time, I’d like to learn one. Part of it is for my own curiosity, and part of it is because I’d like to be able to spin decent websites as I want for side projects.

In terms of side-project needs, they will mostly be of small ecommerce and social media (chat, forum, etc) type of projects, and given that I wasn’t committed to any framework to begin with, I thought I might as well learn Phoenix given a lot of the advantages it brings (esp. with concurrency) - but I’m also curious as to how it compares with Go.

Therefore, as I normally enjoy learning by doing, I thought a first project to learn from would be to create a mini-reddit like website.

Here are a few questions that I’d appreciate your thoughts on (bearing in mind the thoughts I have below are purely based on reading online, I literally have no exposure to any of this yet).

  1. General Question: I’ve come across discussions comparing Elixir (Phoenix) and Go, but I’m not aware enough of either to understand. How do the two compare nowadays, and (bias aside) would you stick to Elixir or Go for the types of projects I mentioned?
  2. Frontend: Seems that I can do most of what I need with Vue or React - how do they compare? And do I need any other major apps or modules to consider?
  3. Backend: It seems database of choice is normally MariaDB or PostgreSQL - any reason to prefer one over the other? Is there another option I should consider as well?
  4. Other apps: In my readings I came across other modules like GraphQL (which I read about and got the gist of) - are there other key modules to read on and consider?
  5. If I wanted to also build an android (or iOS) app that hooks up to the mini-reddit, what are key considerations?
  6. Please feel free to share any other thoughts, as well as any recommended resources to learn what I need to accomplish the above.

Thank you!

  1. By Vue/React you mean (1) an entirely separate frontend (as a SPA) or (2) simply adding Javascript to a Phoenix rendered template using Vue/React? These are 2 entirely different concepts. For a mini-reddit type of application, you can do just fine with (2) if you ask me.

  2. I expect very few to use MariaDB or MySQL with Phoenix. Take a look at the stats published by hex.pm for the adapters: Postgrex, Mariaex, myxql. PosgreSQL leads by an order of magnitude.

  3. If you’ve chosen (1) at point 2, I would definitely use GraphQL as it seems to speed up development even if you’re learning it for the first time. This was my experience at least.

  4. A PWA could suffice for this type of application. However, if you’ve gone with (1) at point 2, might be easier to switch to VueNative/ReactNative for the app using the same GraphQL backend. If (2) was chosen at point 2, you can still get it working in a webview in an actual app via Turbolinks adapters (this is how Basecamp does it).

  5. Look into Phoenix Liveview. It’s awesome :love_you_gesture:

3 Likes