Hacker News new | past | comments | ask | show | jobs | submit login

Phoenix looks great, but seems like it's focus is on serving html to websites (like Rails). Is there something simpler for building REST apis for mobile/single-page apps (like Sinatra)?



I have just started working on a serious Phoenix project after watching from the sidelines for a while. It takes a completely different approach to Rails. First of all there's no magic (everything is completely explicit). It's extremely adaptable to different needs (JSON apis, real-time communication, etc).

Also note: Phoenix is not so much a singular framework, it's more of a collection of libraries (Plug, Ecto, etc.)... it's just that Elixir makes cohesive communication between independent libraries so dead simple it "feels" like a Rails-like monolith.

But once you actually look at the structure of the project, there's really not a whole lot that's hidden "behind the scenes" like in Rails. You can just add remove any of these components as you like.

Honestly give it a try. This is the first backend environment I've tried that feels "right" (and man I've been searching); everyone else I know who's tried it agrees. It's just a pleasure to work with.

So far every surprise has been pleasant!


I serve an API with it and also some services that use WebSockets. I've actually never used Phoenix to serve HTML, but I'd definitely recommend it for API development.


You can tear out any part of Phoenix. Try to look at passing --no-html to the phoenix new command :)

There is even a generator for json API iirc.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: