3 ms·
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
by kkirsche 10y ago
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
- fghgfdfg 10y agoReally? 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?
- bphogan 10y agoI 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-apps-with-phoenix https://pragprog.com/screencast/v-bhphnx/build-real-time-web... if you're interested.
- plainOldText 10y agoI'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.
- Dangeranger 10y agoIf 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://github.com/elixir-lang/plug https://elixirschool.com/lessons/specifics/plug/ https://elixirschool.com/lessons/specifics/plug/
- lilactown 10y agoI'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...
- _asummers 10y agoHere'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-request-life-cycle/ http://shankardevy.github.io/code/elixir-phoenix-conn-reques...
- minhajuddin 10y agoIf you want to learn Phoenix without Ecto. Checkout my screencasts: https://www.youtube.com/playlist?list=PL_uO5Hv34JImYx9zN73wDQAEQJM08eCWl https://www.youtube.com/playlist?list=PL_uO5Hv34JImYx9zN73wD... It builds a simple Broken Links application which finds broken links in an input url