• 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: new/update form patterns
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new/update form patterns


  • Subject: Re: new/update form patterns
  • From: Florijan Stamenkovic <email@hidden>
  • Date: Thu, 26 May 2005 22:23:33 +0200


On May 26, 2005, at 21:52, Mike Schrag wrote:

I'm curious what pattern people use for "new-EO" forms -- that is, when you have a form to fill in the initial values of a new EO that the user has requested to create. For instance, do most of you create the EO up-front and attach the form fields directly to the attributes of the EO, or do you clone the fields into the WOComponent and attach to those, then move them into a new EO in the "save" action? The problem with the first route is that if someone navigates away, you've got an empty EO inserted into the EC and the user doesn't realize that it's still sitting in their session, but it's obviously nicer because you can just wire up directly to the EO attributes and you don't have to keep the Component and the EO fields in-sync (well, other than in the html/wod).

I use a child editing context to the session's default one. So, nothing messes with my default editing context until the newly created objects are validated... Sometimes I use placeholder variables, in crowded components that are able to create different kinds of eos depending on the circumstances, and when I want to for example check if there is an object already in the database that holds the same values (avoid adding the same user twice and things like that)... ever since i started working with nested editing contexts i don't loose sleep over crappy db input... bind it all to your EOs!

While I'm soliciting methodologies, I'm curious how many of you use the ObjC/WO naming for accessor methods vs the JavaBeans convention (i.e. do you use "name()" or "getName()"). WO has made me very schizophrenic wrt my get method naming. I feel urges to name them like WO/ObjC now and I don't know who is on the dark side in this battle :) The ObjC-style has definitely grown on me, though.

us WOBuilder to do those things... when i do it by hand (for let's say method only keys, no caching) i use name()... as i was reading the docs it doesn't seem to make a difference, unless you have key() and getKey() in the same class...


what i do NOT do is name things like private methods with get in front... i remember some behavior that i didn't like attached to it, so i made a rule for myself not to do it. can't remember the behavior though...

ms _______________________________________________ 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

_______________________________________________ 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: 
 >new/update form patterns (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: new/update form patterns
  • Next by Date: Re: Newbie: WOComponent doesn't appear
  • Previous by thread: Re: new/update form patterns
  • Next by thread: Re: new/update form patterns
  • Index(es):
    • Date
    • Thread