Live data from Hacker News

I Miss Rails

chanind.github.io

501–510 of 522 posts

Re: I Miss Rails

#501

It took me a long time to learn rails, it'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 i…

When I first looked into Rails I ended up learning Ruby because it was so fun but Rails was overwhelming. After I got Ruby I found sinatra and my fascination to use Ruby for the Web was finally born. After that I discovered Padrino. Essentially sinatra packed with a ORM and backend.

When I then looked into Rails again (years later) everything felt so natural and right suddenly. However beginner documentation also got a lot better so this was surely part of it.

Re: I Miss Rails

#503
post #78
post #45

I personally don't missed Rails mostly because boilerplate doesn't really bother me. I'm more afraid of using the wrong abstraction. Rails (v4 was my last experience) was hard for me and I think my reasoning is as follow: - 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…

> MVC is a 20 year old pattern More like 40; it's from late 70s Smalltalk.

Indeed. The original paper is still well worth a read:

http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html

Re: I Miss Rails

#504

Earlier quoted context omitted.

Let’s talk in 6 months as those packages evolve and diverge. While rails core team does the work of maintaining all the packages as a consistent whole.

Sure. This is both sides of a coin. Or we get freedom and take care for it with responsibility, or we're stuck inside a box.

You can’t “take care of it with responsibility” if you have a lot of dependencies since you don’t control the library’s maintenance, or how it evolves with other libraries. So then you have to chose between adding dependency (with very real maintenance downsides) vs writing things yourself and reinventing things that should be solved.

Further, being stuck in a box also means that the community can rely on that very box and add more extensions with the architecture of the box in mind. A box gives assumptions to build on top of. Sure if you really really need a triangle it’s painful, but then you should ask, do I really need a triangle?

I think the real insight of DHH is that most web apps are not as “unique” as developers would like to believe and that the harmony that comes with conventions, the speed that comes with a unified end to end integrated system, and the focus developers gain for actual impactful choices when many unimportant choices are made for them is an amazing improvement.

He said recently, that insight is as controversial today as when he launched rails, and he is surprised more rails competitors haven’t emerged.

I think the first end to end GraphQL > Single Page App framework that has a similar level of integration to rails will dominate.

Re: I Miss Rails

#505
post #57
post #46

Earlier quoted context omitted.

Django has multiple good asset handling libraries. I like https://django-pipeline.readthedocs.io/ . And with django-channels ( 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.

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

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

Re: I Miss Rails

#506
post #412

Earlier quoted context omitted.

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

Is Redis the bottleneck?

Nope it was Ruby / Rails itself.

Re: I Miss Rails

#507
post #505
post #57

Earlier quoted context omitted.

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

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

It'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.

Re: I Miss Rails

#508
post #60

There is a universe where there exists only 1 programming language and only a single web framework. That would be cool to experience.

There are many languages that work on both client and server. Most obviously JavaScript/Typescript, but also Scala and Clojure. If webassembly really takes off you can add Rust to this list. I'm not sure how a combined framework for server and client side would work.

Checkout https://hyperstack.org Single framework client and server. Programming in Ruby both sides.

Re: I Miss Rails

#509

If I understand the situation correctly: Rails applications benefit from batteries included boilerplate because Rails "owns" the whole stack. "Modern" (contemporary?) JS applications benefit from separation of concerns, and flexibility because each layer is interchangeable. So how do we make this better? We can't reasonably split Rails up to match the benefits of JS. The obvious (naive?) solution is to provide a prot…

I'm sorry but I am saying this all over the place on this thread. https://hyperstack.org is a logical successor to meteor but it uses Ruby (instead of JS) and Rails on the backend. However its a complete integrated isomorphic stack.

Re: I Miss Rails

#510
post #176

Earlier quoted context omitted.

Agnostic of stack, SPAs provide a clear separation of concerns. The api layer is responsible for transforming data between the client and controlling access. The client is responsible for presenting the data structures provided by the api to the user, and turning user inputs into data structures that the api can consume.

I feel like this line of thinking is very analogous to the whole microservice craze -- you shouldn't need to introduce a network boundary to write well architected software. There's no reason you can't have a clear separation of concerns in a server side rendered application.

I agree 100%... The network boundry is in fact arbitrary. There are all sorts of similar hardware boundries in any computer system which we trust the OS, framework, language, etc to abstract away for us. For example how often do we think about where an Array is stored? It could anywhere from Highspeed cache to swapped out on disk. Likewise the client-server boundry for most of coding should be invisible.
Post reply on HN