• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSURLConnection and MVC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection and MVC


  • Subject: Re: NSURLConnection and MVC
  • From: Koen van der Drift <email@hidden>
  • Date: Wed, 19 Sep 2012 15:14:49 -0400

Thanks for the link, lots of info there. Unfortunately he doesn't
discuss the responsibility of the MVC classes in the slides regarding
the best location for the NSURLConnection code. I got that and the
paring already working, but need to make it more flexible.

- Koen.

On Wed, Sep 19, 2012 at 2:07 PM, Chuck Soper <email@hidden> wrote:
> I haven't implemented what you're describing, but you might want to look
> at Marcus Zarra's talk on Flexible JSON Importing. I don't know what
> you're parsing (JSON, XML, or something else). I found the slides for
> Marcus' Flexible JSON Importing talk here:
> http://www.mactech.com/conference/presentations-speaker
> The implementation details start around page 26.
>
> Chuck
>
>
> On 9/19/12 6:42 AM, "Koen van der Drift" <email@hidden> wrote:
>
>>Briefly in my app (OSX), I download data from a database to be
>>displayed in a view. I created a Controller that takes care of the
>>NSURLConnection, retrieves the data, and sends it to a database model
>>class to parse. It also takes care of updating the UI during the
>>download  ("Download in progress", "Download failed", "Downlaod is
>>done", etc). Once that is done, the parsed data is send back to the
>>controller to update the view.
>>
>>I'd like to add another database class that uses a different way to
>>obtain the data, it only needs one pass, while the other one needs
>>multiple. And of course it needs to be parsed differently. Now I am
>>getting into trouble, because the way the controller and original
>>database class interact turns out to be very specific for the original
>>database. So I need to fix this, obviously, because there could be
>>more database classes in the future.  Reading up on MVC and
>>NSURLConnection, I saw several posts on SO suggesting to put all the
>>NSURLConnection stuff in the database (model) class instead of the
>>Controller as I have been doing.
>>
>>Seems like a valid solution to me, I can use notifications to keep the
>>controller updated about the download status.
>>
>>Any thoughts?
>>
>>- Koen.
>>_______________________________________________
>>
>>Cocoa-dev mailing list (email@hidden)
>>
>>Please do not post admin requests or moderator comments to the list.
>>Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>>Help/Unsubscribe/Update your Subscription:
>>
>>This email sent to email@hidden
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSURLConnection and MVC
      • From: Graham Cox <email@hidden>
    • Re: NSURLConnection and MVC
      • From: Jens Alfke <email@hidden>
References: 
 >NSURLConnection and MVC (From: Koen van der Drift <email@hidden>)
 >Re: NSURLConnection and MVC (From: Chuck Soper <email@hidden>)

  • Prev by Date: Best practice when opening a Master-Detail app with no data in it yet
  • Next by Date: Re: Timeout after application:openFile: stalling applescript
  • Previous by thread: Re: NSURLConnection and MVC
  • Next by thread: Re: NSURLConnection and MVC
  • Index(es):
    • Date
    • Thread