Live data from Hacker News

Ruby Frameworks? Which one? Bye bye Rails.

slideshare.net

61–70 of 93 posts

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

#61
post #3

I definitely love Sinatra, and I'm impressed by the admin interface, but it looks like there's no support for DataMapper as an ORM. I also wonder if this is just turning Sinatra into Rails. I think for the now I prefer to just build a Sinatra app and add gems and plugins as I need them.

I remember using Datamapper with Sinatra to develop a pretty basic system for some weird user registration needs of a company offering medical assistance in the way of air ambulances in 2010. I don't really know if it's still supported since I've been doing .Net stuff since then... but I can definitely tell you it WAS supported two years ago, and I seriously doubt that they don't now.

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

#62
post #59

The only thing I see wrong with this is lack of coffeescript. I love coffeescript like bill clinton loved getting dome in the oval office, and if anything is without it, i will either cry, build support in myself, or both (at the same time?) Anyway the point of this comment is please give us coffee! It looks like padrino has everything else covered and I really like the idea.

Coffeescript was mentioned in the slide, but why does the framework have to support CoffeeScript?

Theres plenty of ruby libraries like Guard to autocompile CS files or you could just us the built in CLI.

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

#63

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…

> If you are resistant to adopting a new framework and having to reinvent a bunch of stuff, congratulations. You may be an early adopter or hacker in other areas of your profession, but as far as web development goes, you’re a conservative.

Then I must eat rocks and ride dinosaurs, because Rails is already too fast-moving for me.

I don't do Rails full-time right now, and my biggest problem is that Rails changes all the time. Rails' documentation is basically a Googleverse full of blog entries, and you have to compare the (often hidden) timestamps to understand which blog entry is more relevant. I often enjoy a Railscast only to find out that nothing of it is applicable anymore.

Minor updates to Rails, Rubygems, Bundler or even Ruby can break everything without warning. And dare you accidentally admit to #rubyonrails that your customer is still using svn or not on 1.9 yet, and you will be publicly ridiculed. It takes some time every month to even keep your existing Rails apps secure but running.

Excuse the rant here, but from a casual Rails hacker's perspective, I actually miss stability and not change.

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

#64
post #40

Earlier quoted context omitted.

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…

When's the last time you had to dive into the Rails source code? The only bits of Rails I'm consistently familiar with at the source level are the code that maps HTTP parameters to the "params" hash and into AR model attributes, and the session cookie stuff --- and those are professional interests, not "I couldn't figure out how to use it" things. I'm asking seriously, because I spend about 20% of my work time writin…

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. From the developer level that behavior is indistinguishable from magic, and the callback code in AR tries to act like magic as well. It's extremely difficult to follow, let alone understand.

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

#65
Padrino is the perfect framework for Djangonauts who want to learn a ruby web framework whilst also learning the language, which was my case 1 year ago. Especially those who don't like the "rails way".

It has most everything we love about Django: admin site, mountable apps (which I consider actually better than Django's), speed (it is as fast as Django in my benchmarks) plus a sane and flexible routing sytem, generators, localization, full support for various subframeworks and a much, much better configuration system (no global settings file!).

It is everything I wish Django was, but in Ruby.

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

#66
post #60
post #50

Earlier quoted context omitted.

That's not 100% true, there are more than `hello world` benchs. Check it out here: https://github.com/DAddYE/web-frameworks-benchmark/tree/more... Yep, speed is 4-6x faster, but most important for me is memory usage is much much less. On every Rails project I need to use monit/god to stop/start when for xx cycles memory is > 100mb or so. Without that a rails project can sucks 1-2gb of ram. Isn't quite normal to my st…

Sorry if I have to ask, what part is not 100% true? You mean that padrino app can be still faster with large app? You said there are more than "Hello World" benchmarks? I looked at the link that you provided and then looked at this source code of the Padrino app and its still "Hello World": https://github.com/DAddYE/web-frameworks-benchmark/blob/more... I expected to see something more than just Hello World app. I am…

It's quite complicated make a full featured app for all webframeworks, btw look at here: https://github.com/DAddYE/web-frameworks-benchmark/blob/more...

Which is: https://github.com/DAddYE/web-frameworks-benchmark/blob/more...

With a layout: https://github.com/DAddYE/web-frameworks-benchmark/blob/more...

Not a very very complex use case but a bit more than a `hello world` app.

I love Rails, Im using i.e. ActiveRecord in 90% of my projects. Beside that I ported 162 apps over Padrino not because I've free time to spend but because I need decent performances (without kongfu with mem/redis caching) with less memory usage.

Try to browse rails (minus ActiveRecord) source code and padrino source code to understand what I mean.

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

#67
post #40

Earlier quoted context omitted.

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…

When's the last time you had to dive into the Rails source code? The only bits of Rails I'm consistently familiar with at the source level are the code that maps HTTP parameters to the "params" hash and into AR model attributes, and the session cookie stuff --- and those are professional interests, not "I couldn't figure out how to use it" things. I'm asking seriously, because I spend about 20% of my work time writin…

i didnt want to write new code each time my data-model changed: migrations, model code, new controllers/views. this meant a Resource class, a uniform controller request/response cycle following web-arch/linked-data standards. at this point, would have had to significantly monkeypatch both rails and its attempts at providing a generic Resource class to override its magic (and/or incur the CPU usage for the magic to do what i didnt want). it was a lot simpler to just start with a Rack handler from scratch.

ive been using my web framework for 5+ years for personal and professional projects, and as far as i know there are no other users. Ry Dahl was churning out all sorts of 'concurrent' web-frameworks and servers in Ruby building on EventMachine and so on for years, and im pretty sure i was one of the only people using his code. eventually he scored a hit as node.js when finally rewriting one of the concepts in Javascript

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

#68

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…

> If you are resistant to adopting a new framework and having to reinvent a bunch of stuff, congratulations. You may be an early adopter or hacker in other areas of your profession, but as far as web development goes, you’re a conservative. Then I must eat rocks and ride dinosaurs, because Rails is already too fast-moving for me. I don't do Rails full-time right now, and my biggest problem is that Rails changes all t…

Yes, I particularly enjoyed applying security fixes from the so-called stable branch and suddenly having all my validation messages corrupted, or form parameters randomly truncated.[1]

[1] http://david.rothlis.net/rails/experience_report/#stable_bra...

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

#69
post #40

Earlier quoted context omitted.

When's the last time you had to dive into the Rails source code? The only bits of Rails I'm consistently familiar with at the source level are the code that maps HTTP parameters to the "params" hash and into AR model attributes, and the session cookie stuff --- and those are professional interests, not "I couldn't figure out how to use it" things. I'm asking seriously, because I spend about 20% of my work time writin…

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."

http://guides.rubyonrails.org/active_record_validations_call...

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

#70
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…

When I started working with Rails, I didn't understand it. I wanted to see how all the magic worked. Then I gave it a second go, and skipped trying to learn how Rails was built, but just assumed the framework worked the way all the code samples said it would work. Success.

Rails definitely makes specific assumptions about how things should work and especially how database operations should work. If you're always looking under the hood, you're probably right -- it's not suited to your style.

Post reply on HN