CommunityNews
How I organize my Rails apps
Influenced by the experiences I’ve had last ten years of building and maintaining Rails applications, combined with my experiences using other technologies, I’ve developed some ways of structuring Rails applications that have worked out pretty well for me.
Some of my organizational tactics follow conventional wisdom, like keeping controllers thin. Other of my tactics are ones I haven’t really seen in others’ applications but wish I would.
Here’s an overview of the topics I touch on in this post.
- Controllers
- Namespaces
- Models
- The lib folder
- Concerns
- Background jobs
- JavaScript
- Tests
- Service objects
- How I think about Rails code organization in general
Let’s start with controllers…
Read in full here:
This thread was posted by one of our members via one of our news source trackers.
Popular Backend topics
Shayne gave this excellent talk the other day on Gleam, so I thought I’d share it.
From my point of view it was really interesting to se...
New
New
Such inflammatory, much wow. Unfortunately, Haskell itself agrees.
Some languages naturally lend themselves towards adoption. Some don’t...
New
The Race to Replace C & C++.
Three expert compiler writers sit down to discuss moving beyond C and C++
This thread...
New
It’s easy to view yourself as “not a real programmer.” There are programs out there that everyone uses, and it’s easy to put their develo...
New
Not had time to read it yet but this looks like a good interview…
Our friend Yukihiro Matsumoto, creator of the Ruby programming langua...
New
Everyone outside of tech has heard of JavaScript, Java, Python, Ruby and even .Net, but few if any have heard of F#. However, F# may be o...
New
This post explains why Scala projects are difficult to maintain.
Scala is a powerful programming language that can make certain small te...
New
Have you ever wanted to write a structurally typed function in Rust? Do you spend a lot of time and effort getting your Rust struct s jus...
New
There is a new community resource available on writing “Safe Ecto Migrations”. When we get a migration wrong, it can lock up your product...
New
Other popular topics
Reading something? Working on something? Planning something? Changing jobs even!?
If you’re up for sharing, please let us know what you’...
New
What chair do you have while working… and why?
Is there a ‘best’ type of chair or working position for developers?
New
New
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it.
Does your monitor have eye p...
New
New
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
Hello everyone! This thread is to tell you about what authors from The Pragmatic Bookshelf are writing on Medium.
New
Use WebRTC to build web applications that stream media and data in real time directly from one user to another, all in the browser.
...
New
Will Swifties’ war on AI fakes spark a deepfake porn reckoning?
New
Background
Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /svelte
- /onivim
- /typescript
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /flutter
- /elm
- /vscode
- /ash
- /opensuse
- /html
- /centos
- /php
- /deepseek
- /zig
- /scala
- /lisp
- /sublime-text
- /textmate
- /react-native
- /debian
- /nixos
- /agda
- /kubuntu
- /arch-linux
- /django
- /deno
- /nodejs
- /revery
- /ubuntu
- /manjaro
- /spring
- /diversity
- /lua
- /julia
- /markdown
- /c








