Phoenix as a Meteor alternative

What do you suggest me to read : Programming Elixir or Elixir in action ?
Elixir in action is more recent and I always liked the books from Mannings (I read Meteor and Express in action).
Programming Elixir is older (october 2014) but people seems to say that the author is a very talented developer.

1 Like

Where do I find Elixir LiveData DDP module?

I would go with Programming Elixir first and then if you’re still interested and want to take a deeper dive, Elixir in Action as well. I’ve read the first and the first half is one of my favorite books of all time. He does an awesome job of making you ‘think different’.

Phoenix also has an ebook in beta that’s really good!

Are you referring to the one I was working on? If so I don’t think there’s going to be an easy way to hook it up directly to Meteor publications. For now i’m skipping the middleman and just having the Meteor browser client connect directly to phoenix like in the github repo:

https://github.com/AdamBrodzinski/meteor_elixir

Definitely don’t read Elixir in Action until you are more at an intermediate level. I’d say start reading Programming Elixir and then start working on exercism problems. Once you are comfortable with Elixir, start reading Programming Phoenix. That’s a pretty good path to get started.

1 Like

Dave Thomas has half a dozen Elixir related videos on youtube. Every one is eye opening. He has a great sense of humor and makes functional programming quite approachable for those with an imperative background.

2 Likes

I’ve spent a good amount of time with Elixir and Phoenix over the last few months and all I can say is that it is awesome! It feels like they have done everything right. Here are some things I like about it:

  1. You can use any database with it!! It defaults to Postgres but its database management tool Ecto officially supports MySql, Mongo, etc…

  2. Testing is a first class citizen. In Meteor we have all struggled with testing. It is super hard to do in the current state of Meteor. However, in Phoenix, it’s dead simple. The Elixir/Phoenix team comes from Ruby land where testing is top priority and it shows with the current state of the Elixir ecosystem.

  3. This may seem silly, but coming from Meteor I really like that Phoenix has a built in Router. WE SHOULDN’T BE ARGUING ABOUT WHICH ROUTER PACKAGE TO USE. This should be a convention.

  4. Elixir is functional! It’s hard to describe how much better functional programming is than object oriented programming when it comes to web development. Phoenix is just a bunch of functions that transform a request one function after another until a response comes out at the end. IT IS SUPER SIMPLE. Phoenix doesn’t feel like magic on top of Elixir. It’s really easy to grasp.

  5. Phoenix is fast and powerful! It beats out virtually any other framework out there (including Java and Go frameworks). Check this out https://gist.github.com/omnibs/e5e72b31e6bd25caf39a Phoenix has actually gotten faster since those benchmarks as well.

  6. Elixir is pretty Erlang. Erlang is battle tested. If you build with Phoenix you won’t have to think about scaling. The Elixir package management server runs on a free heroku instance… Just think about that.

  7. Phoenix makes real time programming dead simple. Phoenix is built for real time web apps and makes a good companion to React or another frontend framework.

  8. It is easy to augment or extend. Because Phoenix is just a bunch of functions that transform a request it is easy to add more functions or remove functions. You have total control.

  9. You can drop in any kind of frontend build system you want. It defaults to Brunch (a super easy build system) but you can drop in webpack, gulp, whatever with no problems.

There are tons of reasons why Elixir/Phoenix are great but I’m tired of typing so let me know if you have any other questions!

19 Likes

Is there an Atmosphere equivalent? Where is the go-to place for Elixir and Erlang libraries? I’ve seen the above but I’m sure there must be more. I’ve seen reference to ‘thousands of erlang libraries’ mentioned.

Yup. The package manager is called Hex. http://hex.pm is the website

1 Like

Thanks, I just bought Programming Elixir !

You really converted me guys haha, I’m young and always learning new stuff, I discovered web development with JavaEE and Srping, then used Grails (Groovy) (which is one of the best framework I ever used).

I never really liked Javascript because I find that all what I learned in my Software engineering education was useless and that a lot of the people in the community don’t have the basics in computer science. But I didn’t have a choice since it is (was :stuck_out_tongue: ) all about Node.js, so I jumped in the train, used a little bit of express but then discovered Meteor and felt in love with it because of the ‘‘structure’’ it gives. But I was still trying to use my old habits and never really embraced javascript as a language, I just force myself to love it.

Now I will probably focus on Elixir if I like it, I prefer to learn something more specific and ‘‘future proof’’ than knowing a technology that everyone can use without understanding the core concepts of computer sciences.

(Of course, I will still use Meteor for small personal projects, and If I feel that the project needs to be more serious or needs to scale, then I’ll use Elixisr/Phoenix or mix both !)

I feel like I just discovered the light haha :smiley: (btw, I’m 22).

2 Likes

So if I want to exclusively use React with Phoenix, would I ignore Phoenix template related stuff and just focus on channels?

1 Like


http://blog.brng.us/2015-08-04-using-reflux-to-broker-events-with-react-and-phoenix.html

I’ve seen a number of examples which still use a template to render the React components into. I believe @ryanswapp did this as well when I checked his boilerplate.

Like everything else though, in Phoenix a template is just a function. I imagine you can remove it from the pipeline in the router and use JSON for your application protocol, but you still need some way to send the html down to the browser.

I’ve been using the Meteor framework for work over the last year. While it’s nice to work in and gives you a lot out of the box, ultimately there are fundamental flaws in the design that become too tedious and limiting in the long run.

https://rhythnic.wordpress.com/tag/react-js/

p.s. I happened upon this blog of someone who switched from meteor to a PRRR stack. Phoenix/Rethink/React/Reflux. Interesting read.

1 Like

OK, there’s plenty of “why Phoenix is a better choice than Meteor” arguments above. But what would be nice to get is - what are advantages of using Meteor over Phoenix? I can think of the most obvious one being “using the same language everywhere”. Which is a bit sad actually because this language is Javascript, but hey, it’s still one to rule them all.

So after getting to know Phoenix and its ecosystem, can you think of other things? What are the reasons to stay with Meteor in your opinion other than “MDG guys are nice”.

3 Likes

It would be great if someone familiar with both frameworks( Meteor and phoenix) list down some advantages of phoenix over meteor.

For a moment, I thought Meteor is no longer the latest and greatest. Google Trends tells a different story:

Meteor seems to have beaten Phoenix in popularity recently, and keeps growing, while Phoenix appears to be declining. Whew!

1 Like

@ryanswapp has clearly listed some advantages here

thanks for pointing that out, Yes, I saw that but interested to know different people views.

@aaabbbccc that’s a very nice comparison from you, basing on how Phoenix started in 2014 and you show its popularity peak was 5 years ago.

6 Likes

Wow! My bad. Forgot quotemarks. Thanks for pointing it out.

Updated Google Trends here.

TL;DR: Meteor going up, Phoenix has not taken up (yet?). So, not very informative.

It seems the search term “phoenix tutorial” primarily covers the hacking of Nokia phones running a software called Phoenix.
I don’t think you can use it as a comparison in this case.

1 Like

I see. This is perhaps a more accurate one: https://www.google.com/trends/explore#q="phoenix%20framework"%2C%20"meteor%20framework"&cmpt=q&tz=Etc%2FGMT%2B8

2 Likes