Rails3 and Devise work with Iphone / Android / Wp7 applications

I searched arround for solutions and didnโ€™t find anything really local in this matter.

That's why I ask you guys for your help :-)

Assuming I have an application that works with Rails 3, using Devise to authenticate users.

I need to create mobile apps for Iphone / Android and WP7.

Mobile applications should report / log in / create / list, do whatever the website can do.

Mobile applications can comment by parsing XML .... but maybe there are already lib / frameworks or something sexier?

What would be the best way to connect between my mobile apps and my Rails site?

+4
source share
2 answers

I would use xml or json output to exchange data back and forth; For authentication, you can set (in initializers / devise.rb)

config.http_authenticatable = true 

This allows you to send basic HTTP Auth headers with every request that will process for you.

-

To create a web application that can also be viewed in the mobile version for a website, I would recommend checking out this railscast: http://railscasts.com/episodes/199-mobile-devices

+1
source

It seems that if the mobile application is just an interface to the web application, you are most likely to be better off creating a mobile HTML5 style in your web application that will automatically be served when the mobile phone accesses your website. All your code can be in Rails, which sounds like you are already familiar, and you also have the advantage of keeping your code base in one place - if you want to add functionality later, you just update your web application and donโ€™t worry about updating 2 different mobile apps.

0
source

Source: https://habr.com/ru/post/1339295/


All Articles