I’ve been working with my own Parse lib for Corona (my app currently uses Amazon Simple DB and S3, through my own Corona libs, but I think Parse would be a much better solution).
My main issue is that my app only uses Facebook auth, and to use FB auth with Parse you need the access token and expiration from Facebook login. For reasons known only to our Corona overlords, they chose not to provide the expiration. So I’m blocked there. I filed a feature request, but am not holding my breath.
Also, I have been complaining about the horrible network IO support in Corona for a while. They have made a coupe of small, but important changes (you can now use verbs other than get/post, and they actually give you the status result from the http request - yay).
I’ve gotten around the limitations of their network IO with S3 and SimpleDB by using LuaSocket instead, which is awesome (in that it is a complete and well designed network IO library). The problem is that LuaSocket doesn’t support SSL, so when I’ve looked at doing Corona libraries for Parse, Dropbox, etc, I’m back to having to use the crappy network.request/network.download if I go that route.
So what are my complaints? Neither network.request or network.download provide access to http response headers, neither of them provide status (bytes uploaded/download, percent complete), neither of them are cancellable, network.request corrupts binary responses on Android, network.request has no way to stream body content from a file (making medium-large file uploads take place in memory), network.download writes/overwrites the response file even on error (so, for example, if an image download fails, it will write whatever the server provided in the error response to the image file you were expecting, meaning if you want to get the error info you have load it from the file, guess its content type, process it, and delete the file - and of course always write to a temp file to avoid overwriting a valid file), etc, etc.
I’ve filed bugs or feature requests for all of this.
So the problem is that once you are committed to SSL (as with Parse/Dropbox/others), you’re back to having to work with the crappy async networking support in Corona. And it’s just not suitable for a real app.
In a real app, you need to do network operations that might take more than a second or two, that might fail, that might hang, etc. You want to show the user status so they can see whether the operation is progressing and maybe estimate how long it will take and decide to cancel it. Maybe the app decides that a network operation is not thriving and wants to cancel it. You get the idea. For the standard Corona “Hello World” where you download an image file and show it on the screen in 5 lines of code, it works great. But if you want to write real networking code for a real app using these APIs, you’re going to be in for a real treat. Your user gets to wait as long as it takes, with no status, no cancelling, your app can’t even cancel, and you’re still going to have to tap dance around the bugs.
I’ve taken the postion that I just have to wait until Ansca fixes these APIs before I waste more of my time writing network libs for Corona that are just going to suck in real usage anyway because of limitations in the underlying networking support.
That being said, if you don’t care about progress/cancelling and you’re willing to use network.download when working with binary responses, and you’re not going to do any larger than available memory file uploads, and you don’t need Facebook support, then Parse is pretty straightforward (using the lib referenced above or just calling the REST APIs directly). You will not get some of the information they provide in the response headers, but from looking at the API, I think you can reconstruct it from the data you do get (for example, you won’t get the “location” header with the url of a new resource, but you can build that from the object ID you get back in the JSON part of the response).
[import]uid: 111481 topic_id: 19842 reply_id: 104502[/import]