4 ms·
> the amount of boilerplate code which is generated is too high. Relative to what? From my experience other MVC web frameworks (e.g., Django, .NET, Laravel) h
by h0l0cube 4y ago
> the amount of boilerplate code which is generated is too high.
Relative to what? From my experience other MVC web frameworks (e.g., Django, .NET, Laravel) have the usual fragmented directory structure typical of MVC + ORM. Unless you're comparing to other LiveView frameworks? In which case, Phoenix is still the OG, and more mature and capable vs other platforms.
- blueblahvlah 4y agohttps://news.ycombinator.com/reply?id=34193789&goto=item%3Fid%3D34188461%2334193789 https://news.ycombinator.com/reply?id=34193789&goto=item%3Fi...
- fud101 4y agoit takes like 6 lines of code to have a working flask endpoint to deploy a quick and dirty API. About a billion files for phoenix. I hate that too.
- Existenceblinks 4y agoI understand that generator is for education purpose. New comers might find it's cumbersome to get start if generators are absent. However, I think it should be just some guide docs. Generated context can mislead the concept of how to use the context itself. It's easy to quickly write a dirty API in phoenix, but practice guides lead to ceremony.
- dugmartin 4y agoTo be fair you could use Plug and Plug.Router directly and get almost the same line count as a flask app. https://hexdocs.pm/plug/Plug.Router.html https://hexdocs.pm/plug/Plug.Router.html
- josevalim 4y agoPhoenix by definition assumes your projects will take longer than an afternoon. :) If you want a quick and dirty API, using Plug directly may be an option: https://gist.github.com/josevalim/fbfc669aa6087c5b79402b399d70349a https://gist.github.com/josevalim/fbfc669aa6087c5b79402b399d...
- dugmartin 4y agoYou beat me to the submit button by a minute.
- fud101 4y agoIt comes down to whether you want to maintain a bunch of auto generated files which will never be automatically updated. I would rather maintain only the lines of code I write not ones that were generated by some tool and then immediately became legacy.