• 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: Shortened autogenerated names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shortened autogenerated names


  • Subject: Re: Shortened autogenerated names
  • From: Mike Schrag <email@hidden>
  • Date: Wed, 09 Mar 2011 12:49:56 -0500

You'll blow up components that rely on the dot notation implying nesting structure (WORepetition begin a notable victim). You might be able to get away with only generating "parentid.childid", though? You could also pack these into a value a lot shorter than ascii versions of decimal numbers.

On Mar 9, 2011, at 12:35 PM, email@hidden wrote:

Hello fellow WOrriors,

Have you ever looked at the names given to WO input fields such as WOTextFields? They could look like one of the following:

name="0.15.37.1.1.1.0.0.3"

name="0.15.37.1.5.7.1.21.1.29.270710975.3.1.1.3.8.1.0.5"

They tend to get longer the more times they are nested inside of sub components.

They need to be unique and it appears they follow a WOContext type of naming convention to guarantee their uniqueness. I would say this algoirthm is not random but methodical and absolutely guarantees uniqueness.

I've got one page that has lots of text fields and realized that just one "row" of data is taking up 20KB of just text because of these super long names.

Why couldn't one use a randomly generated unique ID that is ten characters long (or so)? There *could* be name collision but the chances would be small. Alternatively, why not invent a "context sequence" that starts at 1 and counts up throughout the Request-Response loop? That would absolutely be unique.

Has anyone heard of anybody trying to do something like this for the purpose of saving bandwidth? Perhaps even WOnder might have a cool property that we could flick on to do just this. Or... is there a very good reason why autogenerated names are built the way they are? After all, you would think someone would have optimized these to be smaller if they could.
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: 
 >Shortened autogenerated names (From: email@hidden)

  • Prev by Date: Shortened autogenerated names
  • Next by Date: Re: Shortened autogenerated names
  • Previous by thread: Shortened autogenerated names
  • Next by thread: Re: Shortened autogenerated names
  • Index(es):
    • Date
    • Thread