Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Framework class names need prefix

#33

It appears that the library classes have non-prefixed names like Connection and Response, which could easily collide with classes having the same name in the iPhone project that the framework is embedded within.

Since ObjC has no namespace support, the standard practice with frameworks is to use a common prefix for all classes. OR might be a good choice, in which case Connection -> ORConnection, Response -> ORResponse.

See http://www.cocoadev.com/index.pl...

Reported by Scott Guelich · February 6th, 2009 @ 11:01 PM

State: new
Assigned to: nobody

Activity

  1. Joshua Vickery
    Joshua Vickery

    Good point Scott! We should probably have taken care of this before announcing 1.0. Since we are building a number of different Objective* tools (ObjectiveRecord, ObjectiveSync) I was thinking about using the prefix "ORS" for ObjectiveResource. Would that work?

    February 8th, 2009 @ 11:13 AM

  2. Joshua Vickery
    Joshua Vickery
    • Milestone set to ObjectiveResource 1.01

    February 8th, 2009 @ 11:16 AM

  3. Scott Guelich
    Scott Guelich

    Of course! Any prefix not used by Apple would work, and I don't know of anyone else using ORS.

    February 8th, 2009 @ 11:26 AM

  4. Joshua Vickery
    Joshua Vickery
    • Milestone changed from ObjectiveResource 1.01 to ObjectiveResource 1.1

    February 10th, 2009 @ 04:20 PM

  5. sbwoodside
    sbwoodside

    +1 for this is very important. I just imported ObjectiveResource and had immediately a namespace collision with my class already named Response. (generating a link error).

    June 1st, 2009 @ 07:40 PM

  6. jjenkins
    jjenkins

    +1 also...

    the class "Connection" clashes with a private class in Apple's MessageUI framework in iPhone OS 3.0

    We decided to drop the feature that would use MessageUI because we depend on ObjectiveResource too much at this point

    June 20th, 2009 @ 01:32 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.