Live data from Hacker News

Ask HN: What do you want to see in Rails 4.1?

news.ycombinator.com

71–80 of 94 posts

Re: Ask HN: What do you want to see in Rails 4.1?

#71

Earlier quoted context omitted.

With 4.0 we included app/concerns, so that should help open up your conversations a bit.

Concerns are just geography, they do nothing to encourage single responsibility or domain design. [edit: rereading the parent, your reply was to where to put the code, and app/concerns is as good a place as any I guess, but I stand by the idea that concerns themselves are a bad idea.]

app/concerns is a perfect example of the problem I'm trying to communicate. If I want to extract code out into a concern, everyone is perfectly ok with it because Rails has "blessed" the concern pattern by providing a parent object to inherit from and a directory where concerns should be placed. As soon as Rails weighs in with an opinion, everyone is onboard.

I think the message I would like to see communicated is that we as developers are free to create app/foo if we feel like foo is a good idea. Technically there's nothing stopping it. Culturally, it's almost unheard of.

I brought up lib/ because structurally it is a free for all. Nobody looks twice if I create lib/foo and add some code there. The problem is that I don't want to put app specific code into lib. I'm not sure if app/lib is a good idea, but I feel like it would communicate the idea that it is OK to write app specific code that doesn't fit into anything Rails has approved.

Anyway, I realize my concern is very much a culture issue. That culture has its pros and cons, and if we didn't have the strong opinion to stick to MVC, we would probably end up with a ton of spaghetti code in app/lib. I just wish we could strike the right balance.

Re: Ask HN: What do you want to see in Rails 4.1?

#72
post #39

* Improved migration format: make it possible to create new initial migrations as a project evolves by rebasing. Meaning there's no need to keep or execute the whole migration history every time. On my current project running migrations from starch takes 30mins :( * Improvement in performance in regarding to JSON generation or other thing is always welcome. following benchmarks can be taken as reference where rails s…

The oj gem helps json generation a ton. The circular reference checks are still slow though.

In my tests, serialization to a hash before oj writes it out to json is the slowest part. Doing 1000 records (~30 entries each, some with nested entries) to json via OJ and as_json results in less than 20% spent in OJ and the other 80% in generating the hash.

Re: Ask HN: What do you want to see in Rails 4.1?

#73

What do you think about integrating https://github.com/charliesome/better_errors directly into rails?

It's a super neat gem. Improving error pages is always a good idea, I'm actually really happy with the relatively minor changes we added in 4.0, so I could totally see this or something like it, thanks.

I always wished Exceptions captured variable values so I could log them and not have to reproduce a bug in order to see what happened. To that end, I made https://github.com/ericbeland/exception_details. Perhaps Rails exception logging could include logging variable values at exception-time?

Re: Ask HN: What do you want to see in Rails 4.1?

#74
I'm still new to rails but I would really like to see:

- Something like spring ( https://github.com/jonleighton/spring ) built in because I use a low end machine and it still takes 5-6 seconds just to see a page refresh with live reloading enabled in my browser with nearly an empty project in terms of complexity. It would be nice to have it somehow work for tests and near instant code reloads for development.

Random question on queues: Will they be just as good (easy to use / efficient) as resque?

Re: Ask HN: What do you want to see in Rails 4.1?

#75

I'm still new to rails but I would really like to see: - Something like spring ( https://github.com/jonleighton/spring ) built in because I use a low end machine and it still takes 5-6 seconds just to see a page refresh with live reloading enabled in my browser with nearly an empty project in terms of complexity. It would be nice to have it somehow work for tests and near instant code reloads for development. Random…

Spring was made by a core member, there is also rails/commands. You might see this feature or not...

Queues will be an interface for things like Resque to implement, not an implementation itself. I maintain Resque too, it'll be a good story to use the two together.

Re: Ask HN: What do you want to see in Rails 4.1?

#80
Thanks for putting this together Steve. Your work, and those of the Rails contributors is amazing stuff. I know this past year has been a pain from a security perspective but as a framework matures and adds n+ features, it is an inevitable outcome.

For me, my wish list would be:

- Down with helpers. Or, at least the ability to arbitrarily set them. Maybe push presenter as alternatives?

- Some native performance tuning/testing/reporting would be awesome. Gems like rack-mini-profiler and ruby-prof are great, but a near-native tool, opinionated at that, would be awesome.

- I personally love the decorator pattern that gems like Spree use. Unfortunately (and maybe this is my own failing), eval'ing filters/callbacks is a big pain.

- As mentioned in another comment, the env specific configuration provided by figaro is awesome and should be native in Rails. Specifically, it might be a welcome alternative to the secret_token issue.

- Most deployment tools (Capistrano/Mina) enforce a different folder structure. It might be helpful to include some of them by default, or provide configurable options/symlinks that will work out of the box.

I have a lot more items on my list but those are the top items that I can think of at the moment.

Post reply on HN