News for hackers. Stuff that matters.
Re:Phoenix 1.3 is pure love for API development by kkirsche on Friday March 03, 2017 @10:49PM (#13789117)
I've wanted to use Phoenix a few times but every tutorial to get me started relied 100% on ecto which for something like a transformation API was frustrating. I didn't want the complexity of a database I wanted to learn the request lifecycle in it. Overall, it was challenging with too many resources being out of date or just so focused on a different type of API than I needed to build
Re:Phoenix 1.3 is pure love for API development by Dangeranger on Saturday March 04, 2017 @12:31AM (#13789472)
If you don't want to deal with a database and ecto then you should just learn Plug first as Phoenix requests and responses are built upon it.

https://github.com/elixir-lang/plug

https://elixirschool.com/lessons/specifics/plug/

Re:Phoenix 1.3 is pure love for API development by fghgfdfg on Friday March 03, 2017 @11:04PM (#13789174)
Really? I had a very different experience. I mostly just used the official Phoenix docs and never touched ecto. It was a strictly optional thing I didn't need, so I didn't touch it.

I did look at some other tutorials and I don't recall ever having issues because I wasn't using ecto. Either they weren't using it or I got what I needed anyway.

This was probably about a year ago or so. Maybe things changed at some point?

Re:Phoenix 1.3 is pure love for API development by plainOldText on Friday March 03, 2017 @11:26PM (#13789262)
I'm working on a big Elixir project, and at first Ecto was frustrating (I was learning both Ecto and Elixir). However, upon spending a bit more time with it and learning the basic blocks that defines it, I can say it's a pleasure to work with.

I think this is the case whenever we encounter some new language or new framework/library. In the beginning it's frustrating because we don't master the basic building blocks and cannot write code fast enough. But once we have a solid foundation, a whole new world opens.

Re:Phoenix 1.3 is pure love for API development by lilactown on Saturday March 04, 2017 @12:44AM (#13789506)
I've had the same experience. Coming from Express/Node.js and other micro-frameworks in other languages, I yearn for a `mix phoenix.new --no-ecto --no-brunch --no-view --no-controller ...` Basically the bare minimum to serve a piece of HTML or JSON down a pipe.

I ended up doing what Dangeranger said and used Plug, but now I'm finding that phoenix channels would be a lot more ergonomic for the project I'm working on...

Re:Phoenix 1.3 is pure love for API development by _asummers on Saturday March 04, 2017 @02:05AM (#13789730)
Here's [0] a pretty good explanation of how Plug and Conn fit into the mix. Phoenix is just a pipeline of Plugs, which in tern are just modules with init/1 and call/2 functions. Controllers, routes, all of it is just Plugs under the hood. This should help you get your bearings.

[0] http://shankardevy.github.io/code/elixir-phoenix-conn-reques...

Re:Phoenix 1.3 is pure love for API development by bphogan on Friday March 03, 2017 @11:18PM (#13789234)
I did a short video series for Pragprog.com on Phoenix that does not use a database, but does get you started.

It looks like it'll all be out of date by the time 1.3 hits though. :(

Anyway, it's at https://pragprog.com/screencast/v-bhphnx/build-real-time-web... if you're interested.

Re:Phoenix 1.3 is pure love for API development by minhajuddin on Saturday March 04, 2017 @06:38AM (#13790451)
If you want to learn Phoenix without Ecto. Checkout my screencasts: https://www.youtube.com/playlist?list=PL_uO5Hv34JImYx9zN73wD... It builds a simple Broken Links application which finds broken links in an input url