0

Trying to get a handle on using Parse (Parse.com BaaS [back-end as a service], for the uninitiated), and in reading the PFFile reference, I'm kind of unclear on what "non-relational way" means in the "Overview" description: "A file of binary data stored on the Parse servers. This can be a image, video, or anything else that an application needs to reference in a non-relational way."

Can someone, preferably with Parse experience, clarify this? Right now, I'm working out sending basic Objective-C objects and primitive data types to the server only. No images, audio, or anything else.

When should I use PFFile over, say, PFObject?

(Also, somebody should add BaaS, MBaaS, backend-as-a-service, mobile-backend-as-a-service tags. I can't, of course.)

EDIT: And some or all of the Parse classes, PFObject, PFFile, etc., etc..

baptzmoffire
  • 589
  • 2
  • 4
  • 20

1 Answers1

1

I'm relatively early in process of using Parse for my iOS app. Partly because I must support offline operation and partly because I was well along in development, I chose to have a native DB using CoreData. I essentially replicate information from my CoreData objects into Parse objects that look vary similar. If I had looser requirements for offline operation I might try to do a purely Parse based DB. Parse does support caching for off line operation, but that just seemed too iffy for me.

All my images are given UUID file names and stored locally to my app. The file names can appear in objects. I will move these files to Parse as files using the same file names. Since they are UUIDs I know I don't have to worry about conflicts.

In certain cases, I will move the sqlite DB files that are my local persistent stores on iOS to Parse as files and then attempt to download them back to iOS. I expect that to work, but have not verified that there are no unseen gotcha's. I will be doing this for large packages of objects that will be used only on the iOS apps themselves.

If my App only needed to communicate objects to other iOS apps, I might not use Parse. I need to share data with a web site and with an Android app. That and my desire for an easy to deal with API to my back-end make Parse seem like the right choice.

LostInTheTrees
  • 1,135
  • 9
  • 19
  • I'm not entirely sure this is an answer in my question, but rather sort of a commentary on when to use Parse as opposed to a local DB? In going back and reading my post, I realized the question could've been clearer. To clarify, I know I should use Parse for my back-end, because I know nothing about server-side stuff or databases, and I'm looking for the simplest, quickest-to-implement solution. My only real problem is what does "non-relational way" mean in the documentation of PFFile. This confuses me, so it leads to the question, "When should I use PFFile?" – baptzmoffire May 13 '13 at 16:43
  • I took your question to be mostly "when should I use a PFObject and when should I use PFFile?" I guess to put it simply, if you have an object with properties in iOS, it should be a be a PFObject on Parse. Use PFFile for things that are "large" and do not have an internal structure (that you are concerned about.) In other words, use PFFile for blobs. The "non-relational" phrase is a little confusing. I think they mean that the object is not composed of individual fields (or columns if you will.) – LostInTheTrees May 13 '13 at 21:00
  • Thanks very much. I kinda thought that's what you were getting at. Makes sense. – baptzmoffire May 13 '13 at 21:41