Hacker News new | ask | show | jobs
by jolux 1545 days ago
There’s no JavaScript unless you write it into the template. If you want to use LiveView that needs JavaScript but plain old templates do not.

As for bloat I don’t really agree but I can see how it might appear that way. Phoenix is actually not monolithic, it is sort of just a set of conventions and macros (batteries) that make using Plug and Ecto and some other libraries together more cohesive and more like programming in Rails. If you don’t like that approach you can also just use Plug and Plug.Router directly, which is more of a microframework feel like Flask or Sinatra.

1 comments

Got any resources for simple usages of Phoenix? Most of them are all about LiveView and a lot of stuff that uses JavaScript.

> There’s no JavaScript unless you write it into the template.

I want this. How do I achieve this? "mix phx.new" is not it, as there are JavaScript files in "assets/", for example.

You pass the `--no-assets` flag when using `mix phx.new`[1]

Also ime, there's not many good blog posts or guides around Phoenix that I've seen. The sort of de facto resource would be the Programming Phoenix book. It's well worth the $25 considering the amount of effort Chris and co. seems to have put into it.

[1]https://hexdocs.pm/phoenix/Mix.Tasks.Phx.New.html

Thank you! Will give it a go. :)