Jump to content

The ultimate community for Ruby on Rails developers.


Photo

AJAX in a Rails application

rails ajax

  • Please log in to reply
4 replies to this topic

#1 lpcarignan

lpcarignan

    Passenger

  • Members
  • 3 posts

Posted 21 April 2014 - 12:01 AM

Hi all,

 

I wanted to get the overall feeling of this community with using AJAX in a Rails application. While I have found it very easy to learn Rails in the past week, each time I hit the topic of AJAX, it gets complicated. The tutorials are either old or badly written.

 

Would this community recommend that I should stay away from AJAX when building a web application with Rails?

 

I case you don't object of using AJAX, would it be possible to point me towards a tutorial that isn't oudated?

 

Thank you,

 

Louis-Philippe



#2 Ohm

Ohm

    Driver

  • Moderators
  • 468 posts
  • LocationCopenhagen

Posted 24 April 2014 - 10:55 AM

I would definitely not recommend that you stay away from AJAX.

 

AJAX is the "new" stuff. It's here to stay and here to be used. I'll try and dig up some newbie guides if I can.


  • Jamie likes this

Blog: http://ohm.sh | Twitter: @madsohm | Work: Lokalebasen.dk


#3 renoldscott

renoldscott

    Passenger

  • Members
  • 6 posts
  • LocationUSA, NY

Posted 30 April 2014 - 10:01 AM

I agree with Guard.


From User Interface Design and Coding Services at whitepaperit.com


#4 danbys

danbys

    Passenger

  • Members
  • 2 posts

Posted 05 May 2014 - 08:01 PM

My recommendation is to keep your app as simple as possible. Stay away from AJAX unless you really need it.

 

If your app require AJAX, JavaScript is what you need to look into, Rails have little to do with the topic. Find a JavaScipt framework, JQuery is the most common JavaScript framework among Rails apps.

 

Good luck!

/Dan



#5 Lauree

Lauree

    Passenger

  • Members
  • 6 posts
  • LocationNew York

Posted 09 May 2014 - 04:36 AM

Hi all,

 

I wanted to get the overall feeling of this community with using AJAX in a Rails application. While I have found it very easy to learn Rails in the past week, each time I hit the topic of AJAX, it gets complicated. The tutorials are either old or badly written.

 

Would this community recommend that I should stay away from AJAX when building a web application with Rails?

 

I case you don't object of using AJAX, would it be possible to point me towards a tutorial that isn't oudated?

 

Thank you,

 

Louis-Philippe

 

Hello Louis,

 

It is an debatable topic weather to use AJAX or stick to Rails Framework, I would say it is better to stick with Rails framework unless you have requirements like :

  1. Only small part of data is required on page(ie in case you need to populate select list depending on action of user or you need to replace small part of page dynamically as per user selection) In this case application performance is damaged for loading whole page again and again when not required.
  2. When you just need to check weather some data is previously present in application and do some JS working depending on the that.

For using remote(ie AJAX) functionality in rails app you can stick to Unobtrusive Javascript or this guide(http://guides.rubyon...t_in_rails.html)

 

This guide is containing updated knowledge. Hope this helps you.

 

Thanks,

Lauree


Hire skilled Ruby on Rails Developer

Check out Ruby on Rails Outsourcing Services by Allerin





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users