thiagomajesk
Hi! After working with some Phoenix 1.7 apps recently I was thinking about this…
Should we rename the “controllers” folder to something else? Like, “resources” maybe?
Now that things are collocated in the same folder and there are other things than just controllers, it kinda makes sense, no?
There’s one other thing I’d like to ask: Is there a reason why the layouts are now in the “components” folder? And… Wouldn’t make more sense if we moved it to… let’s say… “resources/layouts_html.ex” and “resources/layouts/*”?
I understand this hasn’t been done probably because of backward compatibility, but since it seems so natural to me, I’d like to as for your opinion as well. Have you thought about this yet?
Trending in Proposals: Ideas
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
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
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security











Showing Posts 1 to 3- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
LostKobrakai
I’d expect layouts are in components, because they’re used “globally” and not for a specific controller or liveview. I’m not a big fan of the colocated templates, so I still create a
viewsfolder, which is used by both controllers and liveviews alike. That imo makes it much clearer that a template is independant of what it’s used for. With phoenix 1.7 it only became even simpler to just use the folder structure you want instead of the one given to you.thiagomajesk
@LostKobrakai I was thinking about something like this:
This way, we’d have everything grouped together under “resources” (for instance) and the “components” folder would be free for what we usually consider UI components (like core components and others).
I personally find that if collocation were done like this, it would be very cool! It looks like everything is very well separated and well-identified.
I would also like to hear @chrismccord opinion about it, perhaps he has already thought about doing something like this in the past.
LostKobrakai
I sort folders to top, so folders and files will never be truely colocated.