Learning Elixir by learning Phoenix Framework. Trying to build up interactive Deck GL map. A little frustration, a litle anger, a little excitement, a little hope and everything in between.
As usually, nobody tells you about nice project structure. You are left alone to figure that out. Docks says - use umbrella projects to organize your work. Others says “Don’t use them”. Some says - “we are ditching ubrella projects in our org” without giving too much reasoning.
Phoenix is betting on Tailwind. Basically they force you into it right at the very beginnig. I hate that. I don’t think, Tailwind should be used in any long term project. I ditched it and switched just old good Sass.
As I develop “in open”, I see quite some “bot hack scans” comming in. I just wrote some simple
Plug and placed it right before hitting the Router. In endpoint.ex
. Basically made some
simple “honey pot” to collect the IP’s and patterns.
On some URL’s I just mess up with the response headers to make some fun out of them. :)
Found that root.html.ex
and app.html.ex
default layout example bit confusing to understand.
But that’s because I am coming from Public/Authenticated apllication context. Even more… my
authenticated “applications/modules” each have a little different layouts.
So… they default example makes sense only for very basic “to-do app” layouts. nothing more.
For example… you might want to load different JS bundles at different routes… good luck to
figure that out! Not a single indication in the Docs. For example, Deck GL can go up to 20MB
bundle. There is no way I would ever bundle it into default app.js
.
So… either you create some nasty conditionals in the root layout (html head), either you use
some CDN. And good luck with tree shaking.
A LOOOOT of outdated content! But at least there IS content. :)
So… at this point… I have really messy project with bunch of WIP’s all over.
Will keep learning. I hope at the end of this month to get somewhere.
I like this winter. There were almost no snow in the city which is really great thing. I hate snow in the city.
UPDATE: Phoenix is felling too “magical”. It feels like there are too much magic happening under the hood without clear indications of the flow. When I were working with plain Go… everything was trace-able. I were able easily to follow the chain. Even CodeIgniter felt way more predictable and easy to follow.