0
votes

I'm writing a business app for ios and android and looking at my options. I read that Corona SDK uses Lua.

If this were a straight web app, I would build my php to return json and consume it with a presentation layer using Jquery ajax, html, css.

I'm not sure how I do this with the Corona SDK. Am I misapplying the SDK? I don't need to make a game. I just want a supported abstracted layer so I don't have to learn objective-c or something else for android.

I'm not sure what Corona is for or if I am not supposed to use it for business apps. I would like to learn Lua, though.

Thank you.

3

3 Answers

1
votes

While I think Corona SDK's strength is games (at least right now), it can be used for business-type apps. Here's a look at NapKeeper that I created as a contest entry for a hackathon: http://www.youtube.com/watch?v=k0GsuhgLpJE

While the subject (napping) was done as a joke, you can see it's the style of a fairly typical business app. It uses SQLite under the hood to handle the data, posts to Facebook, etc. While I didn't call out to any websites, you can do that with Corona SDK and even handle JSON pretty easily: http://developer.anscamobile.com/content/reference/index/json-library

The coolest thing about that app is that it was created from start to finish in less than 10 hours. And it was the first non-game app I'd ever created with Corona SDK, so I was really thrilled. It proved to me that while biz-apps may not be what most people use Corona for, it can be used to create those fairly easily.

1
votes

I like Corona a lot, but given your constraints, you will probably be better off with phonegap - http://phonegap.com/

The apps are done in javascript, html and css, so you should already be familiar with it. Consuming JSON should be very easy to do in Javascript.

1
votes

Corona does what you want. Rather than learning Objective C (for iOS) and Java (for Android), you just need to learn Corona, which is written in Lua.

Lua is a little weird. It's not really OO, so you have to learn how to do OO-like development the Lua way, but it works.

Regarding the project you described, as you know PHP is server-side and JQuery is client-side. With an app everything is handled by the app. If it is interacting with a server, your app connects via the server's API. It could be an API for Twitter, FB, SalesForce, any other API out there, or a custom service that you develop for this app.

MVC is not built in to Corona, although you should be able to build an app that way. I've used it for 2 business apps, and Corona was great for those.