7 ms·
Ask HN: I don't like Rails. Am I missing something?
I started working on a rails project for a TechStars team this week. It's my first time working with Rails. I haven't touched a CRUD app or a relational database for a while. Rails is full of conventions and tools that need to be rote learned. I realize that they're designed produce DRY codebases, and substantially reduce development time. I feel boxed in - the app is very unresponsive and at I'm writing essay-like queries. I miss node, redis and socket.io. Perhaps this is such a painful process because I'm a rails newb.
- glenjamin 16y agoWhich version of rails are you using? Rails 3 is far far superior to rails 2.x in my experience. In addition, does the rails model fit your needs? Rails is there to be able to roll out a clean, well structured, well tested CRUD application - it's certainly not a "I win" button. I'd wager that if you find you're using essay-like queries, either you've missed a trick, or rails isn't a great fit for your application.
- mkrecny 16y agoRails 3. I think I've missed a trick.
- pestaa 16y agoMy experience with Rails is that if you stay on the path it marks for you, you will really develop on rails. If you want to customize a little, it makes it really painful. If all you need is a CRUD app such as Basecamp and the other products from 37signals, Rails is a no-brainer and you'll be already half-way done. If you need something more or something different, you better off looking deep in the pool of plugins, because if they don't have the answers, you'll need many hours to break the convention and tweak to your requirements. The essay-like queries is a code smell, by the way, and to me it suggests you're underutilizing Active Record scopes.
- mkrecny 16y agoI agree. Based on conversations that I've had with rails gurus (I'm in a co-work space with pivotal labs) the essay-like queries are definitely a code smell. I think the guy who has laid the relational foundation for the app I'm working on (and taught me all the rails I know to date) has done so in a non-Railsy way.
- pestaa 16y agoYes, and it's not Rails only; every framework that uses Active Record (and that covers the vast majority) requires this sort of approach. "Skinny controller, fat model" is not as easy as it sounds.
- frankus 16y agoNot to sound flippant, but there's your first problem. Rails really doesn't want to be layered over an legacy database schema. Doing so would definitely lead to essay-like queries.
- phren0logy 16y agoRails is self-described as very "opinionated." In practice, I have found this to mean that if something is difficult I'm not doing what Rails expects me to do. Sometimes that means I'm not using a mechanism in Rails that does exactly what I want, thereby making life harder for myself. Sometimes that means that means I want something different than the use-case Rails is optimized for. This is still possible, but more complicated. In the balance, this has meant that easy things are easy and hard things are hard. If it is hard to do something easy, you are probably doing it wrong. Working through some up-to-date Rails tutorials/guides will likely make your life much easier. You still might not like it, but you'll be working with it instead of against it.
- mapster 16y agowell put. // fyi: you write prose like a programmer
- phren0logy 16y agoThat's because I'm writing this for programmers. FWIW, I'm not a programmer in my day job.
- mapster 16y agoIt was a compliment. Carry on
- phren0logy 16y agoI took it as one (and upvoted you). I'm not sure why your comment got so many downvotes.
- nudge 16y agoYou're not necessarily missing anything. I tried learning rails twice, and neither time did it really click with me. Then I tried learning django and it was a much better experience. I think it's just a matter of going with what works for you. As long as there's an ecosystem around the framework / toolkit, it doesn't matter what you're using.
- maxbrown 16y agoRather than make a new thread, I figured I'd ask here - for a newcomer to web app development looking for a framework to learn, would you all suggest Rails or Django or something else?
- beatpanda 16y agoSpeaking only for myself, I decided to learn Python/Django instead of Ruby/Rails. Part of this is because I work in journalism, where Python is more widely used than Rails, and part of it is that I didn't like the framework doing so much work for me.
- znt 16y agoThe scope, rather than the language is what you need to focus on when starting to learn web development. Choose 2 frameworks, a "big" and a "small" one, then develop similar applications on both of them. This way you'll have chance to see the big picture and how the low level gears work. For ruby you can go with Rails + Sinatra, for python you can try out Django + Flask for example.
- mr_november 16y agohttp://www.quora.com/Which-should-I-learn-Django-or-Rails?q=rails+or+ http://www.quora.com/Which-should-I-learn-Django-or-Rails?q=... Probably more applicable is Ruby or Python: http://www.quora.com/If-I-only-have-time-to-learn-Python-or-Ruby-which-should-I-choose-and-why http://www.quora.com/If-I-only-have-time-to-learn-Python-or-...
- mr_november 16y agoAm I missing something here? Why would this be worthy of a downvote? Genuinely want to know so I don't make this 'mistake' again if it is in fact bad form.
- minalecs 16y agoI think one of the problems, possibly with the Op, is learning MVC and understanding basic concepts. Sytax is a big thing. You'll find many examples of why writing in ruby or python is sometimes preferable to other languages. Otherwise, if you understand core concepts and language, learning either one is preference. I like the Ruby ecosystem a little better, and moves really fast as problems come up, but this is my personal preference.
- clyfe 16y agoI am an experienced Rails developer and evangelist. I much (NB: opinion) prefer Rails over everything else. If you would be so kind to share details or code (if possible) I might point out what you are doing wrong, and why Rails seems not to work for you.
- brianmario 16y ago"It's just ruby."- My favorite quote from one of the best Ruby programmers I know, who at the time had very little to no experience with Rails. I'd say any framework has a "steep" learning curve, after which things just become easier and easier. A problem I often see is that a lot of people try to learn Ruby through Rails; And while that may work for some basics, a lot of things are still going to be "magic" until you understand Ruby itself a little better.
- chuhnk 16y agoI'm not a big fan of rails, initially that learning curve stopped me from making progress with ruby. I went with sinatra instead. The simplicity of the sinatra framework let me get right down to writing code. I learned alot of ruby that way and getting to know the MVC model was much easier because I was constructing pieces of it by hand, which some might deem wasteful but honestly rails can be overkill for the things you may want to do. Rails has been the web framework of choice for ruby for some years now and will continue to be but thats not to say its the best tool for every job. Sometimes you have to peel it all back. Thats where sinatra is brilliant. Sinatra is becoming more mature and will continue to pick up steam.
- adam-_- 16y agoThere's also Padrino if you want something straddling the middle ground. http://padrinorb.com/ http://padrinorb.com/
- eengstrom 16y ago(insert unrequested humor) What? My mother learned rails (really, she's a web developer)! Doesn't anyone develop on C any more?
- obiefernandez 16y agoYour description screams "I'm doing it wrong." Simple advice since you need results: Have your bosses hire an experienced Rails hacker for 1-2 days to come in and pair with you until you're over the initial learning curve. Any of the large shops (including my old one, Hashrocket) should provide this service for you if you insist on it. Won't cost more than a couple thousand bucks at most, less if you find an independent willing to be nice with you. I wouldn't want to be a complete Rails noob right now -- the first steps up that learning curve are brutal. However, once you have it down there's still nothing else that comes close to the productivity you get. In fact, I'm going to tweet a link to this in case people that follow me want to volunteer to help you.
- coreygrusden 16y agoI'm down cgrusden@divergentsoftware.com