Re: Existence of objects
Re: Existence of objects
- Subject: Re: Existence of objects
- From: Jens Alfke <email@hidden>
- Date: Mon, 06 May 2013 09:32:00 -0700
On May 5, 2013, at 11:33 PM, YT <email@hidden> wrote:
> This past week I've been totally focused on learning how to write code that uses the Quartz 2D library and so totally forgot the MVC design pattern. Plus I've read about the MVC pattern it in the docs but have not configured one myself in Cocoa.
It takes a bit of practice to get into the MVC mindset: sometimes it can feel like creating unnecessary levels of abstraction, but it's worth it. One good way to think about it is as if you were splitting yourself into a whole team of engineers. Put yourself in the shoes of the guy/gal who doesn't know anything about graphics or UI programming but needs to implement the core "thing" your app is about, and design the API s/he would implement, that the UI programmer(s) can then use as a black box and build the interface to.
And as always, I highly recommend the book "Design Patterns" by Gamma et al, which is a recipe book of these sorts of techniques — MVC is one of the best-known ones, but there are dozens of them.
—Jens
_______________________________________________
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