Coder Social home page Coder Social logo

Synchronous API about gdata-objectivec-client HOT 5 CLOSED

google avatar google commented on May 18, 2024
Synchronous API

from gdata-objectivec-client.

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
Any tool can use NSRunLoop's -currentRunLoop and -runUntilDate to make the async
callbacks work. No user interface is necessary.

All of the GDataObject data classes can be used independently of the 
GDataService
classes as well.

waitForTicket: doesn't poll for events; it polls for completion of the ticket. 
Events happen asynchronously.

Original comment by gregrobbins on 13 Jan 2008 at 5:22

from gdata-objectivec-client.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
So, please don't deprecate waitForTicket: in future releases, as it is useful.

I however think that it would be better if the GData API could provide 
synchronous methods (using NSURLConnection's convenience class method, 
sendSynchronousRequest:returningResponse:error:, to load a 
URL request synchronously, for example)

This would also make GData/ObjC more inline with the API provided by other 
languages (I haven't checked all, 
but Python and Java are in this case it seems).
I think it's much easier (and cleaner) to type something like    
CalendarFeed resultFeed = service.getFeed(feedUrl, CalendarFeed.class);
or
feed = self.cal_client.GetAllCalendarsFeed()
than what is currently required by GData/ObjC what async download isn't 
needed/wanted.



Original comment by [email protected] on 13 Jan 2008 at 7:08

from gdata-objectivec-client.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
I wrote a synchronous wrapper using NSRunLoop.  Some convenience methods aren't 
necessary, but they would be nice.

Original comment by [email protected] on 31 Jan 2010 at 2:03

from gdata-objectivec-client.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
Hi Lem, Could you provide your code for the sync wrapper?

Original comment by [email protected] on 8 Jul 2011 at 3:43

from gdata-objectivec-client.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
The library does include waitForTicket: and waitForCompletionWithTimeout: 
methods for use by unit tests and UI-less tools, so there's no need for a 
wrapper.

Synchronous http fetches are sufficient reason for apps to be rejected from 
Apple's app stores. 

Original comment by [email protected] on 8 Jul 2011 at 8:33

  • Changed state: WontFix

from gdata-objectivec-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.