by pmontra · 1y ago · 0 comments
However I work for customers, many different projects, and I'm more than happy to work with Ruby on Rails, that enforces a common structure to every project, lets me predict where files are and what they do, etc. The advantage is in all the time not spent on learning from scratch every single project. I can start working on the very first day. Even Django, which is mostly anarchy compared to Rails, is better than complete anarchy with every single project using different tools and having a different architecture.
Furthermore projects started with Sinatra and Flask and similar tools quickly evolve into something as complex as Rails and Django, with tons of home made fragile code. There is never the time to make them robust, because nobody is working full time on those projects for years. Basically frameworks allow developers to multitask among projects which is great for consultants and also for customers, because they don't have to pay for the extra developers.
Curious question, why you say Django is mostly anarchy compared to Rails? I haven't used Rails btw.
Django allows multiple subprojects inside an app and code wherever one wants to place it. Rails also allows code anywhere but in practice it's always in the same places. Maybe it's Python, inviting developers to overengineer their code.
Yeah the templating language is not so nice, I sometimes use Jinja instead. Also, I don't like the classic MVC so I have a completely different structure thus validation your point completely :P
If you ever end up in Django land (for some project), checkout Django Ninja for APIs, you'll end up avoiding having these annoying url files and just have a
@api.get("some/api") def some_api(request):
instead. Super simple and useful. I just recently discovered it and I don't know how stable it is but it seems pretty stable so far.