Live data from Hacker News

Phoenix 1.3.0 Released

phoenixframework.org

131–140 of 143 posts

Re: Phoenix 1.3.0 Released

#131

Earlier quoted context omitted.

As a .NET developer by day, I'm curious what you like about Elixir over C#/.NET? I have a copy of Elixir in Action on my nightstand, I just haven't had a chance to crack it open yet.

I wouldn't say I like things over C#/.NET (I love C# and use it for mobile/desktop devel, but I've never used it for web).. but I'll list some things I like about Elixir: Erlang's concurrency model is amazing. It's like having micro-microservices running inside your virtual machine. And you can distribute across nodes. Nothing else really has this kind of thing. Pattern matching is beautiful and it's easy to use. Oth…

Wait is `with` a guard then?

Re: Phoenix 1.3.0 Released

#133

We’ve been using Phoenix at my company in production for over a year now. So far the experience has been overwhelmingly positive, our team have totally come round to its adoption, our server costs have come down and our response times have gone down also. Coming from Rails, the ecosystem isn’t quite there yet, but it is far more mature than rails’ was this early on. The hardest thing for us has been deployment, but w…

Good to hear.

Re: Phoenix 1.3.0 Released

#134
post #8

I'm spending all my free time with Phoenix. I come from a Rails, Laravel, Django and a bit of .NET Core background. So far I am extremely impressed. I'm surprised it has not been adopted by that many folks in production.

>> I'm surprised it has not been adopted by that many folks in production. I'm surprised that it's used in production at all. It's based on a new language that is years behind all the others in terms of available third-party libraries and modules.

All libraries from Erlang can be used as-is, so the gap is much smaller than you might expect. Phoenix itself is based on an Erlang web server.

Re: Phoenix 1.3.0 Released

#135

Earlier quoted context omitted.

The beautiful thing about Phoenix framework is that there is no "one-true way" to do things. Rails is omakase, Phoenix is not, and that's a good thing. You want the whole enchilada? Use Guardian. Need oauth? Use ueberauth. Just want email and password? Use comeonin to hash your password. It's liberating to know exactly how your system works and that it's not hidden behind some magical blackbox like Devise.

Guardian is annoying to setup but works for me. I just want something that generates JWT and takes a JWT.

I've been using Joken for that (JWT), just finished writing up some code that integrates with Auth0 and pulls in the signing certificate from the auth0 domain (.well-known/jwks.json).

Re: Phoenix 1.3.0 Released

#136

Earlier quoted context omitted.

The beautiful thing about Phoenix framework is that there is no "one-true way" to do things. Rails is omakase, Phoenix is not, and that's a good thing. You want the whole enchilada? Use Guardian. Need oauth? Use ueberauth. Just want email and password? Use comeonin to hash your password. It's liberating to know exactly how your system works and that it's not hidden behind some magical blackbox like Devise.

Guardian is annoying to setup but works for me. I just want something that generates JWT and takes a JWT.

[deleted]

Re: Phoenix 1.3.0 Released

#137
post #16

Earlier quoted context omitted.

Go into it with the attitude of 'deferal of gratitude'. In other words it might look painful for a while but when various things click you get your holy s moments and you'll never go back. I've worked in a lot of java, php, python, c# etc frameworks and there are very specific reasons this is near always better long term. A lot of it comes back to elixir simply solving the correct problems. Learn elixir using the eli…

By correct you mean that Elixir solves problems differently than java, php, python, etc. and you found this more appealing over time, which may or may not be the case for someone else. Or are you making a stronger claim that language X is better than Y, at least when it comes to web dev?

No I don't mean it in a way that is subjective. It does depend on person to person because of factors in their knowledge and situation, history etc etc, but elixir lives in a world that the others don't. Making a language that plays on the erlang vm and has complete access to OTP was a good solve. Other languages haven't been able to replicate OTP despite attempts (and they likely won't). It's not better for everything and the language isn't somehow obviuosly better, it just solved the right problem if you want easy web scale that doesn't do things like drop connections when you release or have a difficult concurrency model. Functional programming is a grind at first but it's a good fit for this world and elixir is more accessable day to day than erlang. I have way more experience with PHP but there are limitations there that can't be solved. So I would say that both your points apply, I am making the claim that X is better than Y because of core value reasons, but that doesn't mean that economically other languages don't make sense for web programming. I still make new projects in PHP and Python because of existing infra at work and others that can't/won't learn elixir and co. We'll just be making something slightly inferior and not be building tools for a more pleasant future, but it still makes money for the biz and isn't terrible

Re: Phoenix 1.3.0 Released

#138
post #16

Earlier quoted context omitted.

Go into it with the attitude of 'deferal of gratitude'. In other words it might look painful for a while but when various things click you get your holy s moments and you'll never go back. I've worked in a lot of java, php, python, c# etc frameworks and there are very specific reasons this is near always better long term. A lot of it comes back to elixir simply solving the correct problems. Learn elixir using the eli…

You mean `deferral of gratification`. I couldn't help myself.

hah! thanks honestly. I need to bring up this term more often than you'd think and without thinking about it got it wrong probably almost every time

Re: Phoenix 1.3.0 Released

#139
post #83

Are there any "here be dragons" for Phoenix? Does it play well with legacy systems? Support for different protocols, etc.

I don't think Elixir has production-level support for gRPC which is a bit of a deal-breaker for me.

There seem to be plenty of gRPC libraries for Erlang though, according to a quick googling.

Re: Phoenix 1.3.0 Released

#140

Earlier quoted context omitted.

I believe these are referred to Railway-Oriented Programming. I've seen several other examples for Elixir (incl. ones using macros), but by far this is the 'cleanest' syntax :) Here's a similar construct in Scala: (for { user ... }

Or you could just call it what it is: a monad

The Scala example, yes... The Elixir one? Is it actually a Monad? I figure it's simply destructuring + pattern matching (against the value of the first tuple value, :ok or :error atom).

To expand a bit more, it's not like Scala's `Either[T, U]` where we're limited to a pair of types, I think you can return other atom values (but use :ok and :error) as a convention.

Also, there is an Elixir library I'm using that's a closer in spirit to Scala's for-comprehension called `monadex`. Example below:

    result = success(comment_params)
             ~>> fn p  -> link_reply_to_id(p)  end
             ~>> fn p  -> create_changeset(p)  end
             ~>> fn cs -> assert_changeset(cs) end
             ~>> fn cs -> insert_changeset(cs) end
Post reply on HN