TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

I Miss Rails

664 pointsby chanindabout 6 years ago

97 comments

BillFranklinabout 6 years ago
&gt; if the modern equivalent of Rails already exists, please let me know!<p>You&#x27;re in luck. Rails 5.2.3 was released 20 hours ago.<p>More seriously, I feel rails is still excellent and I&#x27;m happy to work with it every day. I&#x27;d be interested to hear more about what makes rails not modern? I find it a very productive framework.<p>EDIT: If you&#x27;re talking about missing a JS equivalent of rails, do you know about Loopback? <a href="https:&#x2F;&#x2F;loopback.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;loopback.io&#x2F;</a>
评论 #19517808 未加载
评论 #19518231 未加载
评论 #19519754 未加载
评论 #19517893 未加载
评论 #19518560 未加载
评论 #19519064 未加载
评论 #19519509 未加载
评论 #19519113 未加载
评论 #19518004 未加载
评论 #19517987 未加载
评论 #19520577 未加载
评论 #19518357 未加载
评论 #19521592 未加载
评论 #19518328 未加载
davidbanhamabout 6 years ago
I actually have gone back to writing server-rendered apps like it&#x27;s 2012 and it&#x27;s been wonderful.<p>Server-rendered used to mean slow and clunky but I&#x27;ve found that using Go my page loads are super fast. The inter-page transitions can sting a little on really really slow connections, it&#x27;s true. But users are much more willing to deal with them if they haven&#x27;t first been subjected to a minutes-long spinner while the SPA loads up all its libraries and state.<p>A little game I sometimes play is asking fellow developers to try and guess the frontend framework used on one of my apps. They click around for a little while wondering &quot;Angular or React&quot; before I tell them it&#x27;s actually just some Go templates rendered on the server. It often opens their eyes that the loads were so fast they couldn&#x27;t actually tell they were happening.<p>SPAs have their place and I&#x27;ve written a lot of them. It&#x27;s amazing how far you can take server rendering in 2019, though.
评论 #19521476 未加载
评论 #19518859 未加载
评论 #19518961 未加载
评论 #19519472 未加载
评论 #19520331 未加载
评论 #19518955 未加载
评论 #19519789 未加载
ericbabout 6 years ago
Why miss it, come on back, the water&#x27;s still warm and the dev is still as fast as ever in Rails. Honestly, the JS stacks all seem vastly more annoying on so many levels.<p>It seems like the JS ecosystem changes so fast because it <i>knows</i> better is possible, so it just tries to reinvent itself over and over.<p>The JavaScript world starts with this weird prototype based language with a syntax that looks like it might be something more class based. From there it goes to dependency bundling hell, callback hell and Christmas tree code indenting, no standard implementation, and a library required for everything under the sun (Left-pad!) And somehow this is what the cool kids are into? I never liked Rails because it was &quot;cool&quot; I liked it because I love getting stuff done, fast.
评论 #19518694 未加载
评论 #19517733 未加载
评论 #19518340 未加载
评论 #19518136 未加载
评论 #19517853 未加载
digbabout 6 years ago
I’ll say this: I came to Rails <i>from</i> Node (and before that .NET but with a way smaller scope of responsibility), and I am thoroughly convinced the author is correct. I couldn’t estimate for shit in my first few months at this job (once I had ramped) because Rails makes things that would’ve taken at least twice as long easy to do, even without gems. Plus, I have seen not even a third of the compatibility issues between our version of the framework (bit old) and up-to-date games as I saw when I was writing Node full time. Rails is the first non-“enterprise” framework I’ve felt let’s me focus on the correct level of concern for my current needs.
评论 #19517816 未加载
评论 #19517753 未加载
lettergramabout 6 years ago
I still write Rails applications regularly, some applications I&#x27;ve maintained since 3.0 to 5.x.<p>What&#x27;s amazing, is I booted up a 4 year old project in minutes the other day at work. A co-worker was interested in using the project, it took 15 minutes to setup clean.<p>Overall, I find Rails is easily more maintainable and definitely enjoy it more than the Django and Flask apps I write regularly. Javascript (Node + React&#x2F;Angular) breaks all the time when upgrading, so maintaining it is not super fun either...<p>Here&#x27;s a project I wrote in Rails and deployed late last year:<p><a href="https:&#x2F;&#x2F;hnprofile.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hnprofile.com&#x2F;</a><p>Works like a charm!<p>I even recommend Rails to new people starting out because I think it sets best practices.
评论 #19520857 未加载
tombertabout 6 years ago
I&#x27;ll take a mildly unpopular opinion and say that I really despise code-gen-style web frameworks, like Rails or ASP.NET MVC or Django, and would rather reinvent the wheel than use them.<p>I definitely see the appeal of these frameworks, but I feel that a side effect of having them is that there&#x27;s a metric ton of code generated and you really have no idea how it works. I remember spending almost 30 minutes digging through the C# object being used to parse JSON, generated by ASP.NET, to see why a field mapping was being done incorrectly, simply because I had traverse through four different files to see the logic.<p>Granted, part of the problem there is intrinsic to how C#&#x2F;Java are structured, and the massive number of files needed by them, but I still feel that the code generation made it worse.<p>Even if the code weren&#x27;t generated, the amount of ceremony to add an endpoint, add a new type to be parsed, and perform updates just does my head in. That aforementioned C# app was about ~1000 LOC, across a few dozen files. I rewrote the system, from scratch, using Clojure and http-kit in around 100 LOC, without losing any features.<p>I&#x27;m probably just old now, but I suppose I really dislike magic in my codebase, which is why I tend to prefer the lower-level things.<p>(Also, just a note, I&#x27;m a total hypocrite, since I actually wrote an MVC-ish framework in Node.js 5 years ago, then ported it over to Erlang).
评论 #19518002 未加载
评论 #19520033 未加载
评论 #19521822 未加载
评论 #19517935 未加载
评论 #19520308 未加载
评论 #19518742 未加载
评论 #19519284 未加载
blacksoilabout 6 years ago
I still develop using server-rendered like it&#x27;s 2012. Since I&#x27;m pretty much an indie dev, I just don&#x27;t think it&#x27;s worth my time to initally start a project off REST API (i.e. using react) because it&#x27;s literally 1 more layer to take care off. I.e. if a REST end-point name changes, then I&#x27;d have to modify both frontend and backend code. In addition to that, initially, getting a software specs is a much harder problem than to implement. Having to create REST endpoints for every single data that needs to be passed around is not nice when the structure and specs are still very likely to change.<p>Moreover, finding developer experienced in react is much harder and more expensive than those who do traditional HTML-CSS combo. Finding a freelancer to slice out PSD design into HTML-CSS is also much harder to go wrong. I wouldn&#x27;t be comfortable outsourcing a react project to freelancer I barely know, but I&#x27;d do it for HTML-CSS.<p>I&#x27;m not against react or other SPA frameworks by any means. I think they&#x27;re great technology that makes certain use cases convenient and can make a good user experience. That being said, there are also costs for those, and I just feel like there are so many websites out there that don&#x27;t actually need to be implemented using SPA. Traditional server-side rendering would have saved them so much time, resources, and headache.<p>I personally would only rewrite a particular project into an SPA when there&#x27;s a real need for it. For example, when the user base is large enough that a nice-to-have user experience becomes a big enough deal, if there are real needs for &quot;reactiveness&quot;, or if mobile apps counterparts that would also require REST API is needed.
评论 #19518757 未加载
jphabout 6 years ago
Elixir and Phoenix are excellent, and you&#x27;ll recognize many of the same concepts in these. The communities are excellent as well, and welcoming to newcomers.
评论 #19517789 未加载
评论 #19520586 未加载
viksitabout 6 years ago
&quot;Move fast and break things&quot; very accurately reflects the state of Javascript development in 2019. Libraries and frameworks, and node&#x2F;npm themselves move so quickly that APIs, versions, ways of doing things -- all break so quickly as to be ludicrous.<p>This post rings true.<p>I gave nextjs a try recently to build a simple dashboard that could connect to our oauth provider. Forget external libraries, even simple ways to do state management, user login, screens, HOCs to guard routes - all of this is poorly documented, managed, and there are 100s of github gists that aren&#x27;t versioned, demonstrate old APIs that have been deprecated and aren&#x27;t really usable unless someone who knows that they&#x27;re doing goes in, and cobbles together an example.
评论 #19519117 未加载
davidscolganabout 6 years ago
I&#x27;ve been using Django since I started 10 years ago. I argue that it was a great choice back then and it&#x27;s _still_ the right choice even with the advent of the modern everything. If you are writing a website for a business, I see nearly no actual business case for using Node+SPA for nearly any kind of website you&#x27;d want to build. Especially in a business context, unless you are building a super ultra real time thing (and then use Elixir not Node), Django will do just fine and be several times faster to develop and easier to pull off. And you can get pretty far into the dynamicness camp before it becomes untenable. s&#x2F;Django&#x2F;Rails.
评论 #19521804 未加载
lxcidabout 6 years ago
I personally don&#x27;t missed Rails mostly because boilerplate doesn&#x27;t really bother me. I&#x27;m more afraid of using the wrong abstraction.<p>Rails (v4 was my last experience) was hard for me and I think my reasoning is as follow:<p>- I like to dig deep into the framework I work with but Rails have so much meta programming (a.k.a magic) that I struggle real hard figuring out stuff. You often have to go into runtime, hit method and see where it lead you to and after a while, I realise that I&#x27;m not going to see the bottom.<p>- If you are someone who like to dig deep, the documentation wasn&#x27;t helpful for me at all.<p>- ActiveRecord for a while discourage using foreign key. When I move away from Rails, I tried SQLAlchemy and love that its unopinionated. Then I move to node and agree its ORM are less powerful but I learnt to love SQL. ActiveRecord for me shouldn&#x27;t be any more than just convenience ORM and shouldn&#x27;t replace SQL, that goes against Rails&#x27; ActiveRecord philosophy which claim these constraints should be at the model side rather than DB side. <a href="https:&#x2F;&#x2F;guides.rubyonrails.org&#x2F;active_record_migrations.html#active-record-and-referential-integrity" rel="nofollow">https:&#x2F;&#x2F;guides.rubyonrails.org&#x2F;active_record_migrations.html...</a><p>- Lastly, I firmly believe MVC is a leaky abstraction. Any variations of MVC is just shifting the complexity around, not reducing it. I worked on Rails, worked on iOS (which uses M-V-VC). The pattern I see is that almost every year, someone will get bitten by vanilla MVC, tried some variants unsuccessfully and conjure a new variant; the cycle goes on. MVC is a 20 year old pattern, it have amazing insight into how we should build application, but its implementation always fall short after so many years.<p>Ultimately, I don&#x27;t think Rails was optimised for someone like me. I think there&#x27;s just fundamental differences in philosophy between me and Rails.
评论 #19518105 未加载
评论 #19518857 未加载
评论 #19529689 未加载
reilly3000about 6 years ago
I really have no horse in this race, but I would like to know what the argument FOR React+Redux+GraphQL is for developing apps in 2019.<p>Is it that we need to offer offline clients to meet user expectations?<p>Better raw performance on the front end?<p>Cheaper server costs or easier to deploy serverlessly?<p>For the progressive enhancement of your resume?
评论 #19518089 未加载
评论 #19518809 未加载
评论 #19518940 未加载
评论 #19521061 未加载
评论 #19519462 未加载
评论 #19518255 未加载
hardwaregeekabout 6 years ago
Seriously, do people <i>like</i> writing boilerplate or something? Whenever I write a non Rails backend, I keep on thinking about how easy, how fast this would be done in Rails. Like I&#x27;m writing a backend right now in Rust, and while Rust is an excellent language with lots of ergonomic features, it&#x27;s not a tenth as fast or fun as Rails. It&#x27;s quite depressing to be writing a bunch of Rust code only to remember that this would be done in a few minutes with Rails (albeit with half the safety).<p>For instance, let&#x27;s take writing a simple RESTful API. With Rust and Rocket, I need to build up the file structure, start writing controllers to fetch the different resources using diesel, figure out connection pools and how they link with Rocket fairings, then find I need rocket_contrib in order to automatically serialize to Json, then write out all the same routes (&#x2F; GET&#x2F;POST, &#x2F;:id GET&#x2F;DELETE&#x2F;UPDATE, etc.). Meanwhile in Rails I type `rails generate scaffold article title:string content:string`. Boom. Done.<p>Several times I&#x27;ve found myself thinking about ways of making my development experience better in Rust. Maybe I could write some macros that fix my problems. But then I&#x27;d just be reinventing Rails&#x27; metaprogramming. Ah well. I guess sometimes we need to reinvent the wheel.
inapisabout 6 years ago
What’s the harm in using rails purely as an API? You’ll still get a lot of functionality out of the box and maybe have to write just a little bit more glue code for the JS-backed front end than what rails provides out of the box.
评论 #19517805 未加载
评论 #19517751 未加载
评论 #19518841 未加载
laurentdcabout 6 years ago
&gt; I’m not suggesting that we give up React and es7 and go back to writing server-templated web-apps like it’s 2012 again.<p>My team is still building server-templated web apps with Django, RoR, Laravel. It&#x27;s just that most software we make is some sort of CRUD application and React&#x2F;Redux feels like overengineering, and still a mess when it comes to SEO. Clients are happy and ultimately don&#x27;t care. Should I be worried?
评论 #19519329 未加载
ajsharpabout 6 years ago
Yep, 100%. In the process of converting a node&#x2F;typescript API to rails. I&#x27;ll never make this mistake again.
评论 #19517811 未加载
评论 #19517834 未加载
sergiotapiaabout 6 years ago
Ember was rails on the frontend. Still chugging along I guess, but honest to god I haven&#x27;t seen a soul use it in the past three years. Anywhere I worked, anywhere I asked.<p>I&#x27;m using Phoenix and Elixir these days instead of Rails. But I&#x27;ve also been circling back to C# after 9 years of not using it for anything. C# has become to so incredibly open that you can write C# code and build static binaries for Linux, Mac and Windows, with single commands. Definitely check it out if you want something like that under your toolbelt.<p>The fact is, the javascript ecosystem is a house of cards. Most definitely the worst ecosystem I&#x27;ve ever used to write software. I sometimes wish a competitor to NPM launched with better organization and rules. NPM is insane, in all the worst ways. Google the left-pad incident. We need JS so we&#x27;re stuck with NPM I guess.<p>Maybe with Phoenix LiveView we can get away with _less_ JS - maybe...
评论 #19518123 未加载
jaequeryabout 6 years ago
I actually dislike RoR but I&#x27;m at the same conclusion as OP. There is just something about Ruby that makes me want to keep going back to it. It is difficult choice when given the fact that JS is (and probably always will be) the de-facto language for the web so it&#x27;s really hard to dismiss Node. But if that wasn&#x27;t the case, I&#x27;d stick with Ruby all day.
评论 #19518506 未加载
评论 #19519100 未加载
nameloswabout 6 years ago
I&#x27;ve known rails for years but haven&#x27;t yet used it seriously. I felt it&#x27;s good because setting up is easy and the velocity is high.<p>Until now I use it every day and I found it&#x27;s really great and better than my previous impression:<p>1. Compared to JS there&#x27;s always a specific way of doing things - how to validate, how to dispatch async Job, how to send emails and real-time notification etc.<p>2. Compared to Spring there&#x27;s only a recommended default way you can easily start with. You don&#x27;t struggle with SpringWeb vs WebFlux, different JMS implementations, Hibernate or query builders, etc.
评论 #19518659 未加载
sixothreeabout 6 years ago
&gt; Do you need user accounts with signup &#x2F; login &#x2F; forgot password emails &#x2F; email confirmation? Install devise and you’re done.<p>I don&#x27;t understand why these types of features are so sorely lacking on other frameworks. I was looking for a simple user management dashboard for MVC and maybe my google fu was lacking but I just could not find anything easier to implement than spending a day writing my own stupid dashboard...
KaoruAoiShihoabout 6 years ago
Rails is just very high level. The comment on meteor makes it clear why a Rails didn&#x27;t exist in JS-land. Because the fundamentals are so dynamic and so in flux it becomes hard for a high level framework to gain traction when it can become outdated so quickly (though meteor was a particularly incompetent try at it and that&#x27;s not the only reason for its failure). Once the community grows a stable low level stack then a Rails-like will inexorably emerge imo, but I have a feeling that React is not at that stage yet.
评论 #19518097 未加载
评论 #19518677 未加载
olavggabout 6 years ago
I love Rails vision about how to do full stack web development. It is a really good abstraction, that hides unnecessary technical complexity and lets you focus on solving business problems.<p>A lot of people here complains about Rails performance, and that is one of the reasons why I use the Grails - Java framework. It is not as polished as Rails, and has a few sharp edges, and it has a much smaller community which is still super-friendly and awesome. Grails however can still take the advantage of the enormous Java ecosystem. You have a library for about <i>everything</i>. And many of them is of really high quality too.<p>I have for the last five years built three successful startups with Grails, where the last one now employs 100 people. Grails has been really helpful here, as it has made it possible to move fast and add,fix,improve,break changes quickly. For my last startup Rails would most likely have struggled with the amount of data we are dealing with, while Java is hardly sweating. It is not something Grails specific, but still a part of the Grails application, that is why I mentioned Java.<p>My last startup, which now employs over 100 people didn&#x27;t use React nor Angular either in the beginning, just vanilla Javascript. More speed, less complexity, less errors and so on. We use React today, but that is because new employees really really wants to work with. And developer happiness is really important.
评论 #19521763 未加载
throw2016about 6 years ago
Having just deployed Discourse and Diaspora its obvious Ruby and Rails was not designed for end user use. There is complete and total dependency hell and a hard requirement for a build environment for basic app deployment.<p>This kind of engineering directly leads to endless wasted hours troubleshooting errors, routine build fails and apps that think nothing of pulling in hundreds of dependencies that in turn have their own dependencies that can fail at any time.<p>This is plainly wasting millions of man hours of end users time if its not a SAAS app. Compared to that Go is an ode to simplicity, PHP just works, Python is relatively painless and even Java causes little stress. Its node and ruby that seem to be designed by people who revel in complexity and have zero concern for deployment and end users.
rebhdmabout 6 years ago
I don&#x27;t use rails, but I agree with sentiment in general. I first learnt front-end stuff with desktop UI libraries and I hated it. Creating UIs with programming languages sucks. The first time I used the web environment, I really enjoyed it and it was the reason I decided to focus on programming for the web. I was using PHP and server-side rendering, with some javascript to do some interactive things. I liked that the design aspect (html and css) was completely separate from the programming, and that there were no compile steps.<p>Then eventually the requirement for more application-like experiences led me to adopting client-side frameworks because server-side just wasn&#x27;t able to do those things very well. I like the idea of a json-based api talking to a client application, but the client-side libraries have bought back all the things I hated about desktop UI programming.<p>I think html is great and should be left on its own, not combined with the programming language. That is the reason I don&#x27;t like React. I can&#x27;t read all of that jsx&#x2F;pseudo-javascript together. It looks like a mess. Vue is better, but it is just a big hack of stuffing things into html attributes. Both of them also require a compile step if you want to use them to their full potential. So now all the things I hate are back, and I don&#x27;t like web programming anymore.
ravenstineabout 6 years ago
People always forget Ember.js, like it&#x27;s some relic of the past, despite it having very active development and a toolchain for a consistent Rails-like experience on the frontend. There&#x27;s no reason why you can&#x27;t use React or Vue components inside an Ember.js application if that&#x27;s what you prefer.<p>As much as I&#x27;ve grown to despise the Ruby community for relying too heavily on metaprogramming and inheritance, leading to abstraction hell, I think Rails is still a great framework for serving web pages. Just because it&#x27;s not the shiny new thing doesn&#x27;t mean it can&#x27;t do most of the things we want from it(not every company is FAANG scale), and there is still an abundance of Rails jobs in 2019.
ernsheongabout 6 years ago
First of all, you should use the right tool for the job. Having said that, Rails kept giving me the icky feeling. What you gain in speed of development, you lose in performance and server costs and all sorts of crazy gem meta-magic.<p>My current middle-ground stack is Golang API (I use go-chi) + (LitElement front-end (web components) + Redux). I&#x27;m kinda happy, though my gripe is with Go sometimes, not the stack.<p>To the far right where people are complaining on: React + GraphQL, etc. Well, I think you went into the deep end, so rightfully you think about veering back left again. But hey, there&#x27;s a middle ground that is more &quot;standard&#x27;s based&quot;.
评论 #19518783 未加载
rubyfanabout 6 years ago
The current javascript landscape reminds me of PHP circa 2003 + isomorphic single page madness + functional philosophical purism + dreams of type safety + &lt;new fad here every six month&gt;<p>Yuck.
评论 #19519118 未加载
rajangdavisabout 6 years ago
Is there a modern Railscasts?<p>I feel like the Rails community owes a lot to Ryan Bates for pushing out high quality content and keeping up to date with Rails for as long as he did.
评论 #19519290 未加载
rco8786about 6 years ago
Rails is still very much alive and popular, this is kind of a weird take. Server rendering is also very much still a thing.<p><i>But</i> I do agree that it seems the JS ecosystem is missing a real Rails equivalent. Specifically an ORM that is as robust as ActiveRecord. I&#x27;ve often thought about building this myself, and then I remember I have a family and full time job.
sjellisabout 6 years ago
I think that Buffalo is actually the most credible replacement for Rails that I&#x27;ve seen:<p><a href="https:&#x2F;&#x2F;gobuffalo.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gobuffalo.io&#x2F;</a><p>The lead developer is a ex-Rails developer with a very keen sense of what made Rails successful. One of the reasons that it&#x27;s still pre-1.0 is that it won&#x27;t ship until the plugin architecture is good, which speaks to the point of the article.<p>You don&#x27;t need advanced syntax in the server code to write Rails <i>applications</i>, so Go may be a good fit for a Rails replacement.
andrewstuartabout 6 years ago
&gt;&gt; I’m not suggesting that we give up React and es7 and go back to writing server-templated web-apps like it’s 2012 again<p>Actually I have gone back to server-template development using Django for selected projects, after many years working with React, which I still love.<p>Server side templated development with Django can be extremely fast in terms of development time, very direct and effective.<p>There no need to use React for all the things.<p>Sometimes React is the right tool, sometimes server side templated is the right tool.
brentmabout 6 years ago
Rails with Webpacker is the best of both worlds IMO. Ruby is a pleasure to write and Rails saves a ton of time. There are just so many things that Rails does that you forget about until you start putting together a Node app.
dpodsabout 6 years ago
Every single example the OP laid out is solved by an official laravel package. People love to hate on PHP but I can spin up a laravel app with all of those features in a matter of hours.<p>I can build a traditional server side rendered app or I can use the front end scaffolding to build an API driven SPA based on vue or react.
评论 #19520168 未加载
jasonhanselabout 6 years ago
We need a framework that makes it easier to build server-rendered, multi-page web apps with Node. Preferably something &quot;batteries included,&quot; with support for recent innovations in web tech.
评论 #19529315 未加载
评论 #19518726 未加载
评论 #19519782 未加载
thrownaway954about 6 years ago
I keep looking at C# and Blazor myself<p>If you want an SPA type Rails way of doing things, you can use Turbolinks. This talk at RailsConf 2016 is really an eye opener.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=SWEts0rlezA" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=SWEts0rlezA</a>
endlessvoid94about 6 years ago
Every time I dip my toe into the node.js waters I recoil in horror at the complexity of the defaults.
评论 #19518464 未加载
reustleabout 6 years ago
I recently started working with Django after not using it for almost 10 years. It&#x27;s really wonderful how nice it is to get projects up and running so fast, and the Python community is stronger than ever. There are many integrations with modern tools like Cognito and Stripe, and it automatically turns my model definitions into an admin interface and REST API (with django-rest-framework). I think I&#x27;ll be sticking with it for a while.
presidentabout 6 years ago
There is a universe where there exists only 1 programming language and only a single web framework. That would be cool to experience.
评论 #19517803 未加载
评论 #19517981 未加载
评论 #19517762 未加载
评论 #19517741 未加载
评论 #19518609 未加载
neoviveabout 6 years ago
Whether you use Rails today or moved on, many of the concepts introduced and&#x2F;or popularized by Rails can be seen in the current generation of popular server-side frameworks across many platforms.
mvanduynabout 6 years ago
I take modern to mean: Using latest state of the art techniques to increase programmer productivity and happiness.<p>Rails is still the number 1 backend framework, and the RoR ecosystem is so powerful that the <a href="https:&#x2F;&#x2F;hyperstack.org" rel="nofollow">https:&#x2F;&#x2F;hyperstack.org</a> gem lets you code in Ruby on the client, and fully access your AR models directly in your client code (again all written in Ruby.)<p>You get all the maturity of rails, including be able to use Rspec to test your server and client code in an integrated fashion.<p>Here is a blog post that shows how simply adding a 2 line AR model declaration adds data persistence, and push synchronization to a &quot;client-only&quot; app: <a href="https:&#x2F;&#x2F;medium.com&#x2F;@mitch_23203&#x2F;the-exact-same-app-in-hyperstack-part-ii-5b062074ec20" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@mitch_23203&#x2F;the-exact-same-app-in-hypers...</a><p>If that is not &quot;modern&quot; I don&#x27;t know what is.<p>Meanwhile the rest of the world is writing tons of boiler plate, creating reducers, transformers, co-axial independent state repeaters, I don&#x27;t know what all, but the bottom line is you have to write a ton of code to get anything done.
mnm1about 6 years ago
The arrogance and ignorance of this post is massive. There is nothing wrong with rails or django or symfony or any other server side rendered web framework, whether it&#x27;s 2012 or 2019. The author seems to think that somehow react SPAs are the only modern apps. The case against SPAs is still huge and for most use cases, they are the wrong tool for the job. This type of cargo cult, fashionable trend thinking undermines his entire argument and questions his qualifications as an engineer. There&#x27;s no logical explanation for not using rails or something like it. He&#x27;s complaining about a problem with literally dozens of proven solutions, including rails, that he&#x27;s even aware of, and yet refuses. What ever happened to use the best tool for the job rather than what&#x27;s fashionable and popular in 2019? I would not want such an engineer anywhere near my company, that&#x27;s for sure. I can&#x27;t think of a worse trait than knowing the right solution to a problem and deciding to use something else just because &quot;everyone else is doing it.&quot; Absolutely bonkers.
almostarockstarabout 6 years ago
If I understand the situation correctly:<p>Rails applications benefit from batteries included boilerplate because Rails &quot;owns&quot; the whole stack.<p>&quot;Modern&quot; (contemporary?) JS applications benefit from separation of concerns, and flexibility because each layer is interchangeable.<p>So how do we make this better? We can&#x27;t reasonably split Rails up to match the benefits of JS. The obvious (naive?) solution is to provide a protocol that JS layers can follow. Specific packages&#x2F;layers can decide to provide the protocol which makes them interoperable. The developer may then pick and choose, knowing that if they choose packages that comply with the protocol, they can use the &quot;batteries included&quot; features.<p>It would be fairly trivial to identify the major features that most apps reimplement. Getting it all to play well together would not be as easy.<p>As the OP described, I think Meteor was a great platform, but had some fatal flaws. If &quot;Meteor-the-company&quot; was &quot;Meteor-the-protocol&quot; I think we would have been in a much better position.
评论 #19540153 未加载
ckluisabout 6 years ago
Elixir&#x2F;Phoenix is the spiritual successor and includes a potential means of minimizing the need for client-side JS with Live Views.<p>Check out: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;joerichsen&#x2F;status&#x2F;1109122286139965441?s=21" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;joerichsen&#x2F;status&#x2F;1109122286139965441?s=...</a>
aosaighabout 6 years ago
No one here is talking about clients. One of the great benefits of using Rails, Django etc. is that they are stable, very well documented, well supported frameworks with a large ecosystem of libraries and developers. If you are making an app for a client these will generally be much easier to maintain than a bespoke Javascript stack.
xutopiaabout 6 years ago
I think Rails is amazing. My only gripes with it are that tests run slow and you need plenty of tooling to make things work (redis, sidekiq, anycable).<p>I have been particularly interested with Phoenix as of late as it fixes all the gripes I have with Rails and Liveview is an amazing pattern that I think would simplify a lot of things.
meow_mixabout 6 years ago
The ecosystem around rails was incredible. Really wish we could get something equivalent with a static language
评论 #19518791 未加载
评论 #19518519 未加载
jaequeryabout 6 years ago
Anyone know of a BetterErrors equivalent in Node.js with an actual REPL (live shell) like in <a href="https:&#x2F;&#x2F;github.com&#x2F;BetterErrors&#x2F;better_errors" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;BetterErrors&#x2F;better_errors</a>?<p>Or even a pry-remote equivalent?
k__about 6 years ago
AWS Amplify is becoming the &quot;Rails&quot; of serverless.<p>It already has impressive code generators for GraphQL.
评论 #19517878 未加载
评论 #19517925 未加载
verdvermabout 6 years ago
Check out <a href="https:&#x2F;&#x2F;apollokit.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;apollokit.org&#x2F;</a> for something similar using full-stack JS<p>Sysgears has some other projects that is moving towards the ability to import functional modules from npm
评论 #19517757 未加载
Aks21about 6 years ago
I read your blog and I think that&#x27;s why we still need Rails to keep other frameworks on their toe.<p>Feature&#x2F;Improvements introduced in Rails are constantly being picked up by other frameworks but for some reason, people are ignorant about the progress made by Rails in the last couple of years.<p>I use Rails every day at work and trust me when I say this, It is so easy to get back to the code written last week or even last month(Of course Ruby plays a big role in that). It is a big advantage when you do not have to break your head every time you wanna review your code which is written some time back.
digitaltreesabout 6 years ago
What would be cool is a full stack framework that was built around GraphQL and a SPA but that had essential packages for a broad array of features. Sort of like when rails added REST but within and around the framework. The problem with configuration would be solved if vue or ember or angular had an opinionated server&#x2F;api stack that was maintained and integrated more tightly. Some people like configuration, that’s fine, lots of options out there. Others like conventions and a unified end to end platform, lots of options for MVC, literally none for SPA&#x2F;API.
codyeatworldabout 6 years ago
It took me a long time to learn rails, it&#x27;s very magical and makes many decisions for you. If you constantly find yourself disagreeing or fighting these decisions, rails will never be fun. Maybe this is why so many people are against it, but I loved having a framework teach me about why it made these decisions. To me, nothing comes close to vanilla rails app, after you learn where and when to apply certain patterns it&#x27;s extremely productive and fun to use. You can get so much farther than you probably think if you haven&#x27;t used it in a while.
评论 #19531167 未加载
haneyabout 6 years ago
I’ve been really happy splitting the difference between rails style server side rendering and full client side JS apps using Django. I can easily build REST or GraphQL endpoints for client side web apps to consume, but I have the ability to easily render out server side templates for more lightweight pages. Add to that that the python ecosystem is great for data science &#x2F; data engineering tasks so it’s easy for developers with different backgrounds to cross over &#x2F; reuse data model code between projects&#x2F;tasks.
westoqueabout 6 years ago
I believe we are at a turning point for the future of web apps and servers. After using Firebase and serverless (I hate this term) technologies in the last few, I didn&#x27;t miss doing all what&#x27;s said in the blog at all.<p>Need authentication? Just turn the feature on in Firebase and use it. Need storage? Need analytics? Just do the same. The future is bright and we are heading in the right direction. With this, we can get started on our apps with zero configuration and just focus on features.
评论 #19518516 未加载
评论 #19518146 未加载
vincentmarleabout 6 years ago
I could never get into Rails because of all the magic. “It just works” doesn’t cut it for me, if I as an engineer, can’t understand exactly what’s going on under the hood.
评论 #19518874 未加载
revskillabout 6 years ago
Here&#x27;s how i replace Rails with the &quot;modern stack&quot;:<p>- Compile Graphql schema into Typescript typings + Fragments for &quot;Active Record&quot;<p>- React Hooks as controllers action.<p>- React Suspense for HTML rendering.<p>- Apollo for graphql caching<p>- ExpressJS for middlewares.<p>- @reach&#x2F;router for routing.<p>- @loadable&#x2F;component for code splitting.<p>- Serverless for API.<p>I missed Rails, too. But i found that the &quot;modern stack&quot; is not bad at all. It just needs more time to investigate to find out the best way to reuse features.
评论 #19518179 未加载
评论 #19518437 未加载
评论 #19519310 未加载
评论 #19519049 未加载
评论 #19518414 未加载
hezagabout 6 years ago
&gt; There’s no longer a standardized way to get user accounts with a login&#x2F;signup, [...] so instead we need to spend days rewriting this functionality anew on each project<p>I don&#x27;t think that ever existed &quot;THE standard way&quot; to build web applications. At the same time Rails was trend, for a lot of people the &quot;standard way&quot; to build web systems was write it from scratch in PHP.
piyushpr134about 6 years ago
I think one big mistake rails did was to tightly couple view side with server side. This made sure tight coupling. If rails had a layer in between controller and html (with a dumber html templating), with this middle layer either spitting html or json apis, we would not need to get rid of rails<p>I too find react etc too complicated for a simple crud kind of app. Rails was much faster to achieve the same.
perfunctoryabout 6 years ago
&gt; The world of tech moves fast, and there’s always new frameworks and paradigms popping up that make developers’ lives easier and allow us to build more and more powerful applications.<p>I wish people didn&#x27;t start their posts with such proclamations. Why can&#x27;t one just go ahead and criticize something without first giving it a compulsory doze of praise.
yakshaving_jgtabout 6 years ago
&gt; I’m not suggesting that we give up React and es7 and go back to writing server-templated web-apps like it’s 2012 again<p>Why? What is wrong with that exactly?<p>Has the Internet fundamentally changed over the past seven years? I’d argue it hasn’t fundamentally changed in the past <i>20</i> years.<p>A single-page app isn’t a panacea, and in most cases is a bad choice for a business.
0_gravitasabout 6 years ago
I haven&#x27;t used rails myself, but I often hear that Phoenix is effectively Elixir&#x27;s version of Rails.
agarabout 6 years ago
I look forward to a comment section filled with passionate developers rejecting the author&#x27;s premise, and pitching their favorite framework(s) as proof...<p>Thereby validating the author&#x27;s premise that &quot;the majority of the problem is just a result of fragmentation in the modern ecosystem.&quot;
ai_iaabout 6 years ago
I have been dabbling with Elixir + Elm. This can be the next big thing, once live view gets wider adoption.
jbverschoorabout 6 years ago
I don&#x27;t miss rails. It&#x27;s there and it&#x27;s awesome. Can&#x27;t wait till crystal is far enough so there&#x27;s better type checking, or for ruby to implement that.<p>And I can&#x27;t wait for activerecord to be replaced by something like objectmapper.. It makes a lot more sense.
ashelmireabout 6 years ago
&gt;nodejs &#x2F; typescript graphql backend and React &#x2F; Apollo on the frontend.<p>So uh... I run a Rails &#x2F; graphql backend and React &#x2F; Apollo frontend. It&#x27;s not perfect, but I still think it&#x27;s easier than running a complex node backend by an order of magnitude.
m23khanabout 6 years ago
sure, you will miss rails if you are still working on monolith development model (which is still valid in many cases) or if you want to have your Ruby developers who can also do frontend work.<p>These days, frontend has advanced so much that either you are a minority who is truly full stack and can do both backend and frontend work in good competence otherwise, frontend has become a separate profession altogether and for good reason -- it not only requires artistic capabilities, but it requires good amount of coding now with plethora of frameworks&#x2F;modules.<p>Rails is a great framework no doubt but advent of React&#x2F;Angular along with rise of microservice-oriented architecture has limited the footprint of rails in job market.
novonabout 6 years ago
Rails is awesome! We’re hiring Rails devs in 2019 for our startup in Seattle. We found a good balance of React and Rails. <a href="https:&#x2F;&#x2F;www.sharegrid.com&#x2F;careers" rel="nofollow">https:&#x2F;&#x2F;www.sharegrid.com&#x2F;careers</a>
rgloverabout 6 years ago
<a href="https:&#x2F;&#x2F;phoenixframework.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;phoenixframework.org&#x2F;</a> + <a href="https:&#x2F;&#x2F;elixir-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;elixir-lang.org&#x2F;</a>
rohan404about 6 years ago
Ruby on Rails out of the box gets a lot of bad rep for being slow and non-performant. Has anyone replaced MRI with JRuby or TruffleRuby to mitigate that? Were there any significant &quot;gotchas&quot; with integrating it?
评论 #19519012 未加载
评论 #19519383 未加载
kissgyorgyabout 6 years ago
Not sure why everybody nowadays rule out Rails (or Django) like frameworks. Not every web app need to be an SPA only! There are multiple kind of web apps which I would still start with Django today!
maxehmookauabout 6 years ago
8 years in to my programming career, I still LOVE Rails. No other framework I&#x27;ve come across lets me do as much quality work in a short space of time as Rails does.
foucabout 6 years ago
So what is the modern front-end equivalent to Rails or Laravel?<p>With clear outstanding options for authentication, image processing, and all the other bits that are commonly needed?
readittwiceabout 6 years ago
Ember? It&#x27;s supposed to be a Rails-like JS framework.
corditeabout 6 years ago
For those in the JVM world, is grails good to look into?
评论 #19518148 未加载
评论 #19520114 未加载
评论 #19519600 未加载
评论 #19519154 未加载
vasilakisfilabout 6 years ago
EmberJS with its addons is very similar to Rails productivity. React has some pretty good drop-in components as well, but mostly are related to UI.
sneakabout 6 years ago
from TFA:<p>&gt; <i>&quot;Now, I know Rails isn’t universally beloved by developers, and I’m not suggesting that we give up React and es7 and go back to writing server-templated web-apps like it’s 2012 again.&quot;</i><p>Why not, exactly? It worked well then and it works well now. Not everything needs to be some 10MiB javascript bundle delivered to a late-model version of Chrome served from a static bucket.
groundCodeabout 6 years ago
I think Rails is a good framework. What absolutely sells it to me is Ruby. I was a miserable C# developer. Now I’m a happy Ruby developer.
vmware513about 6 years ago
Actually, Ember.js gives you the same experience for frontend development than Rails for backend. So you can stay happy and productive. ;)
sandGorgonabout 6 years ago
There is opportunity for a rails like framework in Typescript and React Hooks which is server-side first. A lot of the js&#x2F;react frameworks are rich, client side ..which need a little more conceptual thinking than a server side rendered framework like rails (because you get into unnecessary complexities of API,graphql,her,etc).<p>The other thing that&#x27;s missing is db migrations - typeorm has decent migrations, so that can be leveraged.
asattarmdabout 6 years ago
I believe Firebase + React is actually that. Yes, it&#x27;s buying into a proprietary system, but it is so productive working in that. Database is taken care of, file uploads, authentication etc. are all taken care of.<p>It&#x27;s not comparable to Rails in that we can&#x27;t have plugins to install new things that work with the entire stack, but whatever we have initially is really good and I feel makes me very productive
joduplessisabout 6 years ago
There are tons of JS stacks that exist right now - Sails, Adonis, etc. - but I feel they all miss having a hugely profitable business using them in production. Rails had 37signals use it for all their products - along with having DHH too.<p>Right now you have FRAMEWORKS being used in production at big companies, so if you use React, Angular, etc. you know that you&#x27;re in good company. I think it would be super interesting having a large company roll out a full stack JS framework that they themselves use.
评论 #19519728 未加载
评论 #19521798 未加载
stonewhiteabout 6 years ago
This reminds me of the Rich Hickey keynote talk[1] at Rails Con 2012. Which boils down to: just out of sheer convenience you no longer own your code and, don&#x27;t make the easy choice, take your time and make the simple choice.<p>[1]: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=rI8tNMsozo0" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=rI8tNMsozo0</a>
b212about 6 years ago
As a front-end developer I hated Rails, every day was a struggle working with the project, it was so slow. It was around 4 years ago and I was using top of the line Macbook Pro.<p>Our project wasn&#x27;t badly written, it was just that slow. Is it better today?<p>I somehow ended up working with PHP-based back-ends but for smaller projects and I sometimes miss Rails, because Docker for Mac...
评论 #19518415 未加载
评论 #19518606 未加载
评论 #19518129 未加载
jaredcwhiteabout 6 years ago
Oh gawd, not another one of these articles. I appreciate what the author is trying to say, but the premise is just all wrong.<p>Repeat after me: Rails Is A Modern Web Stack. Seriously. You can do everything you might imagine needing to do for a modern web app:<p>Need an easy way to create server-side rendered (SSR) pages that still behave in a performant, snappy manner like all the cool kids? ERB + Turbolinks 5 is a powerful combo.<p>Need to ratchet it up a bit with dynamic interactivity? Slap some Stimulus on that SSR puppy!<p>Still not &quot;modern&quot; enough for you? Use React! Or Vue! Keep Rails operating just as a JSON-flavored REST API.<p>Need to push commands from the server to multiple clients at once? ActionCable to the rescue.<p>Need to offload long-running tasks to background jobs? ActiveJob + Sidekiq is the bee&#x27;s knees.<p>At any rate, plenty of us are developing &quot;modern&quot; web apps and sites using Rails, Webpack, and other cool frontend tools, and it&#x27;s going quite well. I don&#x27;t feel in the least like I&#x27;m missing out on something amazing or obvious by sticking with tried-and-true, stable tools that have been my bread and butter for 11 years and counting. DHH&#x27;s philosophy of web programming may not appeal to everyone, but for many of us, he continues to a voice of reason in an insane world.
randomacct3847about 6 years ago
You can use rails just as a backend. React, GraphQL, and Rails works fine from my experience
lgreggabout 6 years ago
I&#x27;m currently building an app using Webpacker and Rails 6 edge, it&#x27;s been great.
JakeWesorickabout 6 years ago
We use Rails with the GraphQL gem and React&#x2F;Apollo on the front end. Works great!
jbverschoorabout 6 years ago
I guess the number of comments show how much love rails is still getting
matchbokabout 6 years ago
Couldn&#x27;t agree more.
sgdesignabout 6 years ago
It&#x27;s still small but a &quot;Rails for JavaScript&quot; is exactly what we&#x27;re trying to build with Vulcan.js: <a href="http:&#x2F;&#x2F;vulcanjs.org" rel="nofollow">http:&#x2F;&#x2F;vulcanjs.org</a><p>Built with Meteor, React, and GraphQL.
djaouenabout 6 years ago
This: <a href="http:&#x2F;&#x2F;paulgraham.com&#x2F;avg.html" rel="nofollow">http:&#x2F;&#x2F;paulgraham.com&#x2F;avg.html</a> seems somehow relevant to this discussion.
monksyabout 6 years ago
I miss Grails.
pythonwutangabout 6 years ago
Try Django Rest Framework with React
kristianpabout 6 years ago
Looking for the Rails of the modern web stack? Try asp.net core api + AngularJS! &#x2F;sarcasm. Sigh.
评论 #19519382 未加载
bobblywobblesabout 6 years ago
I agree.
codesushi42about 6 years ago
I never liked Rails even when it was hip. Way too much bloat and magic behind the scenes, and also poor performance because of that.<p>I always preferred Flask, because it gave you a minimal framework, allowing you to cherry pick modules as needed. Sinatra looks similar if your preference is Ruby.<p>I cannot say that a Node stack is better though. Both Rails and Node are fairly awful, but for entirely different reasons.
评论 #19519024 未加载
评论 #19540228 未加载
black-teaabout 6 years ago
I learnt to program for the Web in the late 90s. I used perl and later php. I stopped in the early 00s because I found supporting IE6 was soul destroying. Much more recently I got into it again and saw things like Rails and Django and was amazed. It was like stepping in a time machine and seeing what I always thought web development should have been. But the whole node, react etc. model is nothing like that. It&#x27;s a regression as far as I can tell. It just makes everything more complicated for little benefit.