Live data from Hacker News

Trailblazer: A new architecture for Rails

github.com

41–50 of 53 posts

Re: Trailblazer: A new architecture for Rails

#41
post #38

You have my compliments and respect for undertaking an endeavor like re-thinking (and actually implementing!) rails architecture, so my apologies if my comments sound harsh or cynical. (I just want to talk about it) I'm having a hard time understanding the need for this, especially because I'm highly suspicious of building any significant amount of abstraction on top of rails. This is because rails core is fucking in…

", so my apologies if my comments sound harsh or cynical."

While in fact you don't mean them to _just_ be harsh or cynical, but you also want to personally insult the OP and make him feel bad about posting something.

'Apology declined' I would think.

Re: Trailblazer: A new architecture for Rails

#42
post #9

I like that Trailblazer is promoting some concepts I'd like to see more rails devs use (service objects, form objects), I think this project will be a non-starter for most teams. But after giving the readme a once over and looking at the source code a bit, here are the concerns I would raise: 1. What advantage does this have over using the components it's wrapping? Why not just use the reform or representable gems di…

I've not used trailblazer myself but I've utilised some of the concepts or similar ones on existing projects and green field projects.

I think the answer to 1. would be hard to express without getting deep into a specific complex application and most people don't want to open source their business applications, especially not as an example of bad code. It would be awesome if someone refactored a typical problematic large Rails app in the open using these concepts. But it's a lot of work/risk just for the greater good.

2. I'd suggest that the newer devs are going to find it easier navigating a clean codebase (with architectural complexity) than a well established Rails app with a lot of the code smells and complexity that come with going The Rails Way.

Re: Trailblazer: A new architecture for Rails

#43
post #39
post #38

You have my compliments and respect for undertaking an endeavor like re-thinking (and actually implementing!) rails architecture, so my apologies if my comments sound harsh or cynical. (I just want to talk about it) I'm having a hard time understanding the need for this, especially because I'm highly suspicious of building any significant amount of abstraction on top of rails. This is because rails core is fucking in…

Don't be an asshole man, the guy made a framework, the readme is plenty fine, and he has a nice book to sell with it. How are you so self-righteous to judge how other people should run their open source software project? How do you feel so entitled that you should get everything this guy makes for free? He is just asking for you to consider buying the book he spent a lot of effort into writing. BTW, what's up with th…

Sorry...just been annoyed at rails lately, was drunk reading through here, and wrongly took out my personal frustrations as a diatribe against the author. I'm an asshole.

Re: Trailblazer: A new architecture for Rails

#44
post #32

From the sample chapter: "Some charismatic leaders in Rails core dislike encapsulation. The Fear Of The Class, the freedom of a dynamically typed programming language and the strong will to make it different to Java and its “over-abstraction” has led a generation of developers to unlearn what object-orientation really is about - and neglect this ingenius concept." I've had similar thoughts myself. It's almost as if,…

This is purely intentional criticism, you don't need a different framework on top of Rails to practice object oriented development.

Enterprise Java hell lives on for many developers in the world.

Re: Trailblazer: A new architecture for Rails

#45
post #9

I like that Trailblazer is promoting some concepts I'd like to see more rails devs use (service objects, form objects), I think this project will be a non-starter for most teams. But after giving the readme a once over and looking at the source code a bit, here are the concerns I would raise: 1. What advantage does this have over using the components it's wrapping? Why not just use the reform or representable gems di…

What advantage is there to form objects?

Re: Trailblazer: A new architecture for Rails

#46
post #43
post #39

Earlier quoted context omitted.

Don't be an asshole man, the guy made a framework, the readme is plenty fine, and he has a nice book to sell with it. How are you so self-righteous to judge how other people should run their open source software project? How do you feel so entitled that you should get everything this guy makes for free? He is just asking for you to consider buying the book he spent a lot of effort into writing. BTW, what's up with th…

Sorry...just been annoyed at rails lately, was drunk reading through here, and wrongly took out my personal frustrations as a diatribe against the author. I'm an asshole.

Thanks for setting it right :)

Re: Trailblazer: A new architecture for Rails

#47

Earlier quoted context omitted.

JSON rendering performance is a major concern for most of my Rails apps, and I'm wondering the same thing. I've not used Roar ( https://github.com/apotonick/roar ) before which is what Trailblazer uses for JSON serialization/deserialization. It seems to be full-featured, but I'm interested to hear how it performs compared to other gems. I currently use OJ + Jbuilder + a ton of fragment caching and it's not great but…

> JSON rendering performance is a major concern for most of my Rails apps I've always wondered why this is the case. Faster JSON libraries don't seem to help. Similar frameworks don't have this problem. It just seems the Rails serialization code is slow in and of itself, it's not what it calls out to. Maybe there's a contention issue somewhere?

There have been some historical issues that should have been sorted out in more recent releases. The TL;DR is that Rails wouldn't actually use your faster gems, even if you thought it was. See https://github.com/rails/rails/pull/12183 for the work that was done to improve this. There was another issue too that detailed the specific problem, but I can't find it right now.

Re: Trailblazer: A new architecture for Rails

#48

Earlier quoted context omitted.

it's useful in practice for denoising file names. unfortunately rails doesn't do this at all, and every controller file is something like `app/controllers/foo_controller.rb`. in Python, if you had a file `app/controllers/foo.py` you'd be able to `from app.controllers import foo`, which is more useful and does an equally good job of declaring the file is a controller without having to write `_controller.rb` every time…

Or you would just use the class because it's already in the autoload paths. Seeing a lot of opinions from people who don't actually seem to use rails.

au contraire. I have worked on what I suspect is one of the largest Rails apps out there. autoload has been off for a long time (along with many other "convenient" features) for performance reasons.

that's beside the point though, because if you're outside the Rails world you will have to type the whole name of the file if you want to do something with it.

Re: Trailblazer: A new architecture for Rails

#49
post #9

I like that Trailblazer is promoting some concepts I'd like to see more rails devs use (service objects, form objects), I think this project will be a non-starter for most teams. But after giving the readme a once over and looking at the source code a bit, here are the concerns I would raise: 1. What advantage does this have over using the components it's wrapping? Why not just use the reform or representable gems di…

Yeah boy, that's the spirit! Everything is an object! As in... ummm, kingdom of nouns, yeah that one.

Re: Trailblazer: A new architecture for Rails

#50
post #17

This "architecture" changes so much about Rails that I don't know why it's trying to build on Rails at all. If you don't like the Rails Way, just create another framework.

as much as I don't want to quote dhh about anything: http://david.heinemeierhansson.com/2012/rails-is-omakase.htm... in short, since Rails 3 there is no "Rails Way"

That's just PR.
Post reply on HN