Live data from Hacker News

I Miss Rails

chanind.github.io

471–480 of 522 posts

Re: I Miss Rails

#471
post #386

Earlier quoted context omitted.

I know that it's 2008 calling, but seriously: when did Heroku, Github and the bundler/gem ecosystem stop qualifying as accessible? Deploying an MVP Rails app with sophisticated functionality is so effective that it still qualifies as erotic. For me, the most compelling example of progress coming from the JS camp was my shallow investigation of the Expo platform for React Native. It has some genuinely sexy developer e…

I've been trying to learn some Rails and it's not that simple. People tend to say just read Hartl which is 804 pages according to Amazon. It may seem simple once you are familiar with a few dozen gems, action this, active that but there are a lot of bits to learn about.

That book is long, not because rails is bloated, but because there are very in depth sections building things from scratch like authentication that in practice are solved by gems. They are important for beginners to learn but are rarely reimplement from scratch in rails projects.

Re: I Miss Rails

#472
post #419
post #372

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. 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…

You may gave gotten into Grails at a better time. I more recently attempted a project in Grails and it was a disaster. In fact it was my worst framework experience ever. Mainly because completely inadequate sources of information. Grails 3 had been released but the documentation was terribly incomplete so we had to spend a lot of time searching and about every bit of info we tried to look up returned results strictly…

I have used Grails since version 0.42 and I am a bit surprised to hear that the documentation has been incomplete. I have always found it very detailed, though sometimes lacking clarity as any framework documentation would have. Since the early days, the way you build Grails application has been almost identical to how you write and structure your code with the upcoming 4.0 release. Of course if you have used some plugins that has been unmaintained, that could have caused issues with upgrading. But otherwise I have had a great experience through Grails lifetime.

And if you really needed to get "out of Grails", there has never been an issue using the Spring MVC api or Spring Boot with Grails 3+

Re: I Miss Rails

#473
I take modern to mean: Using latest state of the art techniques to increase programmer productivity and happiness.

Rails is still the number 1 backend framework, and the RoR ecosystem is so powerful that the https://hyperstack.org 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.)

You get all the maturity of rails, including be able to use Rspec to test your server and client code in an integrated fashion.

Here is a blog post that shows how simply adding a 2 line AR model declaration adds data persistence, and push synchronization to a "client-only" app: https://medium.com/@mitch_23203/the-exact-same-app-in-hypers...

If that is not "modern" I don't know what is.

Meanwhile the rest of the world is writing tons of boiler plate, creating reducers, transformers, co-axial independent state repeaters, I don't know what all, but the bottom line is you have to write a ton of code to get anything done.

Re: I Miss Rails

#476
post #381

Earlier quoted context omitted.

It sounds like you're assuming the SSR is not well architected and then using that assumption to prove your point. It's pretty easy to have an API layer interal to your application -- have your view templates consume that API. No reason you have to have your view templates across the network, written in another language.

No, what I would say instead is that 90%+ of SSR apps aren't architected like that, so I would accuse you of the same thing: that you're using "well architected" to describe what's actually an exotic configuration that nobody refers to when they talk about SSR, basically creating microservices on localhost that hit your own network stack which is a premature abstraction for most cases that I thought you just got done…

Who said anything about microservices on the local network stack? You don't need to do that to separate the layers; just have them be separate logical layers in your application. This is common enough that I almost think we're talking about different things: people have written APIs and SSR apps for much, much longer than SPAs have been around.

Re: I Miss Rails

#477
post #345
post #202

Earlier quoted context omitted.

How many "quality of life" features does your website have that require some JavaScript that you end up writing as one off functions/endpoints/etc? (various kinds of autocompletion, live search, notifications, messaging, etc.) I'm all for server side rendering - I maintained several vanilla PHP/HTML/CSS websites in the 2000s, and only used jQuery sparingly when things grew in complexity. I later used Django for many…

I haven't developed any website but my server-side preference would definitely lead me to something that is always server-side-rendered. It's no surprise we all like HN, the experience definitely feels more than good enough. There was a standard ( https://tools.ietf.org/html/rfc3229 ) to diff pages so that only the delta would be sent to the browser. After that the only missing piece would have been that the browser…

I'm really only familiar with ASP.NET, but do other frameworks not include support for partial page rendering? The ASP.NET `UpdatePanel` is simple and even has gracious degradation. (If client doesn't support for whatever reason, it will just revert back to doing full page POST and refresh.)

Of course, this is just wholesale replacing a DOM subtree with another. But there's also probably some point where just parsing the new subtree is faster than attempting to create and apply a diff.

Re: I Miss Rails

#478

Earlier quoted context omitted.

Aren't your ActiveRecord models basically the only place in a Rails app where you do specify the types of your properties?

I'm referring to things like dynamic find_by_* messages since more people might be familiar with that. But I don't know why you'd say that. ActiveRecord models are one of the main places you'll see a bunch of `use SomeGem::Thing` that introduce a bunch of magic methods on model instances. And my point is that we aren't talking about method composition here that you can statically analyze with a bolted-on type system.…

I am a beginner. I don’t know enough to gripe, I bet that’s a common feeling among beginners.

Re: I Miss Rails

#479

Earlier quoted context omitted.

>Server-rendered used to mean slow and clunky I don't get why everyone keeps saying this. Is it because of WordPress? In 2005 I used my own MVC framework with ORM and stuff. It was written in PHP. My pages had the usual generation time of 0.03 seconds. And that was with no specialized caching or any crazy optimizations. Even with no AJAX, page loading seemed instant, unless you connected to the server from across the…

the lighter text means the post has been down voted correct? Why was the parent post downvoted then? They make a perfect point, there's nothing inherently slow about traditional web apps. There's definitely things regarding the UX that traditional server side web applications can't do vs browser side but they can be incredibly fast. one nit pick, what does "server-side rendering", and even "client-side rendering", ev…

Server side rendering means the server converts a template into a fully formed html page by pulling layouts and partials together, adding JS/css assets, interpolating dynamic sections with data from the database. The response to the browser is html ready to parse and display.

Client side means the layouts, templates, partials, components are on the client and are stitched together their. The server only send data and the client app handles interpolation and generating the html.

Re: I Miss Rails

#480

Earlier quoted context omitted.

why is async everything a strength? I find it an unnatural way to think about coding, just like threading. Sure if performance absolutely requires it I'll start using threading, but why do it by default? A strength, in my eyes, is simplicity. What's simpler than a code that runs sequentially?

Node is single-threaded + async-everything which gives you simple concurrency with the async/await abstraction. It's these there things that come together to make building async apps simple. For example, I went out of my way to avoid Node before it had promises and async/await, and that seems to be the Javascript most HN users remember. Concurrency in this situation almost becomes free at the expense of changing user…

Javascript is good for async code, still not sure why this is a great thing by default. It's nice when you want to write async code, do you always want to write async code? For most web apps I've seen you simply don't need to write them in such a way. Blocking IO will switch to a different thread in most ruby web servers anyway.
Post reply on HN