• 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: [ANN] WO/WOLips/Wonder intro screencast
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ANN] WO/WOLips/Wonder intro screencast


  • Subject: Re: [ANN] WO/WOLips/Wonder intro screencast
  • From: David LeBer <email@hidden>
  • Date: Fri, 21 Mar 2008 13:21:32 -0400


On 21-Mar-08, at 12:09 PM, Mike Schrag wrote:

What would be compelling reasons in Java (within the context of WO dev) not to go with public declarations ? What do you advise when doing WO/WOnder development ?


My philosophy on this is that I don't mind ivars only for fields used ONLY by my component (like a repetition item ivar), because I can always wrap them at any time if I need to do anything more complicated. However, for bindings that I expose via a component api file, I make proper get/set methods so that I don't break users of my component if I need to do something more complicated later on inside the binding (in case people are constructing your component and calling the API -- this is usually only an issue for page-level components, though). Just my rule of thumb.

This is similar to my philosophy, I guess.

If:

- The ivars are only used by the component's bindings (ie WORepetition item bindings)
- Are used by bindings and are set in only one action or method in the component
- Are never exposed by the api


Then I usually feel ok accessing them directly.

If I need to expose the variable via the components API or I need to set the ivars value multiple places in the component then I will make the ivar private and wrap it with accessors.

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog: http://davidleber.net
profile: http://www.linkedin.com/in/davidleber
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >[ANN] WO/WOLips/Wonder intro screencast (From: David LeBer <email@hidden>)
 >Re: [ANN] WO/WOLips/Wonder intro screencast (From: Mike Schrag <email@hidden>)
 >Re: [ANN] WO/WOLips/Wonder intro screencast (From: Lachlan Deck <email@hidden>)
 >Re: [ANN] WO/WOLips/Wonder intro screencast (From: Louis Demers <email@hidden>)
 >Re: [ANN] WO/WOLips/Wonder intro screencast (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: How to target a WO component in an html include
  • Next by Date: Re: How to target a WO component in an html include
  • Previous by thread: Re: [ANN] WO/WOLips/Wonder intro screencast
  • Next by thread: Re: [ANN] WO/WOLips/Wonder intro screencast
  • Index(es):
    • Date
    • Thread