Live data from Hacker News

Ruby Frameworks? Which one? Bye bye Rails.

slideshare.net

71–80 of 93 posts

Re: Ruby Frameworks? Which one? Bye bye Rails.

#71
post #42

Earlier quoted context omitted.

Aw, come on, nothing I said was critical. It’s a very good thing to be conservative in places. If you’re sitting down to write a new program, how many things ought to be innovative? Where should you be breaking new ground? You can’t pick up a new programming language, roll your own new framework, learn a new programming paradigm, use it to start a new company and go into a new market, all at the same time. You pick a…

You didn't say "Java web development", you said "Struts". You didn't say "break new ground", you said "younger developers". You didn't say "pick and choose", "risk and reward", you said "resistent to adoption" and "conservative". And you said it on a thread mostly populated with people who used Sinatra --- we weren't "resistent" to Sinatra (I was seduced by it). We adopted it. It turned out to be poorer than Rails fo…

> We adopted it. It turned out to be poorer than Rails for our use cases.

Yep I had this exact revelation with a project I was working on. About half way through implementing my own general-purpose validation function and REST/CRUD routes for my models I admitted to myself that I was wasting time. These things are solved problems. I have a much greater appreciation of Rails as a result.

I use Sinatra as a quick way to put a web interface on top of Ruby code, Rails for any non-trivial CRUD paradigm web application.

Re: Ruby Frameworks? Which one? Bye bye Rails.

#73
post #25
post #19

Not sure why the author of the slides presents rails as a confusing mess. If you don't like the asset pipeline then don't use it. If you don't like the scaffolds then don't generate it. If you don't like active record, then don't use it. I love the fact that these new frameworks are popping up, but why try to pull down rails in the process? If this addressed legitimate issues rails has, then I would not have a proble…

The asset pipeline you can easy do without. I've forgotten Rails even did Scaffolds. But even though AR is "pluggable", you're working against the grain in Rails if you don't use it.

I'm using mongo_mapper with 2 apps right now and it doesn't feel like I'm going against the grain.

Re: Ruby Frameworks? Which one? Bye bye Rails.

#74
post #20

Would like to hear from people who have taken a user-facing Padrino/Sinatra app all the way through production and into maintenance. I have a few tiny services and extremely specific apps running on Sinatra, but any time I've needed to expose any kind of richness to the user I've ended up reimplementing in Rails as I kept reaching for things in ActiveSupport / ActionView etc. At some point I notice myself essentially…

My problem with sinatra is that I rarely work on a small well defined project. Usually these projects grow beyond their original scope and sinatra is not equipped to deal with that. I don't see the problem with creating a nearly empty rails app.

http://rawsyntax.com/blog/the-problem-with-micro-frameworks/

Re: Ruby Frameworks? Which one? Bye bye Rails.

#75
post #54

Earlier quoted context omitted.

What's the support Padrino provides for non-ActiveModel ORMs? How does Rails not provide that support? You can host arbitrary Rack applications inside Rails with a single line in routes.rb.

Can you host arbitrary Rails applications in other rails applications like you can host arbitrary Padrino applications within another Padrino application? (it should even be possible to host padrino apps in any other rack app, though I've never done that so far, it might need a little hackery)

Yes, they're called Rails Engines:

http://edgeapi.rubyonrails.org/classes/Rails/Engine.html

Re: Ruby Frameworks? Which one? Bye bye Rails.

#76
post #30

Earlier quoted context omitted.

This is a weirdly emotional appeal that ignores the fact that Rails is not Struts, is nothing like Struts, isn't standing still, was more or less rewritten not very long ago by assimilating its best competitor, and that the next ORM or gem that isn't popular today on Rails is very likely to be bootstrapped and implemented in the context of Rails --- unless its key distinguishing value is "a not-Rails replacement for…

I disagree. The main reason I dislike Rails is that it is too complicated. When working with it every day, I regularly come across issues with it that require that I delve into the source code. More often than not that is a depressing venture. I would love something more simple, that operated with less magic, and had code that was easier to understand. I'm not sure if Padrino is the answer, but it certainly merits a…

I had to learn Rails & Ruby at the same time. Early on I struggled because it was hard to figure out where Ruby stopped and Rails began. It took me about 6 months to get comfortable with both of them.

Re: Ruby Frameworks? Which one? Bye bye Rails.

#77
post #54

Earlier quoted context omitted.

What's the support Padrino provides for non-ActiveModel ORMs? How does Rails not provide that support? You can host arbitrary Rack applications inside Rails with a single line in routes.rb.

Can you host arbitrary Rails applications in other rails applications like you can host arbitrary Padrino applications within another Padrino application? (it should even be possible to host padrino apps in any other rack app, though I've never done that so far, it might need a little hackery)

Rails is a Rack application, so yes a Rails app could play host to more than one sub app. In fact this is such a good pattern, that Rails core added Rails Engines which do just but better.

Re: Ruby Frameworks? Which one? Bye bye Rails.

#78
Ok seriously, why the flamebait title? This deck is about padrino, yet it's no where in the title. We should be enticing discussion not argument in our titles. Also, now I'm not going to be able to find this post in a search. I'm going to have to search through all the negative posts about rails to find it instead of just searching for padrino.

If HN had downvotes on submissions, this is one of the rare cases I would find it useful as 'flag' doesn't seem to really qualify.

Re: Ruby Frameworks? Which one? Bye bye Rails.

#79

I empathize with the comments from the folks who are already heavily invested in Rails. It’s so easy to “just throw the whole stack at a problem” or “kill a fly with a shotgun.” This is always the way, and it’s why new ideas rarely displace the old ones directly. Instead, they have to appeal to a younger, nascent “market” that are not attached to the old product. Padrino’s best bet is to appeal to a younger, fresher…

I learned and fell in love with Rails because I was stuck working with Struts and I saw how much easier and better life could be. So, at least for me, the decision to use a different framework didn't follow what you describe. I'm pretty sure if I came across something that allowed me to solve my problem in an easier and better way than Rails would, I'd use that instead.

For example, if I were building a mobile API that I was fairly sure wouldn't require a web interface later on, I'd consider using something simpler and more performant than Rails. It's not a matter of being an early adopter vs. a conservative developer, it's a question of practicality. As it always should be.

Re: Ruby Frameworks? Which one? Bye bye Rails.

#80
post #69

Earlier quoted context omitted.

About a week ago I had a problem with after_commit callbacks not being called. It turns out (after diving into the AR source) that they indiscriminately swallow errors from after_commit callbacks. If you're testing a newly-created callback it is difficult to determine whether it's actually been called or merely just raised an error. I couldn't have figured that out without reading the source- it's not documented. Fro…

"The after_commit and after_rollback callbacks are guaranteed to be called for all models created, updated, or destroyed within a transaction block. If any exceptions are raised within one of these callbacks, they will be ignored so that they don’t interfere with the other callbacks. As such, if your callback code could raise an exception, you’ll need to rescue it and handle it appropriately within the callback." htt…

Huh. Thanks. I looked for a long time and didn't see that. The closest I got was an extremely old lighthouse ticket where Aaron Patterson suggested that they change the behavior to raise errors, but there was no followup.
Post reply on HN