Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think the main Thing here is that Rails is the de facto standard, the 'golden hammer' of Ruby based apps, and there is no space - or developers - for alternatives.

The JS ecosystem as we know it today started years after Rails (Rails was 2004, Node's oldest version on their releases page is from 2011), and only really took off after NodeJS came to prominence with frameworks like BackboneJS, Angular, then React and the rest in the early 2010's, and it went along with Github and the emergence of everyone and their dog building libraries and frameworks.

The attitude was different; instead of big opinionated but inflexible frameworks, people wanted to pick and choose. This was exacerbated by React that emphasized NOT being a framework but just a rendering layer.

Pick ANY one-size-fits-all framework in the JS space and you will see "bad" decisions that people don't like.

The closest thing to a full JS framework at the moment is probably Angular, which feels bloated and overly complicated (annotations, component / folder structure / file naming) or Express (stringly typed? I haven't looked at it in forever).



The dominance of Rails for its use case within the field of Ruby is is only one half of the equation. The other half is that Ruby has mostly collapsed into Rails, there's not much Ruby happening outside of Rails. This could never happen with a js framework of similarly scope, because all the other js use cases won't go away. One example of such a thing that won't go away is doing client-side stuff in the scope of a Rails protect. JS would have to lose a lot before it could achieve similar focus.


Ruby is a wonderful language for other things outside of Rails. I'm old. I've done csh, bash, perl, tcl, and python for scripting and miscellaneous programs. Since discovering Rails, I use Ruby for basically everything now. The only miss I've had in recent memory has been needing to do heavy statistical work with R for speed reasons, but, then, you're not going to do that in JS (or anything else) either.


As someone who has used Ruby as my main language at a number of companies for the last 17 years and deeply dislike Rails and rarely use it, I couldn't disagree more.

Rails draws the attention, but there's plenty other uses.


That's interesting to hear, I would have guessed that Python had long won everything that could be ruby but isn't rails. Clearly, nothing will stop the inertia of someone who just happens to be productive through experience (you can probably find works-for-me wizards for almost anything, perhaps not for vba or ada but I wouldn't bet on it).

Is there much happening in terms of libraries outside the rails scope or is it more a case of one less thing to worry about once you've become good with the batteries included?


Thor is gorgeous for command line apps. http://whatisthor.com/

Capybara is fantastic for automated testing

https://github.com/teamcapybara/capybara.

Gosu for 2d Games:

https://www.libgosu.org/

Example 2d game with Gosu:

https://github.com/victords/super-bombinhas

CRuby will be in browsers!

https://bugs.ruby-lang.org/issues/18462


Thor looks great! I'd be surprised if something similar didn't exist for most languages, but with many of them living in obscurity because discovery is so hard without a well-established name for that class of tool. Some googling for "CLI framework" led me to oclif ("Thor for js"?) and to https://www.nexmo.com/legacy-blog/2020/06/12/comparing-cli-b... , but that can't be everything.

PS: https://github.com/shadawck/awesome-cli-frameworks also lists some for go and rust, getting there! (though most probably not half as complete as Thor, self-documentation should definitely be a first-class citizen!)


I rarely find an area where I've needed libraries and there haven't been decent stuff available in Ruby other than when doing quite esotheric stuff (e.g. there's no good low level X11 client implementation for doing raw X11 stuff). Often multiple competing projects.

E.g. for ORMs ActiveRecord which is Rails default is in my opinions nowhere near good enough compared to e.g. Sequel, and there are several others.

Sometimes those projects involve wrapping stuff - including Python - or porting Python, but most of what I use is pure Ruby.

With respect to Python, to a lot of the Ruby community Python is in many ways the antithesis of what we want in a language. Python looks horrendous to me. It matters - I stare at code most of my day. If I were to switch languages, Python wouldn't make the shortlist even. It's not that I think Python is objectively worse, but subjectively to me it's unreadable and messy and I can afford to avoid using it most of the time.

EDIT: To expand on some of what I use or have used Ruby for: web dev with Sinatra and Padrino (my main reason for avoiding Rails here is that most of what I do is mostly API driven, and because I prefer Sequel as the ORM), financial modelling (I work for a VC), my text editor of the last few years is written in Ruby (but not packaged up to be useful for others yet - I'm gradually splitting parts of it out into gems, though), DevOps by generating terraform, service orchestration (proprietary pre-Kubernetes orchestration of containers and vms across on-prem, colocated, managed servers and VPSs split between openvz, docker and KVM), system to auto-deploy replicated sets of Postgres servers with logs and backup dumps automatically distributed to a Ruby storage service (pre-RDS, and running on the aforementioned orchestrator), PDF generation, messaging middleware, scraping, large scale crawlers, trading bots. And many more.


I think this is "the" correct analysis.

Rails has a clear one way to do things because there are no/few other options because everything else has withered away.

To put this another way: to have a convention in JS, just pick a convention, and now at least you have a convention, even if everyone else has their own.


It’s not really true that there are no other options for web development in ruby.

Roda[1], for instance, has a strong following for API work.

It’s just that Rails is a safe choice. It’ll will work fine for small teams and it will scale to the size of github when/if you need it.

1. http://roda.jeremyevans.net/index.html


When I develop web apps for Ruby, I use Sinatra or pick and choose parts of Padrino. There's a dozen other alternatives to Rails.

There's plenty of space.for alternatives. But Rails is good enough for those who are happy with a hammer, and so it's what gets talked about the most.


The default Angular structure is pretty verbose, but it's just TS, you can put the files anywhere. Also it seems many people prefer the Vue-style single-file components: https://muhimasri.com/blogs/how-to-create-a-single-file-comp...


It always gets me abit, angular is called bloated however all the react/vue applications i have worked with have been bloated by shitty packages left and right to fix problems that never existed in angular, im probably just to old or what not but i dont find the configuration bad since you can always figure out what went wrong, that is not the case on react/vue unfortuenately, it ends up being very opinionated by the last dev that took charge, and the endless refactors of architecture because now there is a new way of doing it..


> The attitude was different; instead of big opinionated but inflexible frameworks, people wanted to pick and choose.

I enjoy working with Node and JS, but this IMO is what contributed to the fragmented node ecosystem where you have 100 different npm libraries that do the same thing and reinventing the wheel is rampant




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: