Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m

Next lesson playing in 5 seconds

Cancel
  • Overview
  • Transcript

1.2 Project Overview

In this lesson, I will show you the project we'll be building throughout this course. I'll also show you how the project source code is organized.

1.2 Project Overview

Hi and welcome back to Get Started With Phoenix. In this lesson we are going to look at the finished course project. The app is called Band Manager, it will have a list of artists, albums, and songs that users can write. We're also going to add a web circuit connection, so the UI gets updated automatically when other people rate a song, and the rating changes. In this case, I've just rated a song of three. Ratings are calculated as a simple average of all votes. Editing bands, and adding albums, works in a traditional way by using a separate page with a form. But adding songs is done at the same time as adding the album as a simple multi line list. The app uses a PostgreSQL database in the background, and persists the data with an or and mappa called Hector. Now let's look at the code, the Phoenix app lives in the lib band manager web directory. You have the controllers, templates, and views in this folder, as well as the router. There is also a web circuit handler in the channels directory, this is how Phoenix calls it. All the domain logic lives in separate folders. In this case we have an artists domain, that takes care of albums, bands, and songs. And the rating domain, which is responsible for applying a rating to a song. To have to think about this separation by creating models makes you also think about the application structure, and possible extensibility. In our case we could use the rating for other items, not just songs. Each domain also has an API module that acts as an isolation layer. Controllers should only interact with the domains for this, and not deal with Hector directly. As always with my courses, every lesson has it's own commit, and is tagged with a lesson number. So you can start off anywhere without needing to write anything yourself, it has been done before this lesson. In the next lesson we are going to install Elixir and the Phoenix Framework together, and initialize the Band Manager application, see you there.

Back to the top