3 ms·
I've been getting a bit farther along with Phoenix - just building a toy Instagram-lite site for learning purposes. I like the Elixir language, but I'm a littl
by zeemonkee3 11y ago
I've been getting a bit farther along with Phoenix - just building a toy Instagram-lite site for learning purposes.
I like the Elixir language, but I'm a little concerned that in a real-world production app you'd really need to learn the fundamentals of Erlang and OTP as well (especially for things like error handling). So while Elixir is fairly easy (if you've done a bit of Ruby and functional programming) it's really the tip of the iceberg.
Phoenix itself is OK, but the lack of documentation and examples is brutal. It's very easy to go off into the weeds trying to do very basic stuff. I'm sure I'm doing a lot of things wrong, but there's a lack of clear examples to show the right way, even for simple things like "how to get the first row of a complex query with Ecto". I've stayed clear of doing an SPA so I don't get bogged down in Javascript tooling and pipelining issues, but a lot of things are missing from the basic setup - for example, Phoenix uses Bootstrap by default, but for some bizarre reason they don't include the glyphicon fonts out of the box, so you actually have to download/install bootstrap somewhere and copy fonts over. Maybe not a big deal in itself but enough of these annoying issues can sap momentum and enthusiasm.
I get that Phoenix is alpha, non-production ready software unless you happen to be a core dev, but the deeper feeling I keep getting though is that I don't really like big-box frameworks anymore. Sure, Django is still my go-to for a straightforward, lots-of-CRUD-screens type of project and it does that job very well. But I don't want to learn another Django. A lot of side projects I just want to start small, build out a nice UI in React or Vue (or play around in the mobile space) and add an API when I need a backend store or SMTP or whatever. For that Flask is fine, or maybe Go (or in your case, Plug). Use whatever libraries you need and follow sensible design patterns that suit the case at hand.
- marcus_holmes 11y agoAgree completely. Starting small and adding functionality that I need as I go allows me to understand exactly what I'm doing and why. I get to make the choices about whether I need a dependency, and what the costs of that dependency are. If all I need is 5% of the functionality, I can code up a small module to do just that without importing 150Kb of random unnecessary.
- iamd3vil 11y agoPhoenix is definitely production ready, as I am using it in many production systems now. 1) You have to eventually get into OTP. Elixir language is ok but all the stuff which makes it attractive is OTP and it's concurrency. If you are building a very small API you don't have to learn OTP ans you can get very far with that. 2) I find Phoenix documentation very good and the number of examples are increasing a lot day by day. 3) The default included bootstrap is just to show the landing page. You have to add your own css which you have to do if you use any other framework or library. 4) Phoenix is nothing like Django or Rails. Phoenix is very modular. See http://theerlangelist.com/article/phoenix_is_modular http://theerlangelist.com/article/phoenix_is_modular
- zeemonkee3 11y ago> I find Phoenix documentation very good and the number of examples are increasing a lot day by day. We can beg to differ. Yes, it's improving, but there's still a long way to go before it's at the standard of more mature frameworks. > The default included bootstrap is just to show the landing page. You have to add your own css which you have to do if you use any other framework or library. Sure, but if you're going to include bootstrap then you might as well do it properly rather than half-assing it. Better to not install bootstrap, I'd be fine with that, but to include it kinda-sorta then have bits missing is just going to confuse newbies. > Phoenix is nothing like Django or Rails. Phoenix is very modular Maybe it is, but you have to get far into the learning process to figure out where everything fits together, with pipelines, plugs, and so forth, before you can add and remove what you need. Out of the box Phoenix comes with a ton of dependencies and configuration you need to reason about first. In that respect it's very similar to Rails and Django.