Woops, sent too soon,

Anyway, I think I'm talking about the exception.  To load what I need
in an external file I'd essentially need the whole database.



On 7/15/09, Ryan Florence <[email protected]> wrote:
> First of all, I agree, most of the time it's better all aroun
>
> The elements get updated via xhr, the total external JS file would be
> ENOURMOUS in this situation, and the user may only need access to 10% of it
> at a time, so I wouldn't ask them to download it all.
>
>
> On Jul 15, 2009, at 7:39 PM, Steve Onnis wrote:
>
>>
>> The issue with that is nothing gets cached.  If you use an external JS
>> file
>> to store it then the browser can cache it better and reduce the overall
>> page
>> size and download times.  It will also increase the rendering speed as
>> there
>> is less HTML that needs to be processed.
>>
>> Steve
>>
>> -----Original Message-----
>> From: Ryan Florence [mailto:[email protected]]
>> Sent: Thursday, 16 July 2009 11:35 AM
>> To: [email protected]
>> Subject: [Moo] Re: custom attributes, (css) classes.. what to use?
>>
>>
>>> Seriously would you be waiting for HTML5 to be released?
>>
>>
>> Not sure what you mean ... but no I'm not waiting for it to be
>> released.  Yes, I like using data-whatever right now. No, I don't care
>> about validation when I'm making an application in a language created
>> to display medical documents.
>>
>>> don’t see the issue of using JS to store this information in the page
>>>
>>> itself.
>>
>>
>>
>> Me neither, and I do it often, too.
>>
>> However, sometimes when working with thousands of elements, I find it
>> simpler to just store it on the element in a custom attribute. Like
>> adding events to the elements I can get all the data I need using
>> this.get('whatever') instead of going to some object and drawing a
>> relationship, or writing an extra script to store it first and then
>> retrieve it.
>>
>>
>>
>> On Jul 15, 2009, at 6:57 PM, Steve Onnis wrote:
>>
>>>
>>> Seriously would you be waiting for HTML5 to be released?  How many
>>>
>>> years now
>>>
>>> has it been "in the works"?
>>>
>>>
>>> I don’t see the issue of using JS to store this information in the
>>>
>>> page
>>>
>>> itself.  Ondomready says the page dom has loaded but not everything
>>>
>>> on the
>>>
>>> page has loaded and rendered so any script you have on your pages
>>>
>>> will be
>>>
>>> available when domready is triggered.  If you have extended
>>>
>>> information for
>>>
>>> elements why not store it as JS objects?
>>>
>>>
>>> Steve
>>>
>>>
>>> -----Original Message-----
>>>
>>> From: Ryan Florence [mailto:[email protected]]
>>>
>>> Sent: Thursday, 16 July 2009 9:57 AM
>>>
>>> To: [email protected]
>>>
>>> Subject: [Moo] Re: custom attributes, (css) classes.. what to use?
>>>
>>>
>>>
>>> You nailed it all, so people can only really say ditto.  You obviusly
>>>
>>> know enough to make a good decision. Maybe thts why there aren't a lot
>>>
>>> of replies? I dunno.
>>>
>>>
>>> I personally use data-locked once I learned about html 5's
>>>
>>> implementation of
>>>
>>> it.
>>>
>>>
>>> Unless something that's locked has a lot to do with how it looks
>>>
>>> relative to other locked, unlocked elements--then I use classes like
>>>
>>> aaron.
>>>
>>>
>>> Right now I've got a page that stores a pyramid of children and
>>>
>>> parents on each element (network marketing chart tool). Classes would
>>>
>>> be a mess, the logic is already done server side (otherwise I'd use
>>>
>>> el.store) so I drop it all in data-children and data-parents.
>>>
>>>
>>> Valid html 5 is good enough for me.
>>>
>>>
>>>
>>>
>>> On 7/15/09, Rolf <[email protected]> wrote:
>>>>
>>>>
>>>> Hmm grmbl.. hoped on more responses and what others normally use :)
>>>>
>>>> I guess I will stick to (css) classes now and move to data-*
>>>>
>>>> attributes in a couple of months.
>>>>
>>>> Using other custom attributes looks neat, but maybe just awkward,
>>>>
>>>> since its not xml (and you kinda make it look like it with more
>>>>
>>>> custom
>>>>
>>>> than standard attributes).
>>>>
>>>>
>>>>
>>>> On Jul 14, 12:47 am, anutron <[email protected]> wrote:
>>>>>
>>>>> I use css classes. In my mind, saying that a div is of class
>>>>>
>>>>> "locked"
>>>>>
>>>>> makes
>>>>>
>>>>> sense to me. it's not <div css="locked"> it's class="locked" and the
>>>>>
>>>>> notion
>>>>>
>>>>> that I have numerous elements of that class makes sense to me,
>>>>>
>>>>> even if I
>>>>>
>>>>> don't style them. It makes it easy to style them later if I decide
>>>>>
>>>>> to,
>>>>>
>>>>> though.
>>>>>
>>>>> -aaron
>>>>>
>>>>>
>>>>> 2009/7/13 Fábio M. Costa (via Nabble) <
>>>>>
>>>>>
>>> [email protected]<ml-user
>>>
>>> %[email protected].
>>>
>>> com>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> on html5 there will be suport for custom attributes.
>>>>>>
>>>>>> If the attribute starts with "data-" it will be valid.
>>>>>>
>>>>>> Ex:
>>>>>
>>>>>
>>>>>> data-locked="true"
>>>>>
>>>>>
>>>>>> Its for sure what will be done for now on (if you want custom
>>>>>>
>>>>>> attributes).
>>>>>
>>>>>
>>>>>> Fábio Miranda Costa
>>>>>>
>>>>>> Solucione Sistemas
>>>>>>
>>>>>> Front-End Engineer
>>>>>>
>>>>>> http://meiocodigo.com
>>>>>
>>>>>
>>>>>> On Mon, Jul 13, 2009 at 6:32 PM, Rolf -nl
>>>>>>
>>>>>>
>>>
>> <plentyofr...@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=325
>>>
>>> 3430&i=0>
>>>>>>>
>>>>>>> wrote:
>>>>>
>>>>>
>>>>>>> This has been talked about before here (search for "custom
>>>>>>>
>>>>>>> attributes"
>>>>>>>
>>>>>>> or "custom properties") but without some sort of conclusion.
>>>>>>>
>>>>>>> Could try
>>>>>>>
>>>>>>> and revive an old post, but ok... let's start a fresh one in
>>>>>>>
>>>>>>> 2009 ;).
>>>>>
>>>>>
>>>>>>> When working with javascript+moo you have the possibility to use
>>>
>>> store/
>>>>>>>
>>>>>>> retrieve for custom data "attached" to an element. This works dead
>>>>>>>
>>>>>>> easy and is a no brainer basically.
>>>>>
>>>>>
>>>>>>> But what do you do when you have an html page (either created
>>>>>>>
>>>>>>> dynamically or not) and you apply javascript logic to various
>>>>>>>
>>>>>>> elements
>>>>>>>
>>>>>>> after the page is loaded (ondomready) in an unobtrusive way, and
>>>>>>>
>>>>>>> you
>>>>>>>
>>>>>>> need some "start up" data from the elements to use store to begin
>>>>>>>
>>>>>>> with.
>>>>>
>>>>>
>>>>>>> A simple case: a div element that is locked or not (the locked
>>>>>>>
>>>>>>> state
>>>>>>>
>>>>>>> is just an example, dunno what's it for ;)).
>>>>>
>>>>>
>>>>>>> So you could add a custom attribute:
>>>>>>>
>>>>>>> <div locked="true"></div>
>>>>>
>>>>>
>>>>>>> Or you could use a class:
>>>>>>>
>>>>>>> <div class="locked"></div>
>>>>>
>>>>>
>>>>>>> Or you could use rel (but hey, it's already in use for other
>>>>>>>
>>>>>>> stuff),
>>>>>>>
>>>>>>> let's just assume all valid attributes are already "filled".
>>>>>
>>>>>
>>>>>>> Solutions:
>>>>>>>
>>>>>>> - The custom attribute is not valid. You can enhance a standard
>>>>>>>
>>>>>>> DTD
>>>>>>>
>>>>>>> and create your own custom one. Ok, sounds tedious.
>>>>>>>
>>>>>>> - You could just use the custom attribute and forget about
>>>>>>>
>>>>>>> validation.
>>>>>>>
>>>>>>> - You could just use classes.. easy.. but hey, those are meant
>>>>>>>
>>>>>>> for css
>>>>>>>
>>>>>>> styling really, so could be confusing.
>>>>>
>>>>>
>>>>>>> What do you advise? I used css classes to "describe" this sort of
>>>>>>>
>>>>>>> stuff, but now I think about just adding some custom attributes
>>>>>>>
>>>>>>> to set
>>>>>>>
>>>>>>> "start up data", as it creates better looking html, and I can
>>>>>>>
>>>>>>> add more
>>>>>>>
>>>>>>> detailed "start up data" (e.g. the desired fx transition and
>>>>>>>
>>>>>>> length
>>>>>>>
>>>>>>> for each element).. and just forget about w3c.
>>>>>
>>>>>
>>>>>>> Any input?
>>>>>
>>>>>
>>>>>> ------------------------------
>>>>>>
>>>>>> View message @
>>>>>>
>>>>>> http://n2.nabble.com/-Moo--custom-attributes%2C-%28css%29-classes..-w
>>>>>>
>>>>>> ...
>>>>>>
>>>>>> To start a new topic under MooTools Users, email
>>>>>>
>>>>>>
>>> [email protected]<ml-node
>>>
>>> %[email protected]
>>>
>>> e.com>
>>>>>>
>>>>>> To unsubscribe from MooTools Users, click here< (link removed) >.
>>>>>
>>>>>
>>>>> -----
>>>>>
>>>>> The MooTools Tutorial:  http://www.mootorial.comwww.mootorial.com
>>>>>
>>>>> Clientcide:  http://www.clientcide.comwww.clientcide.com
>>>>>
>>>>> --
>>>>>
>>>>> View this message in
>>>>>
>>>>>
>>>
>> context:http://n2.nabble.com/-Moo--custom-attributes%2C-%28css%29-classes..-
>>>
>>> w...
>>>>>
>>>>> Sent from the MooTools Users mailing list archive at Nabble.com.
>>>
>>>
>>> --
>>>
>>> Sent from Gmail for mobile | mobile.google.com
>>>
>>>
>>
>>
>
>

-- 
Sent from Gmail for mobile | mobile.google.com

Reply via email to