how to use ajax with json in ruby on rails?

What is the best approach for developing nimble and responsive mobile apps that will run on any platform (iPhone, iPad, Android, Kindle Fire, Blackberry, laptop)?

  • My plan is to just have a web page with the user can display on any device and have all the bells and whistles implemented with javascript so that the website feels like a native app.  Is this feasible?  At least for the first draft I will not need to use anything like location services or the compass or gyroscope.  I just want an app that is responsive and feels zippy, but that I don't have to re-code with three different technologies.  Can I use AJAX for this?  Is there something better? I'm planning to do the server side with Ruby on Rails.

  • Answer:

    I'd suggest using a JavaScript framework called Sencha Touch. Its a full featured, (largely) platform independent multitouch JavaScript library. That said, it doesn't support Kindle Fire. But the library is constantly evolving and will likely be compatible with other devices in the future. There are other libraries out there are well such as Dojo Touch or possibly jQuery touch (the beginnings of Sencha touch). Note that any of these don't depend on your choice of server side languages. To target laptops, you'd be better off using your traditional site. To develop the quickest, most responsive, completely platform independent app consider using plain HTML and CSS. There won't be any multitouch, but you can certainly mimic the look of a native mobile app.

Derek Harnanansingh at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.