Why synchronous?

1 view
Skip to first unread message

sbwoodside

unread,
Aug 20, 2009, 10:38:28 PM8/20/09
to ObjectiveResource
I'm actually really surprised that ObjectiveResource API is totally
synchronous. Why was this done? It seems to me that an asynchronous
API using the standard Apple model of delegate methods to receive back
the information and/or error messages would be good (a) because it's
what iPhone programmers are used to and (b) so that you can display
useful UI while the connection is going on.

I would change it to the traditional delegate system myself but it
looks like it's been deliberately designed to be synchronous and I
don't want to go against the grain of the whole intent here... so ...
why???

Joshua Vickery

unread,
Aug 24, 2009, 10:00:09 AM8/24/09
to objectiv...@googlegroups.com
When objective resource was first built "iPhone programmers" were a
scarce breed. When building a toolkit to integrate iPhone apps with
rails apps we aimed to emulate much of the simplicity we found in
rails on the iPhone. Delegates don't have a counterpart in Rails and
aren't overly simple to grasp for someone knew to the concept so we
opted for a pattern that Rails programmers would be familiar with.

Now that the iPhone platform is maturing and more developers are
becoming familiar with standard cocoa patterns it might be time to
follow
Apple's lead and add an asynchronous option to objective resource.

castylx

unread,
Aug 27, 2009, 10:09:25 AM8/27/09
to ObjectiveResource
I'm in the same boat as the first poster. I really really really
would like to use your library, but just can't if it's synchronous
only. Please keep us updated as to when the asynchronous version
comes out. Thanks, BTW the library is awesome!

On Aug 24, 7:00 am, Joshua Vickery <vicke...@gmail.com> wrote:
> When objective resource was first built "iPhone programmers" were a  
> scarce breed. When building a toolkit to integrate iPhone apps with  
> rails apps we aimed to emulate much of the simplicity we found in  
> rails on the iPhone. Delegates don't have a counterpart in Rails and  
> aren't overly simple to grasp for someone knew to the concept so we  
> opted for a pattern that Rails programmers would be familiar with.
>
> Now that the iPhone platform is maturing and more developers are  
> becoming familiar with standard cocoa patterns it might be time to  
> follow
> Apple's lead and add an asynchronous  option to objective resource.
>

Adam Alexander

unread,
Aug 27, 2009, 10:36:07 AM8/27/09
to objectiv...@googlegroups.com
Hi guys, there is a helper class called ConnectionManager available in the 1.1 branch, which you can read more about here:

http://yfactorial.lighthouseapp.com/projects/18393/tickets/57-async-connection-manager

It's not quite the same as using the delegate pattern but it does allow for asynchronous operations and keeps the UI responsive during network activity.

Hope this helps,

Adam

Fernando Castillo

unread,
Aug 27, 2009, 12:20:11 PM8/27/09
to objectiv...@googlegroups.com
Thanks Adam, I'll check it out.

sbwoodside

unread,
Sep 1, 2009, 6:12:28 PM9/1/09
to ObjectiveResource
Thanks Joshua. I think it would be great to have an async option. I
totally understand what you're saying about the delegate pattern being
non-obvious at first.

--simon

On Aug 24, 10:00 am, Joshua Vickery <vicke...@gmail.com> wrote:
> When objective resource was first built "iPhone programmers" were a  
> scarce breed. When building a toolkit to integrate iPhone apps with  
> rails apps we aimed to emulate much of the simplicity we found in  
> rails on the iPhone. Delegates don't have a counterpart in Rails and  
> aren't overly simple to grasp for someone knew to the concept so we  
> opted for a pattern that Rails programmers would be familiar with.
>
> Now that the iPhone platform is maturing and more developers are  
> becoming familiar with standard cocoa patterns it might be time to  
> follow
> Apple's lead and add an asynchronous  option to objective resource.
>
Reply all
Reply to author
Forward
0 new messages