Didi

Didi

This is an issue I’ve found myself facing any time I get interested in web development/web frameworks. I’ve had experience using Django for university, and in that case I felt like I was being hand held to go from 0 knowledge to implementing a cookie cutter web application. When left to my own devices, the scale of complexity begins to get overwhelming.

I’ve recently been interested in Elixir and Phoenix, mainly for Pheonix’s proclaimed benefits with features like LiveView and how I instantly clicked with Elixir’s approach to functional programming. I’ve been going through the Phoenix tutorials on hexdocs and after the lengthy section on contexts, I realised that while following the docs in a project, taking notes, etc I feel like I’m getting in over my head. My abilities in Elixir to begin with are still at a beginner level, and while the tutorials I’ve been following have been incredibly well written (and in general the framework seems easier to understand than some others…), the idea of starting one of my own project ideas is quite intimidating.

This is not a problem that is exclusive to phoenix for me like I said - I generally don’t get on well with webdev so I don’t expect it to be easy. I was hoping I could get some inspiration from this community by asking you this: what were some of your small projects you worked on to learn Phoenix? What small projects have you worked on that exploit the defining characteristics of Phoenix to better understand them? And finally (the most googlable question, apologies), are there any other resources (books articles etc) that you would recommend for someone starting out with Phoenix, particularly geared towards someone without much webdev experience?

Showing Posts 1 to 10

Dabsy

Dabsy

Its not uncommon to feel that way, its paralyzing to go from tutorials to just suddenly coding and its one of the biggest hurdles to being self-taught in anything. Best thing for it is to just start on your own starter project or idea you want to create, you need to learn to take something big and break it down, and then break that down event more until you have small focused and easily manageable chunks. Then whenever you don’t know how to do that one thing, refer back to a tutorial or googling.

Coding isn’t about knowing how to do everything, you gotta learn how to learn and how to turn something big into lots of small somethings.

(sorry missed the final questions)

I learned Elixir as my first language 6 years-ish back and my first project was a web scraper for presenting metadata. After that I’ve had various toys for learning stuff, an Ecommerce cart, an inventory management thing. Nothing ever took wings but I always tried to do something different and incorporate a new concept.

Phoenix really isn’t that much different from any other web framework, it does the cool elixir stuff for you. Just learn general web concepts that every language supports and you’ll be golden.

I’m book dumb so I can’t help you there, I’m always looking for new articles though.

Flaky

Flaky

Can anyone suggest large web projects on GitHub written in Elixir and Phoenix? In my studies, I use large projects where you can see approaches and methods (for example for django i use netbox project), but on Elixir and Phoenix I did not find big web projects larger than a landing page of a couple of pages and it’s sad.

sodapopcan

sodapopcan

Hello, and welcome to forums!

You say you aren’t super comfortable with webdev but it’s unclear if you are comfortable with other forms of dev. If you are, one possible route would be to just pick something simple (like a todo app) and start by building out all the business logic only using contexts. Make sure you app can do everything it needs to do simply by calling functions from IEX. This will teach you about contexts and Ecto. Once that is done, I personally feel LiveView is simpler to get started with than REST controllers (especially if you’re starting from the backend without REST in mind), so you could start hooking up all your business functions to LiveView events and build a very simple interface.

This is the book on LiveView though it’s still in a state of being updated fairly regularly. You do get all the updates for free, though means you’ll have to do some backtracking when there is a new version. This is largely a matter of LiveView not being at v1.0 yet (though it’s getting close).

Apologies if this wasn’t super helpful! It’s a bit hard to answer because webdev is just straight up not very straight forward.

@Flaky Plausible Analytics is built with Elixir and Phoenix.

Didi

Didi OP

Thank you your reply is definitely helpful! I recently graduated in computing science and have decent experience making desktop applications + general programming skills (algorithms, OOP patterns… things that are not one-to-one transferrable from procedural languages to a functional one like elixir :') ).

I agree I should try getting used to testing what I do on iex more. When I was learning the elixir basics I was using it all the time but never think to use it while doing phoenix tutorials.

I will take a look at the book too :slight_smile:

theodore

theodore

Avoid books, and practice programming.

You don’t learn to play the piano by reading a book. True understanding is obtained through practice and experience. Eventually your experience will accumulate into habits and new concepts will become less intimidating. I believe one of the authors of Programming Phoenix LiveView even said that she doesn’t learn well from reading books. I think they’re good as reference material, but shouldn’t be the primary thing to learn from.

Some recommendations:

derek-zhou

derek-zhou

The best learning vehicle is your own project solving your own problems. Don’t worry about technology fit; Any decent language can do any decent project if there is not much external dependency, and Elixir is certainly decent enough.

codeanpeace

codeanpeace

Arguably one of the most defining characteristics of Phoenix is just how easy it makes implementing soft real time features. Think chatrooms, games, and other multi-user/client interactions.

A fun and easy way to get started is picking a simple tabletop game you like and know well – something like uno or scrabble – and re-creating it as a Phoenix LiveView app that maybe also leverages Phoenix Channels for game state as well as Phoenix Presence for non-playing users/observers.

jtippett

jtippett

I gotta say, sometimes the project doesn’t make it easy. A great example is the recent change of the liveview generators to use streams by default. I get their use case, and if you’re writing a chat room or a logs viewer or something sure, I’d reach for streams. But by default? It’s just yet another layer of confusing abstraction over the actually very intuitive and elegant, but hard for visitors from other frameworks, liveview interface. And despite arguments I’ve heard, I don’t believe streams are necessary 90%+ of the time, in fact make that 99%.

If even I, with a few years of phoenix experience, felt confused and lost the first time I tried to generate a liveview scaffold in the new paradigm, then I can only imagine how intimidating it must be to beginners.

D4no0

D4no0

I didn’t use phoenix for about half a year and it is as you said, a great amount of changes introduced with phoenix 1.7, I guess after you generate the project, just open the documentation and read about the new things.

I think this is because the aim of phoenix generators is to get you started fast, not to make the project necessarily welcome to beginners, and if we talk about people starting, they should remove a lot of options that come by default.

wktdev

wktdev

I think I have some useful advice.

Here is what I do, feel free to emulate.

I don’t focus on learning it with “projects”. Do this instead, list small bite sized actions to complete that are needed for any web app.

  1. How do I render a static page
  2. How do I route a page
  3. How do I render a variable in a page.
  4. How do I submit form data to a database.

etc…

Make your own list.

I ask myself these questions and document my work.
After doing that for an extended time period you should have enough know-how to string these little pieces together and build an app.

Here is an example of one of these bite sized how-to’s that I document on my personal site.

Of course all this stuff is documented online already but that’s not the point. The point is you make it your own with your own words and in a context specific to how you learn.

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 91898 914
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews