jScript framework?

newbie disclaimer - i have yet to even start using RoR…

hello all - i am getting ready to start looking into RoR and was
wondering about how various (and many) jScript frameworks might tie into
RoR.

particularly, i was interested in google-AngularJS, probably because i
notice that google has thrown its mighty weight behind it.

i also saw there was a coffeescript, backbone.js, and a couple dozen
others.

is there one jScript framework that plays best with RoR? is using two
different frameworks counterproductive ?

being the idiot newbie that i am, i am surprised that RoR has not
partnered up with a jScript framework!

Since Rails 3.1, jQuery is the default javascript library. Prior to
that
it was Prototype (although jQuery was still an easily configurable
option).
The addition of any other js libraries or js development frameworks is
pretty easy.

I wouldn’t call using multiple js libraries as counterproductive but
would
need a really good reason for doing so since jQuery is pretty robust.

On Oct 30, 2013, at 8:12 PM, mark edwards [email protected] wrote:

others.

is there one jScript framework that plays best with RoR? is using two
different frameworks counterproductive ?

being the idiot newbie that i am, i am surprised that RoR has not
partnered up with a jScript framework!

Really mixing things up here:

Im just going to assume when you use the term ‘jScript’ you just mean
“JavaScript”. If you meant some sort of weird Microsoft thing, then I
dont know.

As was mentioned, RoR ships out of the box with support for jQuery
library (not a framework!). Mixing libraries is not usually a good
thing to do.

There are also frameworks, but Rails doesnt have an opinion on these,
which it really shouldnt:

  • Backbone.js
  • AngularJS
  • EmberJS

Coffeescript is an advanced dialect of JavaScript that is much more
object-oriented, and (I think) easier to write.

What plays best is often a matter of client-side application
architecture, how you want to approach things, and how much of an
opinionated framework you like to work with. Angular is certainly a
viable option. Writing your Angular code in Coffeescript and placing it
in the app/assets/javascript/ folder will make Rails very happy.