• 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: Updating EOObjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Updating EOObjects


  • Subject: Re: Updating EOObjects
  • From: Arturo Pérez <email@hidden>
  • Date: Thu, 18 Aug 2005 22:47:14 -0400

On Aug 18, 2005, at 9:47 PM, Owen McKerrow wrote:



On 19/08/2005, at 11:15 AM, Arturo Pérez wrote:

Hi Jon,

That's a fine way to start. I know a bunch of the luminaries on the list prefer a different style but simple will get you started.

The other big thing is to follow a style of doing most of your work in the appendToResponse() and to never mutate any on-page data through the key values that WOBuilder can see.

Using the above then your createAndInsertInstance would be used like this

public void appendToResponse(....) {
  if  (aLicense == null) aLicense = ...createAndInsert...;
  if  (aPrincipal == null) aPrincipal = ...createAndInsert...;
  super.appendToResponse(...);
}


Are you saying that you do all your object manipulation in the appendToresponse ? Or I maybe Im mis-understanding.
Hmm I have never heard of this before. Can you explain your reasoning here Arturo ?




Kinda. It's what some Apple field engineers told me to do once upon a time.


One runs into problems if the getters/setters mutate their values, especially if they are used as conditionals. One way to avoid this to do save those mutating things for the appendToResponse(), takeValues() and invokeAction phases of the RR.

I've been burned tons of times because I forgot about the mutating rule.

_______________________________________________
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


  • Follow-Ups:
    • Re: Updating EOObjects
      • From: "Jerry W. Walker" <email@hidden>
References: 
 >Updating EOObjects (From: Jonathan Miller <email@hidden>)
 >Re: Updating EOObjects (From: Chuck Hill <email@hidden>)
 >Re: Updating EOObjects (From: Jonathan Miller <email@hidden>)
 >Re: Updating EOObjects (From: Jonathan Miller <email@hidden>)
 >Re: Updating EOObjects (From: Chuck Hill <email@hidden>)
 >Re: Updating EOObjects (From: Arturo Pérez <email@hidden>)
 >Re: Updating EOObjects (From: Jonathan Miller <email@hidden>)
 >Re: Updating EOObjects (From: Arturo Pérez <email@hidden>)

  • Prev by Date: Re: Updating EOObjects
  • Next by Date: Accessing ComponentActionUrl Through JavaScript
  • Previous by thread: Re: Updating EOObjects
  • Next by thread: Re: Updating EOObjects
  • Index(es):
    • Date
    • Thread