4 ms·
It was really refreshing to read this response. Somehow it turned into "I prefer framework X over Rails because...." and Rails is lame because [fill in the reas
by padseeker 11y ago
It was really refreshing to read this response. Somehow it turned into "I prefer framework X over Rails because...." and Rails is lame because [fill in the reason here]. I've never even heard of Phoenix before this thread.
I guess Rails is stodgy and old. Technology changes very frequently sometimes too frequently. Less than 2 years ago everyone was getting on the Angular bandwagon. Now the conversation I've been having with employers is "Yeah we've decided that React is going in a better direction so we're replacing it with React."
Think about all that wasted code and time learning how to use the new framework so you can get what out of it? A few more miliseconds performance? Better more visually pleasing syntax? Learning the new hot thing? Does anyone ever think about the Return on Investment (ROI) relationship between learning something new, how hard it will be to learn that new technology and then figure out what you are gaining from using this new thing? Once you spend all that time trying to scale the steep learning curve for Angular or Ember or whatever new tech comes down the pike do you ever wonder "what did we gain by learning this new technology? was it worth the trouble learning it? What benefit did it provide once you know how to use it?"
I guess Rails is getting long in the tooth, but for the most part it does what I need it to do. It's predictable, it's readable, it's organized, and best of all I'm just competent enough to use it. I've hit the wall trying to learn it and overcome most of the pitfalls and aggravations while using it. It's just blowing my mind how eager many programmers are always pursuing the next technology. I'm all for change but only if the change is worth the aggravation. I don't know if Rails 5 is a big improvement but really it's good enough for most of what I need it for.
- bphogan 11y agoI love Rails. And in 2014 I wanted to build a very specific type of realtime app with Rails. I used Faye-websocket and Redis and got everything working with Puma.... and it fell flat on its face. I learned enough Elixir and Phoenix to be dangerous and built the same thing there in about 2 days with much, much better performance. I've been working on it since. I don't see myself moving away from Rails for most things I write because it's just more mature and suits my style of coding. I disagree with the way the developers of Ecto (the database adapter for Phoenix) are approaching things, so if I have a web to database app, it's Rails all the way. (Their decisions aren't bad. I just don't like them and that's my problem, not theirs.) But if I have to do anything that deals with the realtime web, I can't think of anything better than Phoenix. I'll get over my issues with the DB layer and get stuff done because Phoenix channels are awesomel This is a long winded way of saying "you should really look into Phoenix." :)
- padseeker 11y agoI haven't even had the chance to learn Node and Meteor. The list of stuff I want to learn grows by the week. So many things to learn. Too many things! Phoenix will have to wait.
- nickjj 11y agoI have a Rails app running in production now where I used Faye for the websocket component. Faye is running in an isolated process (the nodejs version actually), and the Rails app POSTs to it through a Sidekiq worker. Interestingly enough, that's not too dissimilar to the ActionCable model despite using slightly different techs. Long story short, I had no issues with this set up and it's been running for around a year. I'm not at roflcopter scale, but it churns out about 100k events per month through Rails->Sidekiq->Faye without breaking a sweat.
- bphogan 11y agoThat sounds really complicated to me. Lots of moving parts to maintain. What is Sidekiq doing for you?
- nickjj 11y agoIt's simple to me because Rails doesn't know or care about the websocket server, it just understands that it needs to POST data to an end point with certain data. I can have 1 or 100 Rails instances posting to the single Faye server. The Faye server doesn't know or care about Rails. It just needs to do its job of broadcasting the event to subscribers. Sidekiq is there for me to easily monitor the events processed, and in theory the Rails app may not be in the same private network as the Faye server, so I decided to make the POST requests happen in Sidekiq. It seems like a good spot for that, since it's a "send it and move on with life". The Faye server pretty much runs itself, it's been going for months and months without maintenance. Sidekiq gets updated once in a while because I'm using it for other things too and sometimes the app code for it changes, not a big deal tho.