14 ms·
What's new in Rails 5?
- bshimmin 11y agoThis is a great summary, and there look to be some really interesting things coming in Rails 5. Two thoughts: 1) I hope ActionCable is as seamless to integrate and works as well as Rails features ought to; you can, of course, achieve web sockets right now using Faye or various other implementations, but it's quite complex to get right (though the faye-rails gem is pretty handy) - and realtime functionality is becoming more and more important. 2) I wish they'd just give up on Turbolinks. Maybe some people are using it and love it, but it's always the first thing I turn off when I start a new Rails project, and I know quite a few people who feel the same. For those of us who never thought it was a good idea in the first place, I'm not sure any number of improvements are going to change our minds.
- giuseppeciuni 11y agoI totally agree with your 2 point. I always turn off turbolink too when I start a new rails project!
- skrebbel 11y agoI didn't use rails since turbolinks appeared, but I really like the idea on paper. Why do you turn it off?
- jkxyz 11y agoBy default it's a global always-on feature. I think it's the sort of feature that might be great in certain parts of the application (like tabbed pages) but having globally enabled by default isn't ideal. For me the built-in browser feedback of loading a new page works pretty well, and having to rebuild this feedback in an application so that it works everywhere is simply unnecessary work.
- bshimmin 11y agoYeah, exactly. I think the very existence of this site also kind of sums up the problem: http://reed.github.io/turbolinks-compatibility/ http://reed.github.io/turbolinks-compatibility/
- technion 11y ago>2) I wish they'd just give up on Turbolinks Ditto for Coffeescript. I realise you can't just remove it, but the whole dev community is raving about ES6 - there's a whole of JS devs who could be a lot more interested in Rails.
- danmaz74 11y agoTurbolinks can create problems even to those who don't use them explicitly, but Coffeescript can't: if you don't like it, just don't use it, and it's as if it wasn't there. How would removing it from the asset compiler help you in any way?
- technion 11y agoThere's a cultural impact - it's hard to look at Rails without being pushed in that direction. Does it directly impact me now that I choose to ignore it? No. Does it impact a newcomer, particularly one that's into JS? Yes.
- KurtMueller 11y agoThis nifty web app is a good starting point: http://js2.coffee/ http://js2.coffee/ It's not perfect but it's how I learned coffeescript. Other than that, I don't think Rails necessarily pushes either for/against coffeescript. You can either use it or not. Plenty of rails apps have been written in plain 'ol js.
- KurtMueller 11y agoYou can choose to not use coffeescript in any Rails project. As for ES6, there is the sprockets-es6 gem. According to their github gem, their goal is to get in es6 support into sprockets 4. This, obviously, is not a perfect solution - but I think this is going in the right direction.
- rcaught 11y agoI used to disable Turbolinks as well, but I took the time recently to use Turbolinks 3 (off master) in a project and have been really impressed with what you can achieve. The server-side partial replacement, for example, is wonderful.
- headz 11y ago2) Why? Have you ever tried it? I use it on all my projects and it works great.
- happywolf 11y agoMinor clarification: what i meant below is I plan to build a portal with major feature being CMS, not planning to rewrite an CMS from scratch, instead I will source in Github for the module that can be ported/plugged in right away with some modification. ----- Right now, the web frameworks that are on my radar are: Laravel(PHP), Phoenix(Elixir), React+Meteor(JS), and RoR(Ruby). This list is by no means exhaustive, just that recently they caught my attention and I am contemplating to choose one for an upcoming CMS project. Would like to know if these frameworks each has its own segment or/and sweetspots, or they kind of compete against each other and the choice is mostly personal preference? The goal is to hear what people like/dislike on a particular framework. Inputs from those who have worked with multiple frameworks will be awesome. Thanks in advance.
- porker 11y ago> choose one for an upcoming CMS project. Thing is, none are CMS's. If that's what you need, why would you start with a framework? Sure it's fun to build and I always think I can do better than the existing CMS's do, but it's never a good use of my time - or good for the client. Please, if you need a CMS, use a CMS. If you need a Content Management Framework (CMF) one of the above could save time. If it's an application surrounded by managed content, your choices are different again. But please don't reinvent the wheel if you can avoid it.
- ryantownsend 11y agoI agree with the above. That said, even if you are doing something new, you don't need to reinvent the wheel – it may be worthwhile taking a look at https://www.contentful.com/ https://www.contentful.com/ (not affiliated, just an interesting service) and utilising their API to build an application which purely delivers the added value.
- pavlov 11y agoPrismic.io is another excellent "CMS as a service": https://prismic.io https://prismic.io I've used it on a project and was quite pleased. Using their API, separating content publishing from the presentation becomes much more robust than with a traditional integrated CMS that you customize using themes or whatever.
- ksec 11y agoI thought DHH recently announce on Twitter there will be Basecamp 3, which is based on Rails 5. And there will be Turobolink 5 too. I was guessing they have some more things to announce soon.
- rcaught 11y agoTurbolinks 3
- littlewing 11y agoI'm a long-time Rails developer and unfortunately this release doesn't excite me, though I appreciate all the hard work by the core team/continued support from 37signals. The reason is this: The intent of Rails is to make writing web applications easier, but that writing web applications actually got much more difficult for me as a Rails developer when Angular and Ember and then later React got popular. I love Ruby, but I respect the fact that the Javascript-client-side-heavy/"single-page" part of the app is where the magic is for at least a few years now- really several years. Other than Rails helpers in the 2006-2008 timeframe being a big deal, Rails' has not ever really helped out a whole lot on the JS side, and you wouldn't expect it to. The asset pipeline is wonderful, and coffeescript support with in it is ok I guess, even though I don't use it. But, writing JS client-side is not any easier. To be a full-stack developer in today's world I have to accept the fact that Ruby, as much as I love it and would rather develop in it all day and night, is just not taking over in every facet of development. There is no Rubyscript on the client side taking over the world. There is ES6/Typescript- that is the future. A substantial number of Ruby masters are jumping over to the Phoenix/Elixir bandwagon. I look at it, and want to like it, but I just haven't gotten into it yet. I know it is fast, but it just isn't as readable yet for me. And it won't solve the problem that the client still needs to be written primarily in Javascript. And the answer is not Node either, because every serious Javascript developer I've talked to says, "Node is still not ready." I just feel let down. I want to get excited about Rails again, but give me a path. I don't really like Ember a whole lot, because the community is just not where it is with Angular and React. Someone please take your favorite frameworks and show me how my life is supposed to get better by using them. Show me how it is fun. Bring back the magic, because right now it all just seems like more and more of a PITA as attention deficit has fully set in within the web application development community and there is no clear way ahead for the next few years.
- kailuowang 11y agoI think you can try solve the "rails no longer excites me" problem by finding a more exciting language than Ruby. There are more than plenty of them out there.
- 11y ago
- LunaSea 11y agoIs it more security vulnerabilities ?
- issaria 11y ago> Without a doubt, it is time to prepare our applications for the upgrade; just because of the performance improvements are worth it. If you are on Rails 4.x, the upgrade is almost painless. Shouldn't it be called Rails 4.3? That been said, you could get the performance improvement by just upgrading to ruby 2.2.2
- issaria 11y ago> Without a doubt, it is time to prepare our applications for the upgrade; just because of the performance improvements are worth it. If you are on Rails 4.x, the upgrade is almost painless. Shouldn't it be Rails 4.3? That been said, you could get the performance improvement by just upgrading to ruby 2.2.2
- ownedthx 11y agoI'm not sure if this is baked into Rails 5, but you can get es6 support (via Babel) with the sprockets-es6 gem: https://github.com/TannerRogalsky/sprockets-es6 https://github.com/TannerRogalsky/sprockets-es6 Rails is still a second-class JS citizen due to the asset pipeline being opinionated and controlling compared to the node way of doing things, but it gets you closer to 'the new hotness'.
- atwrkrmrm 11y agoWhat do you mean JS is still a second class citizen? I'm unfamiliar with Rails asset pipeline. Do you just mean that the asset pipeline doesn't really have as much features as other build tools like Grunt and Gulp? Or is there something about asset pipeline that prevents you from using JavaScript to its full potential? (Genuinely curious. Not familiar with the JS side of Rails)