|Real Software Forums
|App wide instances vs session instances
|Page 1 of 1|
|Author:||KikoLobo [ Fri May 31, 2013 12:28 am ]|
|Post subject:||App wide instances vs session instances|
I am writing an app that uses parse.com as its data back end. I am using a subclass of HTTPSocket.
This class I am creating is supposed to be programmatically instantiated in a web page or web view.
Every time I do a query for instance I create an instance of my parse class engine, and hit a query and set some method addresses in pointers in the subclass to callback a finished method in my webpage.
How do I know if I am running the instance of my class in the server (the server asking parse.com for the data) or the client (where it was instantiated but since HTTPsocket is not a webcontrol subclass I don't know who manages the underlying connections of the class).
I do this to allow my app to instantiate several queries for instance to parse.com at the same time and get notified once the transaction finishes and deliver the payload). I want this to be ran client side so I can have multiple connections to parse.com to get different data. I of course limit the amount if connections that can happen at a time.
Keep in mind that parse.com is a REST API. So every connection once it finishes it disconnects and gets destroyed.
Any clues on how to control that? I am a littlebit puzzled. And sometimes I loose instances of my classes when created via code and is hard to keep the pointers to the parent webpage where the my parse class was programmatically instantiated.
Any clues welcomed!!
|Page 1 of 1||All times are UTC - 5 hours|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group