What opinionated tips do you have when it comes to creating maintainable web applications?
Just over a year ago I wrote a post on medium which covered the following 5 core points.
- Creating & maintaining a living style guide
- Enforcing consistency in stylesheets
- Keeping your models skinny
- Keeping your controllers skinny
- Keeping your JavaScript simple
The full post for a deeper look into each point:
5 Opinionated Tips for Creating a Maintainable Rails Application | by Unathi Chonco | Medium
Unathi Chonco ・ ・
Medium
--
I would like to hear from other experienced web developers on maintainability tips that they think are evergreen.
Top comments (5)
Choose one.
I've assumed the opinion that nowadays, we prefer to keep both the model and controller skinny, because heavy business/domain logic can often be extracted out into service/query/form objects. Making those pieces of functionality more reusable
What is your reasoning to only keeping one of the two skinny?
Haha, my post is more for the sake of the joke then real complain.
I do agree, it's totally possible to have those classes skinny as have the logic in PORO.
Still I can imagine for most more or less big projects models are inevitably going to get fatter just because how many responsibilities has Active Record class.
😂
Yup this does eventually happen in big projects. I've found that having some kind of maintainable conventions help most with keeping new projects easy to work on; and when trying to create some kind of consistency in refactoring the legacy/bigger projects; or building new features.
Keeping them skinny in the long term definitely can be tough.
I published this article yesterday. Maybe it helps :)
The approach keeps both models and controllers skinny.
dev.to/phortx/pimp-your-rails-appl...