1
9 Comments

Rails vs Django for development time

I really enjoy ruby, and rails - in particular the simplicity, development speed, and robustness of the framework. On top of that, there’s a big focus in the ecosystem towards effective productivity with things like Devise and Stimulus Reflex.

However, it feels like python is quickly becoming the Swiss Army knife of programming languages, from general scripting, to anything related to data science, AI, and it also has web capabilities. With this in mind, and because I want to delve more into data analytics for my career, I’m wondering if I should still invest time in Rails or if I should take up Django instead. I’d like to weigh up the advantages of RoR vs the Python stack. Do you think Rails is significantly superior to Django for indiehackers? How do they stack up for productivity, efficiency, safety, and development speed?

Which framework enables the fastest go to market time?
  1. Rails
  2. Django
Vote
  1. 2

    Rails is definitely faster. From its very beginning with the video of dhh coding up a blog in minutes productivity has been it's focus.

    The other factor is that since Ruby is a slightly more expressive language than Python, it has a considerable edge in DSLs. E.g., Django's router will never be like the Rails router because it can't be. Ditto for some of the testing framework DSLs.

    That said, Django is still very productive and the gap isn't that huge.

    1. 2

      Thanks! This is the sort of insight I was looking for. I guess I’ll just use the best tool for the job.

  2. 1

    I've used Django (1.9, so quite some time back) for some early personal projects and Rails at work. At their core I don't think they're very different, some top-of-mind differences that I think might be relevant to speed:

    • Backend-wise, I think Django has more core stuff built-in. User/Auth (like Devise), an Admin panel, more declarative models/migrations (this is amazing compared to Rails) are some things that come to mind. Though you can argue that Rails has ActiveJob now.
    • Frontend-wise, I think Rails is stronger. They both have a templating system and asset pipeline that is mostly similar, but Rails now has support for Webpack, which is great if you are familiar with the current state of JS (and otherwise another set of things to learn)
    • Rails' generators are a neat party trick (try rails g scaffold ...), but you'll probably need to customise them pretty quickly, so overall I'd give that to Rails with some caveats

    Going more into opinions and anecdotes:

    • I feel like I hear Rails more than I hear Django, maybe that's something
    • Django seems to have a higher learning curve (e.g. you start off creating "apps", which Rails leaves to advanced usage with engines) and feels more verbose (this is just as much a Python VS Ruby thing). Conversely, Rails has more convention/"magic" overall (except maybe versus Django's models/forms), which is great for speed, but also is it's own learning curve later on when you want to customise things.

    I'm more comfortable with Rails now, but would say both are great. If you want to get a feel for both, I'd recommend (both are not free anymore):

    It depends on your goals though, I don't think you necessarily need to learn Django even if you want to go deeper into data science.

  3. 1

    You should build a simple product in both and see what you like the best! I personally use Django and have not used RoR for anything serious. But I think Laravel, RoR, Django are all great stacks to build quick from what I hear. It really depends on that person's experience with the ecosystem and tooling. No magic answer really.

  4. 1

    It really depends on what you like to work with. What do you like better? Python or Ruby? Rails or Django? If you are going into data analytics for your career, it wouldn't hurt to go with Python. I studied Machine Learning for my graduate school, and most of the projects were done in Python. But, I like Rails to build web apps because I like coding in Ruby. For all my side projects, I use Rails because I am used to it and know all the necessary gems that I will need for the project. This can be true for Django if you are more familiar with it. There is no wrong answers here. =)

    1. 1

      I suppose I can just keep using Rails for Web Dev and scripting and use Python for data stuff.

      1. 1

        What "data stuff" are you working with, as an indie? It generally takes a larger user base before that's a good investment but it totally depends on your business.

        1. 1

          I do data analysis at my day job and most material on that is in python. SciRuby doesn’t have much of a following sadly.

          1. 2

            Does your indiehacking project have any connection to the day job? If not I wouldn't worry about it.

            Yeah, it is too bad Ruby missed broader adoption. I think the key mistake was having a poor dev experience on windows for so many of its largest projects back in the mid to late 2000s.

Trending on Indie Hackers
Getting first 908 Paid Signups by Spending $353 ONLY. 24 comments I talked to 8 SaaS founders, these are the most common SaaS tools they use 20 comments What are your cold outreach conversion rates? Top 3 Metrics And Benchmarks To Track 19 comments Hero Section Copywriting Framework that Converts 3x 12 comments Join our AI video tool demo, get a cool video back! 12 comments How I Sourced 60% of Customers From Linkedin, Organically 11 comments