15 ms·
> if the modern equivalent of Rails already exists, please let me know! You're in luck. Rails 5.2.3 was released 20 hours ago. More seriously, I feel rails is
by BillFranklin 8y ago
> if the modern equivalent of Rails already exists, please let me know!
You're in luck. Rails 5.2.3 was released 20 hours ago.
More seriously, I feel rails is still excellent and I'm happy to work with it every day. I'd be interested to hear more about what makes rails not modern? I find it a very productive framework.
EDIT: If you're talking about missing a JS equivalent of rails, do you know about Loopback? https://loopback.io/ https://loopback.io/
- 0xADEADBEE 8y agoI know this is the opposite of what you asked but I find Rails to be keeping pace with modernity much better than its conemporaries! Django seem to have given up on integrating websockets (ActionCable has been in Rails for literally years now), nor is there trivial integration for JS assets/asset pipeline functionality. I don't write much of either anymore, but I'd still reach for Rails the instant I need to get something done quickly.
- debuggerpk 8y agofor websockets, django has django-channels https://channels.readthedocs.io/en/latest/ https://channels.readthedocs.io/en/latest/ . But I do agree, django has been a little late to this party.
- 0xADEADBEE 8y agoWhat happened to bringing this into core? Last I was using Django that was the next big integration and it just sort of faded away.
- uranusjr 8y agoAndrew Godwin (the main hand behind the push) burnt out and halted all development until he can find someone someone is willing to help.
- collinmanderson 8y agoThere's a team of 3 now maintaining django-channels, including Carlton who is paid by donations to Django Software Foundation: https://groups.google.com/d/msg/django-developers/mLlWYEC8_G8/cDQwGu6FGAAJ https://groups.google.com/d/msg/django-developers/mLlWYEC8_G...
- Spiritus 8y agohttps://www.djangoproject.com/weblog/2016/sep/09/channels-adopted-official-django-project/ https://www.djangoproject.com/weblog/2016/sep/09/channels-ad...
- dbrgn 8y agoDjango has multiple good asset handling libraries. I like https://django-pipeline.readthedocs.io/ https://django-pipeline.readthedocs.io/. And with django-channels (https://channels.readthedocs.io/ https://channels.readthedocs.io/) Django goes way beyond just WebSockets. You can now do fully asynchronous data processing pipelines. I'm still happy working with Django (which is not something I can say about the JS ecosystem). Especially when doing APIs with Django REST Framework.
- mbell 8y agoIn Rail 6 webpack (with a framework integration via the webpacker gem) is the default system for handling JS, CSS still goes through the asset pipeline though. I wouldn't be surprised if Rails 7 drops sprockets entirely.
- 0xADEADBEE 8y agoI saw this! It makes sense with the proliferation of front end view layers so I'm pleased that there's less work for me to do to integrate things like Vue and React. I was very late to the party with Rails but I do think it gets a lot of things right.
- ksec 8y agoAnd I have been wondering why it doesn't push the CSS to Webpack as well. There is no way in the foreseeable future that Rails could do without JS and hence Webpack is mandatory. We might as well push it as default or easily enabled / disabled via options.
- mbell 8y agoIt's clunky to build CSS 'packs' and it's unclear how to wire in asset helpers e.g. checksum'd file names for images. It's not insurmountable, but there is no obvious best path forward.
- 0xADEADBEE 8y agoFully agree with you - been in the JS world a lot lately and it's not as polished as the more 'traditional' web frameworks. Channels was supposed to make core but never did - what happened there? That's what I was driving at really - if I were stewarding a modern web framework, I would be integrating websocket support. It never sat right with me that something as common as APIs is farmed out to a library in Django (this comes out of the box in Rails with no configuration) either. I don't dislike Django, but I certainly find that there's a lot more messing around to get done things that I would consider pretty standard. I used the new Rails beta last week and I noticed that Webpack integration is now there - how long until we see something like that with Django?
- jrochkind1 8y agoI'm interested in hearing about applications successfully using ActionCable for what and how. It's unclear to me how much use it's getting, or how well it meets actual use cases.
- rohan404 8y agoActionCable is super easy to use out of the box to get WebSockets running, but it's incredibly non-performant. Anything more than 100 concurrent users took the time taken to a send a message to the socket from milliseconds to seconds. Replacing it with the AnyCable gem in conjunction with AnyCable-Go got us to over 1000 concurrent users without a hitch.
- sickcodebruh 8y agoI just deployed ActionCable into production yesterday. I’ll be using it to share some information between our users’ mobile app and our web client. I’m concerned about performance. As much as I know that premature optimization is the Devil, it’s hard to stomach deploying something that is so notorious for becoming a bottleneck. Once I get past my MVP of this feature and have some maintenance hours budgeted, I plan on exploring AnyCable.
- tomschlick 8y agoOn the php side of things, Laravel is doing very well and is very "rails-esque".
- joelbluminator 8y agoHeard of Laravel, it's a Rails fork right?
- tomschlick 8y agoLaravel is definitely Rails inspired, but also takes inspiration from a lot of other frameworks (CodeIgniter, Symfony, .NET, etc).
- joelbluminator 8y agoI was just teasing, Laravel looks solid. It's also comforting to know that if you move from Laravel world to Rails, a lot is familiar out of the box. It's good for us developers and good for the industry. Which I can't say about js stack/elixir/Golang/Spring etc etc.
- noir_lord 8y agoLaravel doesn't follow semantic versioning and more important they are sloppy about backwards compatible changes been documented anywhere. Symfony 4 however is wonderful, they modularised everything, kept backwards compatibility, properly deprecate things and it's fast, like really fast.
- deleted 8y ago[deleted]
- tomschlick 8y agoLaravel as of > 5.5 (5.8 is current) does not release breaking changes in point releases. Yes they don't follow semver but a modified version of paradigm.major.minor
- ileri62 8y agoSerious question: Django doesn't even have lazy loading. Why do people use it? Am I missing something? No way I'd wait a few seconds to get something big from the db
- hombre_fatal 8y agoWhat are you referring to? Lazy loading in Rails tends to refer to how Active Record waits until access time to send the query: https://rubyinrails.com/2014/01/08/what-is-lazy-loading-in-rails/ https://rubyinrails.com/2014/01/08/what-is-lazy-loading-in-r... It's still synchronous.
- sjamaan 8y agoDjango has this type of lazy loading as well: https://docs.djangoproject.com/en/2.1/ref/models/querysets/#prefetch-related https://docs.djangoproject.com/en/2.1/ref/models/querysets/#...
- collyw 8y agoYes it does, the problem seems to be that no one bothers to learn how the ORM works.
- pixelrevision 8y agoInteresting. I always found Django so much more productive than rails due to the auto admin panel being out of the box. If I’m starting something new than its nice to have a place for non devs to enter data immediately. Both do quite a bit better for cleanliness and setup time than any of the other platforms I’ve used for web development.
- nnq 8y ago> nor is there trivial integration for JS assets/asset pipeline functionality ...WHY would anyone ever want that?! I thought that splitting an app into one frontend-app and one backend-app, each in its separate repository too and runable alone is the very minimum everyone does nowadays. (Yeah, later you may go on and chop the backend into microservices, but for starters you at least keep these two sepratate - why would you want to impose knowledge of Python or Django as requirement for your frontend developers?! Even if you start with a couple full-stackers, you'll want to later be able to hire more narrow focused specialists.)
- collinmanderson 8y ago> as requirement for your frontend developers It depends on how big your project is. If you only have one developer it's fine to have to it tightly integrated.
- lightedman 8y ago>Django seem to have given up on integrating websockets Given the insecurity without huge token authorization, I'm not entirely surprised. They can try again when they figure out encrypted and variable token creation.
- minitech 8y agoLoopBack 3 was terrible - complicated, added no value, encouraged creating vulnerabilities, had lots of obvious vulnerabilities in official components. LoopBack 4 looks pretty different, but I wouldn’t trust it to be good unless the entire team and philosophy behind it has been replaced.
- andrewferk 8y agoI've been using LoopBack 3 in production for 18 months. > added no value It gives you an API explorer, routing, ORM, validation, error normalization, authentication, authorization via ACL, and more out-of-the-box. I'd consider this value. > had lots of obvious vulnerabilities I'd like to know more about this. The only thing I can think of is bypassing ACLs via fetching records and including relationships. I don't know of any framework or combination of libraries that doesn't have this vulnerability. > LoopBack 3 was terrible - complicated This is probably true. LoopBack 3 essentially uses a single model to represent your API and data model. This is the single responsibility principle taken to the extreme opposite. It's a complete nightmare at times. If you have an exact one-to-one mapping of your API to database, this may not be a problem. > unless the entire team and philosophy behind it has been replaced Loopback 4 seems to be the same team, but I believe they have learned a lesson on coupling. https://loopback.io/doc/en/lb4/Crafting-LoopBack-4.html https://loopback.io/doc/en/lb4/Crafting-LoopBack-4.html > Models are overloaded with multiple responsibilities, such as data representation, persistence, and mapping to REST. They have a way to go to reach feature parity with LB3: https://github.com/strongloop/loopback-next/issues/1920 https://github.com/strongloop/loopback-next/issues/1920. BTW, I also miss Rails.
- parthdesai 8y agoSpeaking of JS, do you guys have a suggestion for good SQL querybuilder and maybe a migration tool for Node? I prefer to do everything else by hand or use smaller libraries. Not that i don't know how to write SQL queries by hand, it's just raw SQL queries with conditions is just ugly.
- Lasokki 8y agoI've been satisfied with Knex.js. It handles query building, transactions, connection pooling and migrations https://knexjs.org/ https://knexjs.org/
- honopu 8y agoKnex is really nice. I use objection which extends it for orm stuff. The insert graph features are pretty neat. I definitely don’t use all it has to offer.
- tobyhinloopen 8y agoI really like TypeORM (for Typescript projects) & Knex (for non-TS projects)
- davedx 8y agoI'm using sequelize with an SQL Server database, it's decent so far. I do migrations by hand with a custom __migrations table.
- hezag 8y agoSails.js [1] is a good JS equivalent of rails. https://sailsjs.com/ https://sailsjs.com/
- anm89 8y agoI worked extensively with sails.js about three years ago and it was an unmitigated disaster. The ORM has about 1/8th of Rails' functionality and queries that would be trivial with Active Record were a nightmare. On top of that the community was a mess and around the end of that time, a lot of the core maintainers dropped out because there was so much in fighting. Unless there have been some major changes I highly advise staying away from sails.js.
- connor4312 8y agoIt's been about four years since we touched it. When we used Waterline (the Sails ORM), we discovered two distinct SQL injection vulnerabilities in it, without intentionally looking. I would link the related issues, but they seem to have disabled Github issues in the waterline repository[1]. That--and lots more--scared us away. We switched happily to Hapi[2] with about a week of work and never looked back. 1. https://github.com/balderdashy/waterline https://github.com/balderdashy/waterline 2. https://hapijs.com/ https://hapijs.com/
- hezag 8y agoThe major stable version came with a lot of improvements. I'm not saying sails.js is the best option for a big project, but is pretty decent for prototypes and fast development. Related: https://dev.to/imthedeveloper/comment/2615 https://dev.to/imthedeveloper/comment/2615
- b212 8y agoDid you try it or maybe even use it? I tried Sails a year ago but the learning curve felt really steep and it wasn't super popular at that time :(
- hezag 8y ago
- tomc1985 8y agoRails is FANTASTIC! I work on a hybrid React-on-Rails application and working on the React portions is so. fucking. painful. Seriously the shit people come up with with this "tool" makes corporate-hack Java programmers look good. I am always taking the backend Rails-y tickets if I have the chance
- acmecorps 8y agoI truly agree with you. I absolutely love Rails and what it has to offer, ever since working with it since Rails 2+. Truly one of the best bet I've ever made!
- strken 8y agoBlaming complexity on React is a bit like blaming complexity on ERB. The problem isn't React, the problem is the massive hole where React doesn't have an opinion. React improves the area around the hole so much that the technologies we use to fill the void look obviously deficient in comparison.
- mooreds 8y agoHave you used Vue? From reading it appears Vue has an opinion many places where react does not, but I have built nothing serious in either.
- thoman23 8y agoAs does Angular. That’s kind of its thing...full, opinionated framework.
- inapis 8y agoThis is actually the bane of JS community's existence. JS developed so fast and so wildly that there was never a breather to form and write down best practices or opinions. This is jarring to someone coming from the Rails world where a lot of magic is happening, there are strict opinions (heck, it's in the subtitle of the copy) and strict conventions to adhere too. JS is wild west compared to that. This is not to say that JS is shit but both JS and Rails have their place. If you want flexibility, you need JS. If you want iteration speed and dev productivity you need Rails.
- barce 8y agoI think what the OP meant by 'modern,' was an equivalent of Rails that uses the technologies demanded by the tech industry today. On the one hand, the industry went to Python because a ton of data science libraries were written in that. On the other hand, React ended up real dominant on the front-end because of all the sh*t code people put between HTML JavaScript tags. Another route, is any promising asynchronous and scalability like Node or Elixir. So these divergent vectors make something like a Rails that can serve the needs of big data, snappy UI and scaling while at the same time using the team we've got super difficult. The needs of the industry have created an oblivion of the solution that was always already there, Rails.
- ronnier 8y agoAnd now I’m seeing more when more migrate to Go.
- Barrin92 8y ago>demanded by the tech industry today. That attitude needs to get out of everyone's head. You are the tech industry. If you want to build something in Rails, a mature and capable framework that has tons of support and won't go away, just do it. Who's going to stop you? Applies to any other technology that's stable as well.
- lainga 8y agoThe Whims of a Fickle Manager.
- craz8 8y agoYup - unless The Tech Industry is going to come in and rewrite all our code into Flavor Of The Month (and do that every 3 months forever) I don’t really care what they “demand” - I’m too busy providing value for my customers to be shaving that yak
- vturner 8y agoThe trouble is "we," the developers aren't the tech industry making the decisions. The managers, who once were full time developers, are making the decisions. I can say hey let's use this stable, mature tool, but which catches enthusiasm more? That or the guy drooling over React and all the complex mystery JS libs saying it's the best thing ever?
- wzy 8y agoHave you heard of AdonisJS? It is more akin Rails/Laravel than anything else before it. https://adonisjs.com/ https://adonisjs.com/
- everdev 8y agoOr try Kemal with Crystal. Kemal is very Sinatra like. And Crystal is very Ruby like but it's compiled so it's much faster. http://kemalcr.com http://kemalcr.com
- morenoh149 8y agoHave you heard of FeathersJS? It is more akin to rails, supports many databases (neo4j, postgres, mssql, etc), runs on plain node.js, offers soa lifecycle hooks like rails, websocket/realtime support ootb and graphql via third party libs. https://feathersjs.com/ https://feathersjs.com/
- rmason 8y agoTry looking into Nuxt which is built on Vue. Docs could be better but once you figure out a few things I found that you can be highly productive. But it's strictly a front end tool. Some guys use Laravel on the Backend but I'm partial to Taffy. https://nuxtjs.org/ https://nuxtjs.org/ https://laravel.com/ https://laravel.com/ http://taffy.io/ http://taffy.io/
- wwweston 8y agoLet's say the last time I really worked on anything Rails related was 2011-ish, and while I got stuff done OK, I never really particularly fell in love with it (and in fact was often annoyed that most projects I worked on seemed to start with a week of hacking through environment and gem snarls). Where would people recommend I read about (a) getting up and running with rails 5 and (b) appreciating what's new and improved in the last 8 years?
- jaredcwhite 8y agoI use RVM and create .ruby-version files for every single project I touch. Occasionally I'll let more than one project share a Ruby version/Gemset combo, but often I'll make sure each is unique. No need to "bundle exec" anymore, because simply cd'ing in and out of project folders resets your gems to a clean list only required by that app. It's great. The years come and go and I still hear people complaining about Ruby version and gem hell and I wonder why the heck they aren't using RVM!
- joelbluminator 8y agoA lot of things improved but a lot of things stayed the same. Rails is like oysters - not for everone...
- 0XAFFE 8y ago> If you're talking about missing a JS equivalent of rails, do you know about Loopback? I would not go down that route, because at least Loopback 3 looks promising at first, but after a while it does not scale dx-wise. The biggest trap my team fell into, was that you could „include“ related models in a request, that you did not have permissions to. Media management was also very poor and did not integrate well into the whole eco system. We are now using TypeORM[1] and routing-controllers[2] which has been very nice so far. I have been building my own framework at work on top of these and it safed us a good chunk of time. If you want to have a look, go to my profile, I have put a link there. [1] https://typeorm.io https://typeorm.io [2] https://github.com/typestack/routing-controllers https://github.com/typestack/routing-controllers
- coldtea 8y ago>More seriously, I feel rails is still excellent and I'm happy to work with it every day. I'd be interested to hear more about what makes rails not modern? The whole thing he explains in the post: he wants an all-rounder like Rails but which covers the SPA/JS side.
- ericb 8y agoI think many of us have realized that the SPA, which introduces an entire second application into your stack, isn't that cost effective. I'm more interested in turbolinks and if absolutely necessary, maybe something like http://instantclick.io http://instantclick.io to get an 80/20 payoff. For folks here doing startups, imagine the speed boost of maintaining one less entire application than your competitors.
- herbst 8y agoTurbolinks and some dirty jquery here and there is all I really ever needed. Everything more than that just feels to much like having multiple code bases.
- danmaz74 8y agoI love Rails. I also like React. What I really miss is an easy way to connect the two - a Gem or a generator that connects models on Rails, through REST API endpoints, to a front-end state management library (Redux or MobX). But I suppose that DHH got burned with Prototype and then CoffeeScript and wouldn't endorse something like this.