Live data from Hacker News

Ruby on Rails 4.0.0.beta1 released

weblog.rubyonrails.org

21–30 of 91 posts

Re: Ruby on Rails 4.0.0.beta1 released

#22
post #21

Sorry for the naive question... But does this help Heroku's woes?

Nope. The issue at Heroku is before the request has a chance to talk to the rails application. That is why so many people were annoyed that the reporting tool that analyzes speed of the rails application did not report the time lost.

Re: Ruby on Rails 4.0.0.beta1 released

#23
post #19

What is the "Rails way" of doing AJAX calls and updating the DOM? I've been embedding Backbone views in the parts of my app that are the most interactive, but I feel like there's gotta be a better way.

Rails 4 uses turbolinks. It is a mechanism that instead of loading a new page loads up the HTML via AJAX and replaces the entire content of the page without reloading all the resources(css, js, etc...) So instead of having to deal with plenty of small ajax calls you just build an app as it would work in plain HTML and just use turbolinks to leverage AJAX.

Funny that ASP.NET had the same thing, called Smart Navigation, back in 2003.

Re: Ruby on Rails 4.0.0.beta1 released

#24
post #5
post #2

does threadsafe and ruby 2.0 mean we can create multiple instances with something like unicorn without forking the entire codebase?

Ruby 2.0 still has the GIL so if you want to run a threaded web server you'll still need to be using rubinius or jruby.

Any reason ruby still has the GIL and not moved to a thread implementation?

Re: Ruby on Rails 4.0.0.beta1 released

#25

Hello everyone! I am MEGA EXCITED for this release, as it's the first version in which I'm a committer. Wooo! In addition, 954 other intrepid Rubyists in total contributed to this release: http://contributors.rubyonrails.org/edge/contributors Please note that this is a beta, not an rc, so some things may be a bit wonky. Please file an issue on GitHub and I will do everything I can to help you help us iron out all the…

As a rails user, thanks for your contributions! All you guys and gals rock!

Re: Ruby on Rails 4.0.0.beta1 released

#26

What is the "Rails way" of doing AJAX calls and updating the DOM? I've been embedding Backbone views in the parts of my app that are the most interactive, but I feel like there's gotta be a better way.

It just so happens that one of my major contributions to this release was writing a 'working with JavaScript in Rails' guide: http://edgeguides.rubyonrails.org/working_with_javascript_in...

Others mentioned Turbolinks, but they forgot about remote_form_for and friends.

If you _are_ building a full JavaScript application, Ember.js works really well with Rails + ActiveModel::Serializers. There might be some rough patches until Ember hits 1.0 final, but most of the pieces are in place.

Re: Ruby on Rails 4.0.0.beta1 released

#28
post #19

Earlier quoted context omitted.

Rails 4 uses turbolinks. It is a mechanism that instead of loading a new page loads up the HTML via AJAX and replaces the entire content of the page without reloading all the resources(css, js, etc...) So instead of having to deal with plenty of small ajax calls you just build an app as it would work in plain HTML and just use turbolinks to leverage AJAX.

Funny that ASP.NET had the same thing, called Smart Navigation, back in 2003.

smart navigation is very different. Besides not being supported across browsers, it was more like automatic anchoring.

Re: Ruby on Rails 4.0.0.beta1 released

#29
post #24
post #5

Earlier quoted context omitted.

Ruby 2.0 still has the GIL so if you want to run a threaded web server you'll still need to be using rubinius or jruby.

Any reason ruby still has the GIL and not moved to a thread implementation?

Matz likes the fact that it Just Works and you can't accidentally have weirdness based on how your code runs. There aren't any plans to remove it at this time.

Re: Ruby on Rails 4.0.0.beta1 released

#30

Is there a Turbolinks equivalent for Django? Or something platform agnostic (I couldn't tell if that was the case with Turbolinks)?

Turbolinks is 100% Coffeescript; you could easily add it to a Django application by copying the assets out of the gem: https://github.com/rails/turbolinks/blob/master/lib/assets/j...
Post reply on HN