Hi everyone,
I am starting to evaluate LiveCode for possible adoption, and starting to learn about its capabilities. I am interested in its multi-platform feature, but most interested in IOS and Android development. I have read that one could connect a database to a LiveCode app using standard webserver technologies such as PHP, but what about a server written in Ruby on Rails, which returns its data as JSON strings? Could I create a robust LiveCode app for IOS or Android in such a way? Would I need to parse the JSON strings into LiveCode arrays using one of the JSON libraries for RunRev that I have seen?
This approach might allow me to use LiveCode to create an IOS app connected to a Ruby on Rails server, as a prototype, and then leave open the option that later, if needed, the app could be re-written in Objective C++ for production. The work on the Rails server and its API might need little change, if this was done properly.
Any ideas?
Thanks,
Michael
Ruby on Rails Server
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 328
- Joined: Mon Dec 05, 2011 5:34 pm
- Contact:
Re: Ruby on Rails Server
Hi Michael,
This can definitely be done. You would still need to write a script to sit on the server to handler the requests from Livecode - via a URL, but essentially it's the same as for a PHP based server system.
If you use a server access point that gets the data from the database then it can parse that data out into whatever format you might require for Livecode to receive. It doesn't have to be JSON - you could map all the information to a comma/tab separated table of data or even some binary format (if you so wished!). All it comes down to is making sure that both sides of the communication are talking with the same structure in mind
Hope that helps a bit,
Dave
PS. I just added a Beginners Tutorial on the same subject - though with PHP, to my playground website:
http://www.vampire-tiger.info/livecode- ... bases.html
Though I think it might be just a little too beginner for yourself
This can definitely be done. You would still need to write a script to sit on the server to handler the requests from Livecode - via a URL, but essentially it's the same as for a PHP based server system.
If you use a server access point that gets the data from the database then it can parse that data out into whatever format you might require for Livecode to receive. It doesn't have to be JSON - you could map all the information to a comma/tab separated table of data or even some binary format (if you so wished!). All it comes down to is making sure that both sides of the communication are talking with the same structure in mind

Hope that helps a bit,
Dave
PS. I just added a Beginners Tutorial on the same subject - though with PHP, to my playground website:
http://www.vampire-tiger.info/livecode- ... bases.html
Though I think it might be just a little too beginner for yourself

Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.
Visit http://electronic-apps.info for released App information.
Re: Ruby on Rails Server
Dave hi,
Thanks for your quick answer. I am continuing to explore and learn LiveCode, and I am very impressed with what I have seen so far.
Thank you,
Michael
Thanks for your quick answer. I am continuing to explore and learn LiveCode, and I am very impressed with what I have seen so far.
Thank you,
Michael