I'm not a rubyist but I'm really excited for the russian-doll caching and really hope it catches on in other frameworks. Data dependency tracking makes everything from straight-up caching to real-time updates effortless and I think is one of the few places where an ORM can be really helpful (queue the two hard problems quote about cache-invalidation and naming things). Quora has been doing this since the beginning an…
Ruby on Rails 4.0.0.beta1 released
41–50 of 91 posts
Re: Ruby on Rails 4.0.0.beta1 released
#42What's the recommended alternative to ActiveRecord Observers? I know they aren't perfect, but I wasn't a fan of cluttering my models with lots of after_commit - is there a better way?
Re: Ruby on Rails 4.0.0.beta1 released
#43Earlier quoted context omitted.
Proud to be on the contributor list for this one - any of you considering contributing, it's not hard at all, the team makes it really easy.
Any pointers for getting started?
Once you have that installed, you basically don't have to worry about dependencies that you need to bootstrap the Rails test suite.
Re: Ruby on Rails 4.0.0.beta1 released
#44Hello 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…
Proud to be on the contributor list for this one - any of you considering contributing, it's not hard at all, the team makes it really easy.
I suppose it's a lot less of an issue now anyways, but in 3.2, using fetch with memcache with raw objects is super gross since you get totally incompatible responses depending on whether an item existed in cache or not.
Re: Ruby on Rails 4.0.0.beta1 released
#45Earlier quoted context omitted.
Proud to be on the contributor list for this one - any of you considering contributing, it's not hard at all, the team makes it really easy.
Any pointers for getting started?
Re: Ruby on Rails 4.0.0.beta1 released
#46Earlier quoted context omitted.
Turbo links is more suited to traditional web pages. Backbone for single page mini-apps.
For traditional web pages does it ever make sense to use Backbone/Ember/etc? I've used Backbone on one project and I kind of like the MVC aspect for some things but the thing I'm working on right now is more of a traditional web app. There are some interactive forms where it kind of makes sense to have a model and a view that reacts to changes in the model, but in the end the form is POSTing to a standard rails contr…
Backbone is a pretty slender library, you can pretty much use it however makes sense to you. You could go really hardcore and do a site that's client-side-everything, or you could do hybrid approach like we did.
Re: Ruby on Rails 4.0.0.beta1 released
#47Earlier quoted context omitted.
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
#48What's the recommended alternative to ActiveRecord Observers? I know they aren't perfect, but I wasn't a fan of cluttering my models with lots of after_commit - is there a better way?
With external observers, it's not always obvious whether they are enabled or not. Service objects make this more explicit and are easier to test as well.
Re: Ruby on Rails 4.0.0.beta1 released
#49Earlier quoted context omitted.
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
#50Earlier 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.
Sure it can be very efficient, but it's a terrible default.
When DHH state: > except, maybe, compatibility issues with some existing JavaScript packages
Some ? Don't you mean most ? Even Twitter Bootstrap will leak memory if used in a turbolink app.
When coffeescript is pushed as default, I'm ok, at worst you don't use it and you have a useless gem. But turbolink is harmful if you don't know what you are doing.