Live data from Hacker News

Drop jQuery as a dependency from Rails

github.com

71–80 of 123 posts

Re: Drop jQuery as a dependency from Rails

#71

Earlier quoted context omitted.

Rails philosophy is a full stack framework. Not having to make decisions about your first web app is a huge draw to the framework.

> Rails philosophy is a full stack framework. Not having to make decisions about your first web app is a huge draw to the framework. But you still have to make a lot of decisions. How do you handle user management ? ACL in a Rails app ? AFAIK Rails doesn't come with a default solution to these problems. What do you think is more important for an application ? User management or turbolinks by default ? The former woul…

This is interesting, the problems you're describing are exactly the ones I want to take care of implementing myself. I don't want built-in user management - the way I want to handle users will more than likely vary between projects. I'd rather worry about the implementation of the app than stitching together frameworks to start out. I can go from `rails new appname` to having a working blog in about 15 minutes, which is an awesome way to start a project. Get it working, then worry about whether you want Turbolinks or not. Because starting out, Turbolinks and jQuery are Good Enough™ to get most projects going.

Re: Drop jQuery as a dependency from Rails

#72

Earlier quoted context omitted.

Sure, DHH said it himself. Rails is for basecamp like apps. Whats the deal?

But is it "for Basecamp like apps". Or is it "for the Basecamp app"? I honestly can't believe a back end framework has minimum supported browser requirements that are basically "use the latest or GTFO".

It is for "most web apps" because most web apps are like basecamp, and it isn't "use the latest or GTFO". It is "use the latest by default or add a single line to your gem file if you want to support older browsers."

Most web apps are only tested on the latest browsers anyway, even if they claim to support older browsers. This is true unless you have a very popular app and a very large team.

Re: Drop jQuery as a dependency from Rails

#73

Earlier quoted context omitted.

Sure, DHH said it himself. Rails is for basecamp like apps. Whats the deal?

But is it "for Basecamp like apps". Or is it "for the Basecamp app"? I honestly can't believe a back end framework has minimum supported browser requirements that are basically "use the latest or GTFO".

It doesn't. jquery-ujs will still be there if you want it, but depending on jquery brings along a lot of baggage along with the legacy browser support it allows. This discussion is just about what the default should be, and I don't think its unreasonable these days to aim for modern browsers as a default for most sites.

Re: Drop jQuery as a dependency from Rails

#74
post #18

I never understood why rails has javascript helpers at all. It just does not bring any value in the long run, just complicates stuff. Rails should be js libraries agnostic and not provide any js related helpers out of the box in my opinion.

data-method is probably the biggest reason why. When your biggest auth library (Devise) makes logging out, one of the most common actions you'll add to an app after signing in, a DELETE request, then having a quick one-attribute means to provide that link is very valuable to have.

Re: Drop jQuery as a dependency from Rails

#76

There was an article about a week ago that makes the claim that Rails is tailor-made for Basecamp. This single comment absolutely confirms that point of view: https://github.com/rails/rails/issues/25208#issuecomment-222...

Lots of websites have those browser requirements. Many of them aren't written in Rails. Care to explain your "absolutely confirms" logic?

Re: Drop jQuery as a dependency from Rails

#77

Omakase implies a certain level of excellence in all the individual choices. I believe Rails is In-N-Out Burger. While it offers few choices, it's reliable and the hamburger is very good. The fries and frontend framework are acceptable but no one goes to In-N-Out for the fries.

Animal Fries tho

inb4 dang comes and kills the fun

Re: Drop jQuery as a dependency from Rails

#78

Omakase implies a certain level of excellence in all the individual choices. I believe Rails is In-N-Out Burger. While it offers few choices, it's reliable and the hamburger is very good. The fries and frontend framework are acceptable but no one goes to In-N-Out for the fries.

Animal Fries!!!

I'm not anywhere near an In-and-Out right now but I did learn: A) they have a secret menu, B) Animal fries look delicious[0].

[0] http://hackthemenu.com/in-n-out/secret-menu/animal-style-fri...

Re: Drop jQuery as a dependency from Rails

#79

Earlier quoted context omitted.

But is it "for Basecamp like apps". Or is it "for the Basecamp app"? I honestly can't believe a back end framework has minimum supported browser requirements that are basically "use the latest or GTFO".

It is for "most web apps" because most web apps are like basecamp, and it isn't "use the latest or GTFO". It is "use the latest by default or add a single line to your gem file if you want to support older browsers." Most web apps are only tested on the latest browsers anyway, even if they claim to support older browsers. This is true unless you have a very popular app and a very large team.

> Most web apps are only tested on the latest browsers anyway

I've worked in web/related fields for about 10 years now, and I've never worked on a project where "fuck it, the latest will do" has been acceptable.

Re: Drop jQuery as a dependency from Rails

#80
post #36

Rails should stop messing with Javascript all together. Drop JQuery, CoffeeScript, TurboLinks and what not and let the users decide what to use, make it optional. Rails shouldn't require a JS engine in order to run.

Rails is a full-stack framework. One of its strengths is that out of the box you have everything there - database integration, http layer, also JavaScript. Having said that - you have a choice. Rails is about defaults. By default it gives you jQuery, CoffeeScript and TurboLinks, but you don't have to use it at all. I've built a number of Rails apps and most of them use CoffeeScript, but don't use TurboLinks. It took…

First thing I do when creating any Rails app is take out Turbolinks. It's like autopilot.
Post reply on HN