Phoenix is great! I only wish there was one recommended way for authentication and authorization - there are so many [1] different libraries that I got stuck in researching the options - I am confused, do not know which one to use. What is your preferred way? I would like to avoid to implement every little detail on my own - to get security done right was the main reason for me using open source libraries. It would b…
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.
Phoenix 1.3.0 Released
51–60 of 143 posts
Re: Phoenix 1.3.0 Released
#52Are there any "here be dragons" for Phoenix? Does it play well with legacy systems? Support for different protocols, etc.
We're using it at a client as a kind of nexus of all our legacy systems, in fact.
Re: Phoenix 1.3.0 Released
#53Phoenix is great! I only wish there was one recommended way for authentication and authorization - there are so many [1] different libraries that I got stuck in researching the options - I am confused, do not know which one to use. What is your preferred way? I would like to avoid to implement every little detail on my own - to get security done right was the main reason for me using open source libraries. It would b…
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.
Re: Phoenix 1.3.0 Released
#54Earlier 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.
A blackbox is not what I was asking for. I would be happy to find the features you described (and many more) in one (extensible) place like e.g. Phoenix.Security.
With a cookie?
With a server-side session?
With a database session?
With an authentication token GET params?
With an authentication token in the header?
You make the choices for your specific use case and implement them using laser-focused, great packages. One system I built authenticates with an `authenticationToken` GET params, I look for that in a Plug, then assign the current_user to the conn object.
For non-api requests, I use plain old sessions.
Re: Phoenix 1.3.0 Released
#55I've been working professionally in Elixir/Phoenix for the past 4 months. Summary: It's amazingly productive, pleasant to work with and simple. Coming from a background spanning Python/Django, C#/.net and Node/Express I really believe it blows them out of the water. Thank you for all the hardwork of the Phoenix team and the amazing community you've made.
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.
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. Other languages have this too, so it's not like this is unique. This is one of my favorite things though; you can destructure things, you can pattern match inside a function using case, and you can pattern match on functions themselves like:
def say("Hi"), do: IO.puts("Hello")
def say("Bye"), do: IO.puts("Goodbye")
def say(_msg), do: IO.puts("Where am I?")
That's basically the equivalent of having a single say() function that then does a switch/case on the input.And a more recent addition to the language is "with". This is fantastic, it's one of my favorite things now. Usually you might have code that sets a variable from something, checks to make sure it's valid, sets another variable, checks to make sure it's valid, etc, etc... until finally you're function is ready to actually perform its purpose. Any of those checks might cause it to exit early or to switch paths. So Elixir has this "with" feature that looks sort of like this:
def create(conn, %{"id" => group_id, "friend_id" => friend_id}) do
with {:ok, user}
conn
|> put_status(:unprocessable_entity)
|> render("failure.json", msg: msg)
end
end
I love this feature. It makes code so much more readable and maintainable in my opinion.Re: Phoenix 1.3.0 Released
#56Would you suggest to choose Elixir / Phoenix for an api for a startup? Is it too risky now, or good enough + very attractive?
Re: Phoenix 1.3.0 Released
#57Re: Phoenix 1.3.0 Released
#58Phoenix is great! I only wish there was one recommended way for authentication and authorization - there are so many [1] different libraries that I got stuck in researching the options - I am confused, do not know which one to use. What is your preferred way? I would like to avoid to implement every little detail on my own - to get security done right was the main reason for me using open source libraries. It would b…
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.
Re: Phoenix 1.3.0 Released
#59Re: Phoenix 1.3.0 Released
#60Earlier quoted context omitted.
Pattern Matching makes it easy to write small, understandable code The Concurrency Model is simple to the point where creating a whole pubsub system to handle events, push out notifications, and handles backpressure can be done in Finally the pipe operator is like C#'s LINQ statements but with so much more power and flexibility, hard to explain but I highly recommend cracking open that book on your nightstand!
The Elixir pipe operator |> is the equivalent of the Clojure thread first macro ->, right?