Live data from Hacker News

Phoenix 1.3 is pure love for API development

swanros.com

1–10 of 57 posts

Re: Phoenix 1.3 is pure love for API development

#3
Do you find it's a lot of extra writing for the contexts? I'm new to Phoenix and my first thought is it seemed kind of verbose to define every single 'meeting point' across 'models'. For simple apps it seems OK but I have some complicated apps with many models and interactions

Re: Phoenix 1.3 is pure love for API development

#4
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

#5
post #4

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

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

#6
post #4

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

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

#7
post #4

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

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

#9
post #4

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

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

#10
post #4

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

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...

Post reply on HN