6 ms·
If I was building a startup today I would choose Rails for the MVP without a doubt. So much time wasted with the modern JS ecosystem or even other mature framew
by whalesalad 8y ago
If I was building a startup today I would choose Rails for the MVP without a doubt. So much time wasted with the modern JS ecosystem or even other mature frameworks like Django. I have almost 15 years of experience building web apps professionally with the majority of that being spent with Django.
There is no tech stack in the world that will get you shipped and proving your business faster than RoR.
- davzie 8y agoAs someone who is heavily invested in building web app MVPs for clients on a budget, I've been considering moving to RoR and away from Laravel if not just for the simple scaffolding Rails would give me. Given you spent time in Django where some things are a little manual just like Laravel, would you recommend me diving deep into Rails given what my business aims to do? Hope you can help!
- rorykoehler 8y agoI built an app from idea to mvp in 2 days with Rails last month. It has user accounts, reddit style threaded comments, collaborative maps, algorithmic popularity feed for posts (like HN front page or reddit) and a bunch of other little stuff. I basically had an idea on a Saturday and by Monday morning I could demo it to my team.
- davzie 8y agoffs, there goes my next few weeks! Thanks for the info ;)
- rorykoehler 8y agoStart here: https://www.railstutorial.org/book https://www.railstutorial.org/book You'll fly through it.
- toasterlovin 8y agoA word of warning to other people out there: in my experience, this tutorial is best suited to people who are already familiar with at least two of: 1. Web development 2. Ruby/Ruby on Rails 3. Test Driven Develepment If you're new to programming, start with something else. Trying to learn all three of these at the same time is not a recipe for success. Source: personal experience watching 100% of former mentees fail to make any progress with this tutorial.
- davzie 8y agoAppreciate it, thanks! Been web-devvin' for 12 years now so I hope it seems understandable otherwise I seriously should just change career :D
- rashkov 8y agoI found that skimming the Test Driven Development sections helped cut down the amount of material I needed to get through. Already knowing web development is a good prerequisite as well, and Michael Hartl's Learn Enough series should be able to fill in some of the gaps. Rails didn't make a lot of sense to me until I learned some Ruby, HTML, CSS, and enough Javascript & jquery to manipulate the DOM and make ajax calls. Rails is not really for new learners in my opinion, since the famous Rails magic can obscure what's happening under the hood, and the framework itself has grown and evolved over the years. Nodejs is better for new devs in my opinion, but Rails really shines once you have the basics and a couple of small apps under your belt.
- matte_black 8y agoDon’t get too excited, with the right packages I could do the same thing in a day in React. Maybe less. And it would have optimistic UI, real-time updates and a static page distributed through a CDN.
- chrshawkes 8y agoI'm sorry that sounds like a load of BS. I've worked with Django 8 years and React since 2014. Nobody can replicate what django does using a client side view library like React. At least not without downloading half the internet via NPM or Yarn. I suppose your talking about React-Router, Redux, etc... etc... and pulling it all together via some Node/Express single page app? I'll take django for simplicity any day and run React from it's templates.
- matte_black 8y agoReact is simple. First I'd start with creating the database in Postgres. Create tables to hold data and any views needed to represent joined tables for convenience. Once that's settled, the express server comes next to create a CRUD API to work with the data and handle user authentication and authorization. This is dead simple and once it works there's little you need to touch. The database handles any data dependent business logic. By this point you can make API calls and use the application through any REST client. So now I just need to create a React client to consume the API and give a great user experience. Don't need Redux. Grab React-Router and a couple packages for UI components and you'll be up and running with the MVP in no time. Checkmate.
- goatlover 8y ago> Create tables to hold data and any views needed to represent joined tables for convenience. Once that's settled, the express server comes next to create a CRUD API to work with the data and handle user authentication and authorization. Not sure how you're beating Rails or Django at this, unless you're a 10X developer going against a normal one. For that matter, I'm willing to bet an experienced Drupal developer using drush would be faster setting things up.
- dchuk 8y agoCan you share the app? If so, would be cool to post it here to get a discussion going on it: https://hackerforums.co/show-hf-f7/ https://hackerforums.co/show-hf-f7/
- rorykoehler 8y agoI'll be posting a Show HN shortly . We put another 2 weeks worth of work into it to polish it and wire it up with mixpanel funnels etc.
- TomK32 8y agoDo you know about Rails Application Templates? http://guides.rubyonrails.org/rails_application_templates.html http://guides.rubyonrails.org/rails_application_templates.ht...
- SaltyBackendGuy 8y agoI have to agree. Our stack is currently Node.js. After all the abstractions that we've added to make it work for us, it's basically Django now. We could have saved a lot of time just going with Django first. (Or Rails if that's your flavor)
- rbanffy 8y agoI had the same experience building up from Flask. By the time we finished, we had a more or less complete clone of Django, built with a unique combination of various tools that more or less worked together.
- michaelbuckbee 8y agoThis is what inevitably happens to me as well. This past week I wrote what was literally a single file ruby script to do some automated QA testing for a website migration, since that day I've been requested to: - make it a web app so the team can run tests - add some charts - keep it secure - umpteen new semi related features Would have been easier to just start at "rails new".
- pqdbr 8y agoSame here, and I feel more and more excited about the framework. The recent official support of Webpack was a huge addition.
- projectramo 8y agoWhoah! I think the surprising thing about this comment is that you actually developed using Django for all those years, and you still prefer RoR. The vast majority of people on the web that comment invariably say they are pretty much the same and it depends on whether you know ruby or python better. So people who already use python for finance or data science pick django. I saw a study (old now, from the early days) that claimed they were about the same but that the admin page on django cut dev time by some %. This is the first I've heard a long time django user say that rails was faster to develop and not about the same. Can you elaborate on why?
- mcintyre1994 8y agoI've used Django a little bit, I can definitely believe the admin page cuts dev time if Rails doesn't have an equivalent. But I know Python well, and Ruby not-at-all, and I'm not sure I'd choose Django over Rails, because Ruby gems seem better for RoR than Python has in terms of Django-compatible packages. Maybe I'm just not looking in the right place but there doesn't seem to be nearly as much of an ecosystem there.
- swlkr 8y agoRails has this: https://github.com/activeadmin/activeadmin https://github.com/activeadmin/activeadmin
- Daishiman 8y agoYou should look in https://djangopackages.org/ https://djangopackages.org/
- mcintyre1994 8y agoThat's really helpful, thanks! :)
- whalesalad 8y agoPlease note these are my opinions. The efficiency you gain using Django on the admin side is lost with every other part of your app. 1. Active Record is superior to the Django ORM (which is still good). Being able to set scopes and do a lot of conveniences right on the model without needing to extend/override a manager is great. Being able to connect to an existing database for free is also great. 2. Controllers are great. The way they can be nested and composed is also powerful. Being able to mount a resource at any level in the hierarchy either alongside or beneath (or both!) is hugely powerful. I can state concerns at each level and 'forget about it' deeper. Eg, if my controller A needs to ensure a given user has access to that resource and all children, I can do that at level A and trust its handled so in the controller for level B or C (deeper layers) I am not worried about it. 2b. The syntactic sugar to add authentication/authorization/guards in controllers is incredible. `before_request :ensure_access` 3. Active Support is phenomenal. 4. You can build very elegant, flexible and powerful RESTful and RESTish API's REALLY quickly. And not just naive stuff that you can do with something like 10 lines of Flask ... but really foundational stuff that allows you to hit the ground running and then build on it layering in more security and functionality. 5. Polymorphic/STI power with Active Record. AR gives you so much more freedom to do polymorphism and bend your database to model your data as you see fit. With Django you are oftentimes stuck doing things their way. For instance if I want multiple classes to share a single database and get instantiated based on a 'type' field ... that is trivial in Rails and difficult with Django. Even moreso if you want to do relationships with those polymorphic objects. 6. Finally... the most important thing... it's sometimes difficult to model your domain/business inside of Django and by extension the Django admin tool. Let's say you have a friendship between two people. How do you create that in Django? You might have a many-to-many which means there is gonna be a join table somewhere. Do you ask your customer support folks to go into the FriendRelationship UI and 'create an object' connecting person_a to person_b and ensuring to choose the correct relationship type from the enum? Worse, you have too many users so you cant use a select field or search box without plugins and are left with two input boxes that expect a valid person ID to the FK. So now customer support needs a workflow for managing this data. I'd rather build my own "manage friends" page that will take me all of an hour and provide an experience modeled after the problem/task not the database. Or let's say you have a more intricate transactional type of process where an object needs to be created with 3 or 4 child objects. The parent needs to be created first, then the children need to be created and linked to that parent. Sure, you can do this in the Django admin flow but at that point you might as well be writing `INSERT INTO...` queries. Again, I'd rather build my own tool. I will save SO much time building the API and the business logic for my program that I'll be afforded the time to build an administrative tool that is focused on tasks specific to my team/business not just a graphical representation of my SQL tables. I could go on and on and on. I was a Django zealot for a long time and refused to drink the kool-aid. I bought into the hype from the community and trusted folks when they said "rails is magic, I don't like it" but that is a horribly naive approach and frankly I only hear it from less experienced engineers. When you get acclimated to Rails you realize there is no magic, it's all just straightforward code written by people who truly want to get things done. Perhaps I just align more with the Ruby way of thinking. Django folks tend to pride themselves on boilerplate and more complex interactions... like it's some kind of badge of honor.
- mpd 8y agoYou can even use the under-the-radar PyCall gem[1] if you find you need a little peanut butter for your chocolate. I discovered it recently, and it has been great to be able to use various Python NLP libraries without having to learn a new stdlib, deployment stack, etc. [1] https://github.com/mrkn/pycall.rb https://github.com/mrkn/pycall.rb
- matte_black 8y agoCurious, what would you choose beyond the MVP?
- wolco 8y agoNot so sure anymore. PHP and the laravel framework will be quicker to develop and faster to ship and perform more requests per second. JS - Node/ Vue/react base provide one environment which can speed up development. Still fast compared to Django, java, asp, go, perl, etc
- rimliu 8y agoWhat are your claims in the second paragraph based on?