15 ms·
Rails 5.0: Action Cable, API mode, and more
- fn 10y agoFinally! Congrats to all the contributors!
- jesalg 10y agoThis has been long awaited: Post.where('id = 1').or(Post.where('id = 2'))
- ch4s3 10y agoSeriously, .or() always felt like a glaring omission.
- gleenn 10y agoIt's not an omission per se, it's actually a challenging thing to implement. I'm sure they'd have done it sooner if it wasn't so hard to get right. Think of how the precedence rules would work: especially since the queries are composable, tacking on another .or() can do funny things semantically.
- ch4s3 10y agoI think I chose my words poorly. I'm sure it was a huge undertaking, but the lack .or() is very noticeable in AR if you're coming from other ORMs or straight SQL.
- pmontra 10y agoI wrote it in SQL when I needed it, after all I knew SQL before AR came around. An OR is very rare and probably that's why it landed only in version 5. Another implementation is Post.where(id: [1, 2]) which is SELECT * FROM posts WHERE id IN (1, 2). I guess a db would compile it into exactly the same code (dbs use different terms but that's what it is) but the performances could be different inside AR/Arel.
- chippy 10y agoPost.find([1,2]) Works in Rails 4
- dogweather 10y agoI'm pretty sure that DHH strongly opposed .or(), but I'm not sure why. I'd really like to know if this is true, and if so, what the reasoning was.
- cortesoft 10y agoI like the sequel gem's syntax even better: Post.where(:id => 1).or(:id => 2)
- stouset 10y agoSequel's syntax is strictly less powerful, since Rails' accepts any scope instead of just a hash of conditions. Post.where(id: 1).or Post.joins(:author).where(author: { name: 'John' })
- cyberferret 10y agoCorrect me if I am wrong, but can't the Sequel ORM accomplish this as well? Post.join(:author).where(:author__name => "John") (the above is purely from memory and may have syntax errors). In any case, it lets you drop into raw SQL as a last resort.
- cortesoft 10y agoYes, you are correct.
- jeremyevans 10y agoThat doesn't appear to work: Post.where(id: 1).or Post.joins(:author).where(author: { name: 'John' }) ArgumentError: Relation passed to #or must be structurally compatible. Incompatible values: [:joins, :references] It appears that only the filter clauses are allowed to be different (similar errors if :select, :order, :group, :limit are different), in which case it's no more powerful than Sequel, just more of a pain to use. You can easily implement ActiveRecord's behavior in Sequel if you want to combine filter clauses for arbitrary datasets: ds = Post.where(id: 2) Post.where(id: 1).or(ds.opts[:where]) It's also interesting what happens if you mix where and having clauses (I'm not saying it doesn't make sense, but it may bite someone): Post.where(id: 1).or(Post.having(id: 2)).to_sql # SELECT "posts".* FROM "posts"
- rabidferret 10y agoI talk about this at length in one of my recent talks but the short version is we wanted to optimize for reuse via named scopes
- bphogan 10y agoYea. I wanted this since Rails 3.
- loramel 10y agoCan not agreed more.
- bratsche 10y agoThis is pretty cool. I've kind of moved on to Elixir and Phoenix for my web stuff these days, but it's still nice to see Rails going strong.
- ghayes 10y agoBeen using Elixir / Phoenix as well, and it's been a breath of fresh air. That said, I'm glad that rails has been looking at projects like Phoenix for inspiration as it continues to grow and adapt.
- mmanfrin 10y agoI'm glad that rails has been looking at projects like Phoenix for inspiration Other way around. Phoenix was explicitly inspired by Rails and founded by Rails core members. Elixir was first created by a Rails core member. Phoenix is the performance-really-matters successor to Rails.
- jsmith0295 10y agoSome of the features of TurboLinks 5 are inspired by things Phoenix did with it's channels, I think
- mathgeek 10y agoYou're talking about the original inspiration for Phoenix, while the previous poster is talking about some of the new features in Rails 5. They've both influenced each other.
- akio 10y agoIIRC Action Cable was inspired by Phoenix's Channels.
- lasermike026 10y agoToo many languages. Too many interpreters.
- themgt 10y agoLooks like a solid and and relatively straightforward upgrade from Rails 4.2. It's hard not to feel Rails has become a bit of a slow-moving behemoth though, with this release four years after 4.0. I've still got a couple clients using 3.2 from 2012 and things aren't that different. Smart money at this point seems like a significant portion of the Rails community could begin moving to Elixir/Phoenix over the coming years. The advantages from a language/VM level just look impossible for Ruby to overcome, along with a blub effect kicking in.
- ch4s3 10y agoUnless they're able to pull off 3x3 in the next year, I expect Ruby/Rails will start to lose a lot of mind-share. *edit: For clarification, I use Ruby every day and I think its awesome! However, I don't want to see it lose popularity the way Pearl did. I'm concerned that if the language doesn't continue to innovate and improve, that I will lose ground. Lots of new languages have similarly great ergonomics, but get concurrency right, or are faster. I don't think improved concurrency is really on the table for Ruby 3, so I think 3x3 is going to be critical to the long term future of the language. But, that's just my prediction and its likely wrong.
- dmix 10y ago3x3?
- ch4s3 10y agoRuby 3x3 is a plan to make Ruby 3 times faster than Ruby 2.x. Here's some further reading: http://engineering.appfolio.com/appfolio-engineering/2015/11/18/ruby-3x3 http://engineering.appfolio.com/appfolio-engineering/2015/11... https://blog.heroku.com/where_will_ruby_go_now_talking_with_tenderlove_at_railsconf https://blog.heroku.com/where_will_ruby_go_now_talking_with_... https://www.reddit.com/r/ruby/comments/3tje5a/ruby_3x3_ruby_3_will_be_3_times_faster/ https://www.reddit.com/r/ruby/comments/3tje5a/ruby_3x3_ruby_...
- ascendantlogic 10y agoNot sure why you're being downvoted for having an opinion. I think Ruby and Rails became the Java of the late 2000's. There's going to be lots of jobs and work for it for many decades to come. But I feel that slowly newer technologies are supplanting it. Such is the way of all technology, though.
- Fuffidish 10y agoNice! The Turbolinks 5 presentation was really impressive
- paws 10y agoCongrats to the contributors and thanks for the hard work pushing this out! Looking forward to Heroku working out of the box[1] and quiet assets moved to core[2] [1] https://blog.heroku.com/container_ready_rails_5 https://blog.heroku.com/container_ready_rails_5 [2] https://github.com/rails/sprockets-rails/pull/355 https://github.com/rails/sprockets-rails/pull/355
- desireco42 10y agoA long awaited release is finally here, Yoohoo! Now, let the job of upgrading begins. Also, I love how everyone found a feature they've been waiting for and celebrating it. Rails, always bring joy (pain comes in few years ;) )
- justinzollars 10y agoI wish I had API mode 4 years ago
- steveklabnik 10y agoYou could have! It was reverted, so we made https://github.com/rails-api https://github.com/rails-api in the meantime, and this was finally (literally four years later) pulled upstream now.
- justinzollars 10y agohaha Thats funny. I was always hacking my way around this problem and landed on Padrino and Flask.
- deleted 10y ago[deleted]
- bcardarella 10y agoWe've moved all of our backend offerings from Rails to Elixir/Phoenix. Despite some questioning the value of anything below 100ms response times there is a lot of data backing up the idea that Elixir/Phoenix can lead to a more maintainable and more economical solution. I spoke about this recently at RailsConf: https://www.youtube.com/watch?v=OxhTQdcieQE https://www.youtube.com/watch?v=OxhTQdcieQE Don't get me wrong, I think Rails is an amazing technology but it doesn't fit the use cases and demands our clients have today.
- davidw 10y ago> more maintainable I get that the Erlang VM is really nice for some things (I made my first contribution to it in 2004!), but I'm curious about the above statement, as I haven't had the time to dig into Elixir/Phoenix yet.
- dmix 10y agoI find working with functional languages and type systems (w/ dialyzer in this case) makes my projects more maintainable in general. Might just be a personal bias towards them though. Note: I haven't used Phoenix but I'm a fan of Erlang.
- rozap 10y agoI think most folks are finding that distribution in an erlang based application is a lot simpler, because you don't need to pull in things like redis for pubsub, memcached for caching, etc etc. erlang solves a bunch of problems in a rather elegant way that are solved in the java/python/ruby world through gobs of duct tape.
- mhartl 10y agoLooks like now's a good time to mention that the Ruby on Rails Tutorial book has already been updated for Rails 5: http://railstutorial.org/book http://railstutorial.org/book Sales actually just launched on Tuesday (announcement here: https://news.learnenough.com/rails-5-edition-of-rails-tutorial https://news.learnenough.com/rails-5-edition-of-rails-tutori...), and you can pick up your copy of the new 4th edition here: http://railstutorial.org/code/launch http://railstutorial.org/code/launch That link includes a 20% launch discount, which expires tonight at midnight PDT. As with previous versions, the new edition focuses on the core principles of web development, so there isn't much Rails 5–specific material in the update, but I am planning standalone Learn Enough tutorials on things like Action Cable and Rails API (http://learnenough.com/ http://learnenough.com/).
- ch4s3 10y agoThat's awesome! Michael Hartl is such a great member of the community.
- ben_jones 10y agoA lot of name dropping on hacker news goes over me head because I've only been in the community a few years. I feel like Michael Hartl will be the name I drop 15 years from now whenever I'm discussing Rails and the origin of "modern" web development.
- ch4s3 10y agoI agree. Have you heard his interview[1] on Software Engineering Daily? He's a really interesting guy. [1]http://softwareengineeringdaily.com/2016/01/11/learning-rails-with-michael-hartl/ http://softwareengineeringdaily.com/2016/01/11/learning-rail...
- dopamean 10y agoI know you've receive a gazillion of comments like this in the past but I'm going to do it anyway: THANK YOU. Your work on that book is what got me my first web dev job. I've grown a ton since and have you to thank for it. Thank you so much.
- connorshea 10y agoI've been following along with Rails 5 for many months now and I've been tracking progress on updating GitLab in our issue tracker[1]. Feel free to look at the relevant merge requests and use them as guides to upgrade your own apps :) We're still on 4.2.6 since we have a few gems we're waiting on, but I hope to change that in a month or two! Favorite features are probably the various performance improvements and underlying improvements to the framework, as well as quiet_assets being moved into sprockets-rails. I also wanted to give a shoutout to BigBinary's Rails 5 series, since it's been great for finding out about new features[2]. [1]: https://gitlab.com/gitlab-org/gitlab-ce/issues/14286#note_4272270 https://gitlab.com/gitlab-org/gitlab-ce/issues/14286#note_42... [2]: http://blog.bigbinary.com/categories/Rails-5/ http://blog.bigbinary.com/categories/Rails-5/
- jbackus 10y agoI feel bad for Sean Griffin. He spent over a year overhauling the internals of ActiveRecord to add this attributes API. His work dramatically improves coercion and type enforcement for ActiveRecord users. Seems weird for this to only get a non-descriptive bullet point in "other highlights." Here are the docs if anyone is interested: http://edgeapi.rubyonrails.org/classes/ActiveRecord/Attributes/ClassMethods.html#method-i-attribute http://edgeapi.rubyonrails.org/classes/ActiveRecord/Attribut...
- steveklabnik 10y agoSean has been doing fantastic, underappreciated work for a long time. Agree here.
- dopamean 10y agoI'd love to read more about it. Do you know if he has written anything about this work?
- jbackus 10y agoI don't know if he has written about it beyond the docs and various commits. He has talked about it many times on his podcast (which I highly recommend). Here is an episode that talks about the attributes API as well as his Relation#or work: http://bikeshed.fm/8 http://bikeshed.fm/8 Definitely also checkout the episodes where he talks about Diesel.
- rabidferret 10y agoMost in depth I went was probably in http://m.youtube.com/watch?v=PUuYAksQWg4 http://m.youtube.com/watch?v=PUuYAksQWg4 but I discuss it in pretty much every talk I give. You can also just ping me on Twitter and I can talk about it more. :)
- jwolgamott 10y agoSean gave a (great) talk at RailsConf covering the attribute work as well as other Rails5 features "that you haven't heard of". http://confreaks.tv/videos/railsconf2016-rails-5-features-you-haven-t-heard-about http://confreaks.tv/videos/railsconf2016-rails-5-features-yo...
- hartator 10y agoThe big things seems to be websockets with Rails cable. I've just skim through the documentation but seems solid. Anyone has a strong opinion on this?
- iamleppert 10y agoAll my new development these days centers around node + browserify/webpack with a react frontend, or just plain javascript for small projects. WebSockets would have been a cool addition four years ago. There is little compelling case for new development. Sorry to be so harsh.
- pekk 10y agoThat's fine, and I don't use Rails either - but this post was about Rails. People who use or want to use Rails are likely to benefit from the new features. Even if that number has declined somewhat, it's still a lot of people, that still merits development, it's still a topic of interest to others on HN, and it's easy to avoid if you find that you aren't personally interested. Besides which, I can't see that a switch from Rails to Node is going to have any strong advantage if you are equally proficient in each. If they're really about the same, this would boil down to "I like JS more than Ruby," which is not about the technology so much as personal feelings.
- vassy 10y agoBy looking at the comments you'd assume a new version of Phoenix got released.
- igravious 10y agoAgreed. It's getting pretty annoying. Every Rails post that hits the front page now feels like it's getting hijacked/side-tracked by Elixir/Phoenix evangelists.
- ascendantlogic 10y agoWell a few years back it was hijacked by the Node evangelists. People always have to advocate for their newest toy(s).
- antod 10y agoI can remember way back when it was the vocal Rails evangelists doing the hijacking :)
- enraged_camel 10y agoI agree. It's very, very annoying.
- drchiu 10y agoI personally really love using Rails. It's been very productive for me over the past several years I've been able to make a living off of this. I see a lot of comments here about Elixir/Phoenix. Is the performance gain really that big? I currently serve 2-3 mil requests on Rails per day on around $200 worth of servers with at least one database call per request. In defense of Rails, there are so many libraries out there already built I can get an app up and running fairly quickly. I really think it's a matter whether the tool fits the bill.
- sergiotapia 10y agoIt's around 12 times faster in the general sense. Your mileage may vary. If you spend $200 you could theoretically hosting the same product on $50 worth of hardware.
- rebelidealist 10y agoThat saving of $150 is equivalent to one hour of pro dev work time. It's hardly worth converting unless Elxir / Phoenix is much more productive and maintainable.
- rdtsc 10y ago> That saving of $150 is equivalent to one hour of pro dev work time. Fair point, unless you have more customers. Then it can start to add up quickly. And by customers it means requests as well. Being able to handle large traffic spikes and continous connections is a game change from what I found. Moreover. A huge benefit is using the BEAM VM, I use Erlang (but same VM) and I have seen major advantages being able to trace, debug, hotpatch a running system. Some parts of the cluster would be crashing and restarting for a while, and there would be no need to wake everyone up. It can be fixed in the morning kinda deal. An interesting observation to think about -- importance of fault tollerance grows as quickly or quicker than concurrency. What I mean is if you have a service that handles more concurrent requests, it now becomes are lot more important to have solid fault tollerance, because a single failed request, maybe causing a segfault, can kill all of them for example. That is a bit hard to understand unless you see it practice. You can think of it this way -- it doesn't matter if the system can handle 100K requests / second. If it is not fault tollerant, when it crashes it handles 0 requests / second. Depending how crappy the uptime is, you can average those number and get something that's pretty low.
- cutler 10y agoConcurrency aside, why is Elixir preferred over Ruby when it doesn't even have a native array implementation? No, lists and tuples are no substitute nor are maps with numeric keys as Jose has suggested. If you want an array in Elixir your only option is Erlang's implementation which ain't pretty - http://erlang.org/doc/man/array.html http://erlang.org/doc/man/array.html. When I raised this issue in the mailing list and on IRC the response was invariably a definsive "I've never needed arrays", "We use tuples for most things in Elixir" or "Array performance characteristics are difficult to optimise in a functional language such as Elixir". I just find this disappointing.
- cutler 10y agoSorry if seems a bit off-topic but I raised this issue because there have been a lot of posts about Rails devs switching to Elixir/Phoenix.
- jswny 10y agoI've just started learning Elixir out of interest so I can't quite answer your question. However, I'd like to ask: what have you found to be difficult to do using the Elixir types such as tuples, list, keyword lists, and maps that would otherwise be easy to do using arrays? I'm asking out of genuine curiosity because I've specifically noticed a lack of arrays when learning Elixir and I'm quite used to using them in other languages.
- cutler 10y agoElixir has no native array syntax nor any array functions in the stlib so arrays are basically second class citizens rather than completely absent. Ask not why I need them but why anyone might need them if the Elixir is supposed to be a general purpose language. Why does Clojure need them or Ruby or Python (lists)? If I want to process data as a large indexed array Elixir isn't going to help me and some Elixir devs have conceded that it may not be suitable for large scale data processing. We all know Elixir/Erlang excels at distributed concurrency but the question here is whether it is deficient in other areas, making it too much of a niche language.
- albasha 10y agoI am very jealous as a Django developer. They decided to keep Channels as a third-party package after all, maintained by a single guy :(
- tedmiston 10y agoKind of. 48 contributors total (Yes, Andrew is doing most) - https://github.com/andrewgodwin/channels/graphs/contributors https://github.com/andrewgodwin/channels/graphs/contributors It sounds like it wasn't decided to keep 3rd party as much as decided not to not combine yet: > The feedback I got during the proposal process for putting Channels into Django 1.10 (it did not get in before the deadline, but will still be developed as an external app with 1.10) was valuable; some of the more recent changes and work, such as backpressure and the local-and-remote Redis backend, are based on feedback from that process, and I imagine more tweaks will emerge as more things get deployed on Channels. https://www.aeracode.org/2016/6/16/philosophy-channels/ https://www.aeracode.org/2016/6/16/philosophy-channels/ You can still use Channels today in 1.8–1.10. https://blog.heroku.com/in_deep_with_django_channels_the_future_of_real_time_apps_in_django https://blog.heroku.com/in_deep_with_django_channels_the_fut... This project is very much in the spotlight, was heavily discussed at PyCon, etc. I don't think it's going anywhere.
- gtaylor 10y agoIt seems to be taking more of a South approach, and I really like this. Shake out conceptual issues, find an API that works well, iterate a bunch. Django release cadence is pretty slow, so having it simmer outside of it makes a ton of sense. If it's a big hit like South was, it'll get rolled in and we won't have to immediately start deprecating things due to an un-tried design.
- dustinfarris 10y agoChannels will eventually be part of Django core; it just didn't make the 1.10 release. https://groups.google.com/forum/#!topic/django-developers/QRd4v7OErT8 https://groups.google.com/forum/#!topic/django-developers/QR...
- kibibu 10y ago(Cynical mode engaged) Here's why you shouldn't be jealous: https://www.cvedetails.com/product/22568/Rubyonrails-Ruby-On-Rails.html?vendor_id=12043 https://www.cvedetails.com/product/22568/Rubyonrails-Ruby-On... There are still remote code execution and even SQL injection flaws being discovered in Rails. The dreadful security record of Rails really seems like the elephant in the room. Compare to Django https://www.cvedetails.com/product/18211/Djangoproject-Django.html?vendor_id=10199 https://www.cvedetails.com/product/18211/Djangoproject-Djang...
- fantasticsid 10y agoI actually don't like rails' convention over configuration school of thoughts. It makes everything implicit. For any large rails app it's difficult to reason about how things are working, unless you learn all the conventions by heart (by the way, these conventions don't seem to be documented well)
- pmontra 10y agoIf you are a Rails developer you know all the conventions and they help you at finding code with only an editor and a file manager. No need of IDEs. It's very easy to learn a new application, unless the original developer wanted to be clever, which usually means that was one of his/her first Rails projects. However there are other school of thoughts and not everybody likes the Rails way. It's fair and it's a big world with space for every opinion and tool.
- fantasticsid 10y agoI never learned 'all conventions'. There are countless cases where I had to dig into source code to find out how a certain feature is working/how it works with another feature/when the abstraction does not work the way I want I guess being implicit just makes it harder to find out which part of abstraction is leaking when it happens.. But again I'm not a good rails programmer. I was just never a fan of how conventions play such a big part, and was not well documented.
- katabasis 10y agoI know that lots of other languages / frameworks compete these days for the title of "most-cutting-edge", but I love working with Rails. There's a lot to be said for the "stability without stagnation" approach. I come from a design background, did not study computer science, and am usually working as a team of one. Rails lets me leverage very finite amounts of time and theoretical knowledge into working software that is elegant, testable, and comprehensible. It is an amazing piece of technology, and I'm happy to see it's still going strong!
- juandazapata 10y agoThanks to the community for all the hard work on this release.
- jblake 10y agoAnyone else's bundle update spazzing out on resolving dependencies? Guess I'll have to wait until other third party gems get the Rails 5 memo.
- jblake 10y agoOdd they didn't mention performance improvements in the blog post. From my understanding, there have been some massive gains (of which, some commits date back to early '15!) One of them which has been killing me, is that model schemas were not preloaded on app boot, which led to the first few dozen requests (depending on how many workers you have on Puma) perform 100+ sql queries and add over 1s to response times. Not only were they not preloaded, but they were not cached across ActiveRecord::Base.connection's Good work rails team!
- neya 10y agoI see a lot of pro-Erlang/Phoenix pushing in here, which is (as a polite reminder) an announcement about the rails framework. Not to say that one shouldn't, just that I think it's deviating from the main topic in hand. Interestingly, I wanted to find out what's the real reason behind these pushes towards Erlang/Phoenix and I realised the discussion is mostly around how you can save a few bucks worth $20-50 by opting for a faster programming language. Any framework can be tuned to do anything. Rails right now is the only truly comprehensive framework with tight integrations to Coffee, LESS, CSS, etc. As someone who is writing his own framework in Scala, I learned this the hard way after under-estimating how much of work is already done for you in Rails. If you run a business, then all this small talk shouldn't matter as much as how profitable you are. In the end, if your business failed because of your choice of framework (which usually reflects your philosophy), then you need to fix your business model and not the framework. As a polite reminder, I'd like to link to an old comment of mine I made at the time of Rails 4.2: https://news.ycombinator.com/item?id=8201244 https://news.ycombinator.com/item?id=8201244 Have a great weekend everyone!
- anonyfox 10y ago> I see a lot of pro-Erlang/Phoenix pushing in here, which is (as a polite reminder) an announcement about the rails framework. Not to say that one shouldn't, just that I think it's deviating from the main topic in hand. You're right basically, but the migration wave from rails to phoenix has noticeably started, and it shows. > Interestingly, I wanted to find out what's the real reason behind these pushes towards Erlang/Phoenix and I realised the discussion is mostly around how you can save a few bucks worth $20-50 by opting for a faster programming language. Actually, the high performance stuff and Rails-y organization of phoenix is just something to give you immediate benefits and a sense of familiarity. It attracts people and give them a reason to try it out. Beginners praise it, but it's by far not the actual reason to keep pushing phoenix. Just like "hey, it works like rails, you can do everything with it like rails does, so there is just a small learning curve and we have orders of magnitude better performance!" > Any framework can be tuned to do anything. Yes this is true. You can also write OOP assembly or use vim as a bitmap editor like paint. The point is: while you can theoretically do everything with mostly everything, the results will differ a lot and the way to these results will vary a lot. With phoenix, there is no "magic" (people complain about this in rails!), everything is simple, explicit and straightforward. You also do not need many third-party tools like redis, sidekiq or memcached. This greatly simplifies the application code, reducing brittle constructs/bindings. Currently, Rails still has the edge when it comes to gems, many things are readily available. This helps when "getting started" for typical app scenarios. But a few weeks in, maintenance is the most important factor when it comes to development speed. Here Phoenix wins by a large margin. Less dependencies, easier code, less performance tuning, less bugs (compiler/dialyzer/... arguably). > Rails right now is the only truly comprehensive framework with tight integrations to Coffee, LESS, CSS, etc. The asset pipeline of rails can be quite a pain in the ass. Phoenix went a different way by integrating brunch, the probably easiest of the node.js task runners, which mostly doesn't even need custom configurations. (npm install --save brunch-less, your less files are integrated as you'd expect. Same for coffeescript, ...). > If you run a business, then all this small talk shouldn't matter as much as how profitable you are. In the end, if your business failed because of your choice of framework (which usually reflects your philosophy), then you need to fix your business model and not the framework. The development speed does matter. when you waste time optimizing things, fixing bugs with dependencies or stuff like that, you aren't shipping features. Moving fast is crucial for startups. And then there is scaling. Phoenix is known to handle large loads with ease, and probably most startups can go a long way before they even have to consider horizontal scaling. Not having to think about this is worth more than the money you'd throw at servers to scale up rails (which, as you said, isn't needed in that quantity in phoenix either). And just a personal note on top of this: Once functional programming/elixir "clicks" for you, translating business requirements into working code is so much easier as functional data transformation with pipes than having to deal with forests of class structures. For many cases, it just makes more sense (and is easier to read, maintain, extend and test). --- Finally, the actual big win of phoenix is BEAM/OTP. Performance aside, the thought model of OTP just makes so much sense and simplifies building reliable, distributing systems a lot. I'd argue that OTP is the true reason people are blown away, elixir simplifies the syntax/reduces boilerplate, and phoenix on top makes getting started a breeze, looks like rails on the surface, and once you get into how OTP works, you're hooked.
- FooBarWidget 10y agoPassenger author here. Phusion is excited about the Rails 5.0 release! Rails is one of the most productive web frameworks out there, and 5.0 just makes it even better. We have release various Passenger updates to ensure that Passenger plays well with Rails 5, Action Cable etc: https://blog.phusion.nl/2016/02/18/passenger-5-0-25/ https://blog.phusion.nl/2016/02/18/passenger-5-0-25/ https://www.phusionpassenger.com/library/config/nginx/action_cable_integration/ https://www.phusionpassenger.com/library/config/nginx/action... However we found a bug in Action Cable yesterday which may cause issues with app servers such as Passenger and Puma. Unfortunately the fix didn't make it into 1.0. I recommend anybody who uses Action Cable to apply our patch locally for now: https://github.com/rails/rails/pull/25615 https://github.com/rails/rails/pull/25615
- mfo 10y agoTo my mind the big news is Turbolink, A simple tech to build SPA with the following roots : - the robustness & ecosystem of the rails server side (great testing stack & battle tested backend) - the lightweight approach of rails/javascript, which is opting out of jquery : meaning that SPAs won't have to include jQuery and the whole JS world (client side speed will be greatly enhanced) - the overall simplicity (no huge javascript stack pilling angular, react, redux, flux, webpack etc...). That's rad.
- elsurudo 10y agoIs anyone aware of a site that the memory footprints of default Rails apps? I know that this may not be the greatest indication of the memory footprint in an actual running app, but I feel it'd still be interesting data. It'd have the be segmented by ruby version, of course.
- robgering 10y agoNot memory footprints per se, but RubyBench tracks iterations per second and object allocation across a wide selection of common Ruby/Rails programs. https://rubybench.org/ https://rubybench.org/
- nanoojaboo 10y agodon't like the use of the same cartoon style on the Rails site that Basecamp uses for it site.
- nathan_long 10y agoI'm happy to see the new way to render views outside the request cycle: http://blog.bigbinary.com/2016/01/08/rendering-views-outside-of-controllers-in-rails-5.html http://blog.bigbinary.com/2016/01/08/rendering-views-outside... This will be great for, eg, creating reports or receipts in background jobs.
- bigtunacan 10y agoThis was possible in Rails 4 using the Render Anywhere gem.
- xjlin0 10y agoI love Action Cable!