AstonJ
I’ve not had a chance to read this myself yet (on mobile) but noticed he’s just released this.
Some older discussions on the topic can be found via the elixir-for-programmers-course tag ![]()
For a while now I’ve been doing my Cassandra impersonation, telling everyone who’ll listen (and quite a few folks who won’t) that we need to be writing code in smaller chunks. I know what happens when we don’t, as I was the author of one of the largest early Rails applications (65kloc), and it became a nightmare to work with.
I don’t want the same thing to happen in the Elixir world. But if I’ve learned one thing, it’s that you can’t tell people that something is a good idea and expect them to do it.
No, you have to make it easier to do things the right way.
So, I’m releasing a first version of my Elixir Component library.
Anyway, the philosophy of all this is not to save on typing. Instead the intent is to nudge people into writing their programs using lots of small, independent components, linked via dependencies. That’s how I’ve been coding for the last year or so, and so far I’m really, really liking it.
Tutorial/guide: component/README.md at main · pragdave/component · GitHub
Blog post: Small is Beautiful—The Component Library
GitHub: GitHub - pragdave/component: Experiment in moving towards higher-level Elixir components · GitHub
Trending in Discussions
Other Trending Topics
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
kblake
I’d recommend reading the README over the blog post as it has more thorough examples. I’m curious to hear what others think!
AstonJ
Yeah I agree, I labelled it as a tutorial in the post above as it seems quite in-depth
Unfortunately I haven’t got time to go through it right now though, so looking forward to hearing what everyone else thinks as well
otuv
Reading the README it seems about right. I have had similar thoughts for quite a while but I have yet always failed at the implementation. My hopes is that this, or resulting best practices and examples could help me get of the ground.
AstonJ
Have you (or anyone else) seen his Elixir for Programmers (PragDave) course… does it differ much to that?
otuv
Unfortunately not. But reading the reviews it sure looks like something I should have been looking for!
axelson
Yeah it different substantially since this is a library that implements the GenServer structure that he advocates for in the course and a little more.
sfairchild
I went through the course about 2 months ago. It was great and he is really a great teacher.
I haven’t had the time to read the full article or README yet, hopefully tonight I can sit down and review it. But from the little snippet I did read it was very similar to the approach he taught.
jeremyjh
I’m a little bit concerned that this (blog post at least) encourages people to use servers where only modules are needed. In web applications for example, putting your application logic in a GenServer is an anti-pattern as it will lead to single-threading your requests, not to mention all the copy operations. I can’t argue that raw GenServer requires a lot of boilerplate but
ex_actorhas been cutting down the boilerplate for 5+ years. Is there more to it?axelson
@jeremyjh that sounds like a good point to bring up on the issues list
AstonJ
New video: