The rest of the UI so far is trending towards the reverse, thin C++
and thick objc controllers (usually subclasses of NSViewController).
If you're debugging at the UI layer, there's going to be plenty of
cocoa and objective-c, I don't think you can avoid it. Even a C++
class is going to have obj-c in it if it talks to the UI at all.

I'm fine with a mix, personally. Draw the line where you think it's
most appropriate.

On Thu, Mar 19, 2009 at 7:08 PM, Brett Wilson <bre...@chromium.org> wrote:
>
> I would do the thin Objective C mode, partially since all Chrome
> developers know C++. I could debug that code or make changes to it if
> I was doing something that affected it, but I would have a much harder
> time with Objective-C.
>
> Brett
>
> On Thu, Mar 19, 2009 at 4:00 PM, Scott Hess <sh...@chromium.org> wrote:
>>
>> I'm refactoring my Omnibox code towards something I'm willing to put
>> up for review, and am realizing that I need to find a way to rule on
>> whether I should have thick Objective-C helpers or thin ones.  Say for
>> instance that I have an NSTableView, I'll need a data source for that,
>> which needs to be an Objective-C object.  At the thin extreme, I can
>> put the minimum amount of code in that object to fulfill the data
>> source protocol, plus anything I need for handling delegation or
>> target/action type things, which leaves setup and wiring in the C++
>> code.  At the thick extreme I would push most of the Objective-C code
>> into the Objective-C object, and have the C++ code call into that.  Or
>> there's something in the middle.
>>
>> WDYT?
>>
>> Right now it's somewhere in the middle.  I don't create Objective-C
>> methods solely to be called from C++, nor C++ methods solely to be
>> called from Objective-C, except for cases where either would need to
>> poke through the encapsulation boundary.
>>
>> Thanks,
>> scott
>>
>> >
>>
>
> >
>



-- 
Mike Pinkerton
Mac Weenie
pinker...@google.com

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to