Corona suitable for developing business apps?

Hi Heinz,

This thread seems to have gone off on a different tangent, but I thought it might still be helpful to know that Corona is heading toward supporting more business-like apps through frameworks written in Lua. You can find code for a scrollable list in our Sample Code:

http://developer.anscamobile.com/content/additional-samples

There’s also some sample code that works to wrap text:

http://developer.anscamobile.com/forum/2009/12/27/multiline-text#comment-2435

(Wrapping text on the device is on our roadmap, but the sample code above works until then.)

And Corona has built-in support for Lua socket, but I think you already know that, since you’re using it. Any Lua xml parsers you find on the Web should work well to parse XML into a table/array. I’ve used the XML parser on this page under “Classic Lua-only version” in Corona (and it’s very short): http://lua-users.org/wiki/LuaXml

I created a business-like app in Corona a few months ago. You can see it here: http://atasite.org/iPhone/ It downloads and caches an xml file from a website hosted by an independent microcinema in San Francisco. The app displays the data in a list. Touching an item in the list shows the full text description. I used .png images in the background of my elements to get the look I wanted. The hardest part was getting scrolling to happen smoothly, just because I wanted the right “feel”. Downloading data, checking the remote file and comparing the cached file, parsing the data–all much easier than if I tried to do that in Objective-C.

I’m working on generalizing my app so I can share the code, possibly as a framework for Corona.

-Gilbert
[import]uid: 5917 topic_id: 993 reply_id: 2436[/import]

Thank you for your encouraging comments Gilbert.

I’m making headway but also have a tough time switching gears to “event driven” programming :slight_smile:

Still using the Twitter sample code as base. Currently trying do add another text input dialog to ask for part number after the login.
Sockets and XML parsing I have a handle on, at least so far.

Your app sounds like it would make a good sample, hopefully/maybe available soon?

Heinz [import]uid: 6547 topic_id: 993 reply_id: 2438[/import]

It’s been a few days now so I thought I’d add some comments in case it helps someone that is ‘sitting on the fence’.

I continue to be encouraged and would suggest that anyone ‘thinking’ about using Corona for business should at least give it the ol’ college try.

Unfortunately, for me, I need native functions for text input, etc. so it’s a bit of a pain to code->build->test->back to coding.
To make it a bit easier I’m wrapping the code requiring the device in an ‘if build – true’ condition so that I can set that Var at the
beginning. Haven’t actually tested if build == true yet, but the if build == false allows me to set some variables for testing, etc.
I’m now actually starting to use io.read() to set the variables at runtime to get me closer to the real thing without having to do a build.

ui.label, found in the GPS sampling, is also helping me to give the user some extra feedback.

Have figured out buttons, somewhat and actually getting a bit (tiny bit) of ‘event driving’ programming figured out.
Hopefully I’m on the right track and that my success, however small, is not just a fluke.
Basically I figure that the idea is to build it all and hide it and then display as needed for user interaction.

Of course I may have an advantage since our Server does the grunt work and all I have to do is collect some vars, build and xml string, pass it to the Server, parse the returned XML and display it to the user.

All in all, i’m optimistic that I’ll be able to meet my goal of having a working, although probably pretty rough, App that will allow real-time inventory corrections right where the item is located in the warehouse. Once I get that far I’ll add polish with some ideas I already have :slight_smile:

Heinz
[import]uid: 6547 topic_id: 993 reply_id: 2496[/import]

I think I can consider my original question answered to the positive.

Have a working App that reads/updates our DISAM files on the server. Communication is via sockets and XML.

For UI I created some buttons, displays and inputs. I make them visible/invisible as and when needed.
Probably far from efficient or elegant I’m sure ,but it works.
Works well enough to encourage me to keep on learning to say the least :slight_smile:

Heinz
[import]uid: 6547 topic_id: 993 reply_id: 2745[/import]

Hi Heinz,

That’s great to hear. I’m glad you’re making progress with your app. I’ve found Lua socket to be very powerful. I haven’t taken full advantage of all it’s capabilities yet.

I’m hoping to post my app as a demo with the source code soon. I need to clean it up a bit so that others can use it. I’ll announce it on the forum when it’s ready.

By the way, I found this to be a great resource for adding some polish to the UI:

iPhone GUI PSD 3.0 - http://www.teehanlax.com/blog/2009/06/18/iphone-gui-psd-30/

It’s a Photoshop file, so buttons and other widgets can be customized, cropped, and then exported as PNG files to be used as assets in your app.

-Gilbert [import]uid: 5917 topic_id: 993 reply_id: 2767[/import]

Hi Gilbert,

Any news on:
I’m hoping to post my app as a demo with the source code soon.

-Danny [import]uid: 6873 topic_id: 993 reply_id: 5467[/import]