Live data from Hacker News

Ruby Web Dev The Other Way

rwdtow.stdout.in

1–10 of 65 posts

Re: Ruby Web Dev The Other Way

#3
I'm not going to be able to comment on everything on this article and it is indeed a wonderfully put together resource, but I must say that I tend to disagree with the over-all premise. Yes, if you are a first time or beginner developer Rails can be overwhelming and you will learn a lot more by using a smaller framework such as Sinatra.

On the other-hand if you are undertaking a medium to large scale project (and not a micro-service), you probably want Rails. With Rails you have the benefit of a complete package of libraries that work out of the box and are quite extensively tested. I can almost guarantee everything else will cause you more pains, subjectively, if you really dislike the Rails style, it may be worth it.

I also have a minor quibble with the suggestion that multi-level delegation is a good coding pattern - it is a terrible pattern! Have you ever tried to find the function you need through 3-4-levels of delegation when everything extends 5-10 different concerns? I'd much rather read - `self.parent_objects.children.function_name` in my code than `function_name` and then spend time searching where the later came from.

Re: Ruby Web Dev The Other Way

#5
I agree with the Manifesto. I've been using Rails professionally for 6+ years and the magic still causes some confusion. The Rails ecosystem provides so much out of the box and so many answered questions on Stack Overflow and Google it would be a constant uphill challenge to go against that flow.

I'm looking forward to moving to Elixir and Phoenix which seems to embrace the less magical, more explicit manifesto while also being the accepted solution in that domain.

Re: Ruby Web Dev The Other Way

#7

I'm not going to be able to comment on everything on this article and it is indeed a wonderfully put together resource, but I must say that I tend to disagree with the over-all premise. Yes, if you are a first time or beginner developer Rails can be overwhelming and you will learn a lot more by using a smaller framework such as Sinatra. On the other-hand if you are undertaking a medium to large scale project (and not…

If you have "self.parent_objects.children.function_nam" in your code base is a demeter violation (which I like to see as yet another code smell rather than a law or rule) that is telling you that you are probably missing a domain model. Mixins don't solve that either but hide the smell from you.

Re: Ruby Web Dev The Other Way

#8

I'm not going to be able to comment on everything on this article and it is indeed a wonderfully put together resource, but I must say that I tend to disagree with the over-all premise. Yes, if you are a first time or beginner developer Rails can be overwhelming and you will learn a lot more by using a smaller framework such as Sinatra. On the other-hand if you are undertaking a medium to large scale project (and not…

If you have "self.parent_objects.children.function_nam" in your code base is a demeter violation (which I like to see as yet another code smell rather than a law or rule) that is telling you that you are probably missing a domain model. Mixins don't solve that either but hide the smell from you.

his whole point was that without the smell, there isn't even a hint where the source is.

Re: Ruby Web Dev The Other Way

#9
Good work!

On some work projects I've gotten a lot of mileage out of breaking with the traditional Rails patterns in favor of stuff like `Operation` objects. Too bad I didn't know about Trailblazer!

I also agree about Rails making excessive use of Ruby magic. Just because it's possible, doesn't mean you should do it.

Regarding non-ActiveRecord models, I use Sequel[1] exclusively at work - in addition to being decidedly less magical, it has wonderful support for most Postgresql specific features.

I'll be consulting this in the future before embarking on new Ruby adventures.

[1] http://sequel.jeremyevans.net/

Re: Ruby Web Dev The Other Way

#10

I'm not going to be able to comment on everything on this article and it is indeed a wonderfully put together resource, but I must say that I tend to disagree with the over-all premise. Yes, if you are a first time or beginner developer Rails can be overwhelming and you will learn a lot more by using a smaller framework such as Sinatra. On the other-hand if you are undertaking a medium to large scale project (and not…

Counterargument: nearly every medium-large scale project I've seen in Rails ends up full of mismatched idioms and confused usage of Rails core utilities and just general jankery.

Also, Rails 5 is not Rails 4 is sure as hell not Rails 2--as the framework has matured, it's gotten less and less accessible to beginning devs, and has developed a jargon and mindset that sheds very little light on how the Web works under the covers and magic.

Starting with Sinatra or similar and building out and up is a much better way to end up with a real understanding of what's going on.

Post reply on HN