pmjoe
Does anyone know any good example of web applications without Phoenix? I think Elixir is so damn simple, but every time I create a Phoenix project is just too much. I just want to do something with Ecto, Plug, and Htmx.
Trending in Questions
Hi all,
I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
I’m very new to Elixir, so sorry if this is a silly question:
I am wondering what happens to the mailbox of a process when the machine i...
New
How do I tell Hologram not to escape HTML when substituting into templates?
{Textile.render(@product.long_description)}
escapes the HTM...
New
Background
When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error:
* assembling mark...
New
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New
Is there a way to import record definitions in the iex shell for pretty printing (similar to the rr command in the erl shell)? This woul...
New
When I use Mix.install with a git dependency, using git@github.com:... how do I change the SSH identity used?
I’ve got two Github accoun...
New
Other Trending Topics
Hey there,
I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first.
...
New
Hi everyone :waving_hand:
I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #elixirconf-us
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #elixirconf-eu
- #processes
- #security
- #api
- #forms
- #performance











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
dimitarvp
@wojtekmach’s repository of single-file apps might be very helpful to you:
https://github.com/wojtekmach/mix_install_examples/blob/727e0a70aeb194593eac913afc224c5c0e0f09ea/plug_cowboy.exs
It was for me.
Yeah, same here. I admire the work of the Phoenix team, I simply wish we had PhoenixLite or something.
mayel
This is mentioned often and I wonder if simply highlighting the
--no-*options in the getting started guide would help, because a lot of Phoenix is optional:--no-assets- equivalent to--no-esbuildand--no-tailwind--no-dashboard- do not include Phoenix.LiveDashboard--no-ecto- do not generate Ecto files--no-esbuild- do not include esbuild dependencies and assets. We do not recommend setting this option, unless for API only applications, as doing so requires you to manually add and track JavaScript dependencies--no-gettext- do not generate gettext files--no-html- do not generate HTML views--no-live- comment out LiveView socket setup in assets/js/app.js. Automatically disabled if --no-html is given--no-mailer- do not generate Swoosh mailer files--no-tailwind- do not include tailwind dependencies and assets. The generated markup will still include Tailwind CSS classes, those are left-in as reference for the subsequent styling of your layout and componentsEdit: these are the files created when you use all those flags:
Edit 2: These are the dependencies included:
And the extra dependencies in lockfile:
So apart from adding a
--no-telemetryflag I’m not sure how much lighter it could reasonably get while still being sensible?LostKobrakai
This sentiment surely comes up regularly, but having seen people attempt this over the years I‘m not sure skipping phoenix (the library) is worth it.
Plug for simple stuff can be quite simple code and less files, but on the other hand any more advanced stuff will need you to write more code than you‘d need to write with phoenix around. Like doing a redirect needs you to manually deal with location headers and also will be missing the security validation phoenix does for local paths. I‘ve seen similar things quite a bit over the years where people ask how to do a thing they know is simple from phoenix in a bare plug app, where it turns out having phoenix would‘ve been the simpler answer.
Phoenix can be stripped down quite a lot, you can use a plug router on a phoenix endpoint without issues (if you‘re not using router mounted LVs) and you‘ll still have most of the functionality of phoenix around.
dimitarvp
I am strictly focusing on amount of files, not the removal of features, some of which are critical for most commercial projects (like HTML/templating and DBs/Ecto). Phoenix projects have way too many files IMO.
I know that people who constantly work on Phoenix apps have gotten used to it but as a guy who is leaning on the backend side of things, Phoenix’s generated files relating to UI are confusing.
F.ex. I fail to see point of views to this day. Surely for a lot of projects you can always rely on the defaults that are injected in your code by the generator but these view files are just kind of… sitting there. They are basically an artifact of the framework’s chosen abstractions that leak into your project’s source code.
I’d try to do without them as a start and see how far I can take it.
dimitarvp
I agree. Even though the amount of files to me seem too much I’ve also experienced first-hand how extremely useful Phoenix is the moment your needs start growing.
xpressgetaway
100% agree.
mayel
I went ahead with a simple PR: clarify what's optional in phx.new by mayel · Pull Request #5783 · phoenixframework/phoenix · GitHub
pmjoe
My point is that with Phoenix I feel that the framework becomes your application. If I’m not mistaken Dave Thomas has talked a lot about this. Phoenix for me is the outer layer of an application, it’s the API or how it communicates with the outside world.
LostKobrakai
I‘d suggest differentiating phoenix the library from code, which is generated by phoenix generators. Because most of what the latter provides is not set in stone as all.
It‘s one way of doing things, which caters best to the usecase of powering crud generators for people trying to quickly scaffold apps. You‘re free if not encouraged to adjust those things to fit whatever else you need.
dimitarvp
Sounds like a good opportunity to upstream some more generators for other cases, then.