• 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: Cocoa et al as HCI usability problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa et al as HCI usability problem


  • Subject: Re: Cocoa et al as HCI usability problem
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Mon, 19 May 2008 12:26:49 +0200


That'd be great for the Mac, but not so great for the Cocoa evangelists. It's hard to understand the neglect Java has seen on the Mac, except as a way to try to steer more people towards Cocoa.




Cocoa is a framework, Java a language. Apple provided a Cocoa/Java bridge to let developpers choose there prefered language to use Cocoa, and bet what, almost nobody choose Java. That's why the bridge is no collapsing slowly.


In Obj-C, if the object doesn't respond to the selector, doesn't it just fail silently? I'd think in Obj-C you wouldn't even bother to check whether it responds to the selector, unless you had a "Plan B" you wanted to use when it didn't.

But ignoring that for a moment, how is this example any different from a Java or C# class implementing an interface that declares a "rotateInDegrees" method? The equivalent C# code would look something like this:

   foreach (object anObject in userSelection)
   {
       IRotatable rotater = anObject as IRotatable;
       if (rotater != null)
       {
           rotater.rotateInDegrees(90);
       }
   }

or if you like briefer:

   foreach (object anObject in userSelection)
   {
       if (anObject is IRotatable)
       {
           ((IRotatable)anObject).rotateInDegrees(90);
       }
   }



It's different because there no informal protocol in C#, so you have to create a interface for each optional method you want to add to your object, and then declare that you implement each interfaces in your class declaration.
Yes, it's possible to achieve the same things, but it's not as easy and natural.



_______________________________________________

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: Cocoa et al as HCI usability problem
      • From: Torsten Curdt <email@hidden>
    • Re: Cocoa et al as HCI usability problem
      • From: Peter Duniho <email@hidden>
References: 
 >Re: Cocoa et al as HCI usability problem (From: Peter Duniho <email@hidden>)
 >Re: Cocoa et al as HCI usability problem (From: ben syverson <email@hidden>)
 >Re: Cocoa et al as HCI usability problem (From: Peter Duniho <email@hidden>)

  • Prev by Date: Re: Cocoa et al as HCI usability problem
  • Next by Date: html question
  • Previous by thread: Re: Cocoa et al as HCI usability problem
  • Next by thread: Re: Cocoa et al as HCI usability problem
  • Index(es):
    • Date
    • Thread