Should I use Phoenix 1.2 for my next project?

Hi all,

I’m learning Elixir/Phoenix, trying to find some inspiration on github.
I’ve found this :


But most of these repos have not been updated in 2 years…

My questions :

  1. Should I use Phoenix 1.2 instead of 1.3 ? Did context introduce unwanted complexity that repelled many developers ?
  2. Where to find more recent sample apps ?
  3. Why most Elixir/Phoenix github repos I’ve found so far are not maintained ?

Part of my job here is to “assess” Elixir/Phoenix for our next big project (Complex react frontend + API with multiple backends). Golang and crystal/amber are contenders too.

2 Likes

Hi,

It’s have you great here :slight_smile: I hope you will really enjoy coding in Elixir. The “awesome elixir” list maybe should be refreshed to track and remove the unstable and not working packages. Sometimes even if library is not updated, it doesn’t mean that’s not working :wink:

About your questions:

  1. I advise you to choose 1.3 over 1.2, because it’s good to be up to date. Also you will learn how important it is to split logically your code concerns into contexts. From my perspective contexts make your code structure more elegant, so it’s not unnecessary complex. Actually, they help you to avoid complexity in your models directory and in the model files. Contexts encourage you to split the logic between different files and to keep schema files clean.

  2. Surely you can find them on GitHub, but to have a sample app you can use generators to scaffold the project for you :wink:

  3. Surely not the most of them. Please remember that open source is maintained by the community and people, who write reusable code for everyone, also have other stuff to do in life- have work to do and family to take care of etc. :wink:

2 Likes

If you don’t want to use the new style of Phoenix 1.3, you don’t have to use it. It’s not your application.

There are a lot of maintained libraries, but ask yourself if you really need a lot of libraries, and are they really unmaintained, or just don’t need bloat?

For our projects we really just need:

  • Phoenix (API, not the whole frontend, so excluding brunch/HTML)
  • Ecto
  • comeonin/bcrypt/guardian for auth
  • timex
  • plug
  • calendar
  • poison
  • httpoison
  • flow

We use Elixir with Absinthe, with react (apollo) on our frontend/admin apps to process over seven figures a month in sales, so it’s pretty rock solid.

4 Likes

My personal opinion is i thing phoenix 1.2 has a lots of tutorials online so for a beginner its easier to find phoenix 1.2 tutorials and pick up really well and learn fast compared to phoenix 1.3.

On the other side Phoenix 1.3 is an improved version meaning there are improvements like new command shortcuts and file structure

1 Like

Thanks

Contexts might be useful indeed (JEE/Spring arch. here), don’t have to convince me :slight_smile:

We’re a security software company unmaintained libraries are not a viable option.
Unmaintained often means bugs and security issues.
Define bloat: there are always bugs, ask pentesters :wink:

More than libraries I’m looking for full applications to learn from. So far I’ve only found changelog.com based on Phoenix 1.3.

1 Like

Not a huge difference… It is better to start 1.3 instead of porting 1.2 to 1.3 later…

1 Like

Hexpm is another actively maintained phoenix 1.3 application: https://github.com/hexpm/hexpm
Firestorm is built with phoenix 1.3-rc and has daily-drip videos to go along with it https://github.com/dailydrip/firestorm
And a bunch more on https://github.com/droptheplot/awesome-phoenix

3 Likes

That’s exactly what I was looking for :smiley:

Thank you very much !

3 Likes