XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Why does XML call them "attributes" and not name-value pairs?

The attribute takes up exactly the same amount of memory as the
element. So memory is not an argument. I like to use attributes when
it is readable - for example when exporting a database table.
-- 
Kit


ne 16. 1. 2022 v 19:10 odesílatel Dimitre Novatchev
<dnovatchev@gmail.com> napsal:
>
> > Computer memory space is not important today.
>
> Completely disagree.
>
> Availability of computer memory is and will always be important, and this is being proven by everyday needs and applications !
>
> With larger available RAM we get new applications that use/require enormous (in yesterday's terms) amount of memory that tests even today's limits. This is what drives making new generations of computers with more and more RAM.
>
> So, on the contrary: today it has become important not to be stopped by the "available memory" barriers.
>
> This is why we use streaming almost everywhere, and XSLT 3.0 for example (not to mention obvious other streaming - needing applications like video (Netflix!!!)) gives us a standard W3C-endorsed normative solution for working with huge (whatever this means at a certain point of time) XML documents.
>
> > The place on the screen is more important if one reads or edits such structured text
>
> If one reads a one-page document, then yes.
>
> But even 22 years ago there were XML documents "big" enough (like Hamlet.xml -- about 200KB) to overflow not one but many computer screens.
>
> This was one of the main driving reasons while we needed something more than reading and intuition in order to be able to navigate through an XML document and ask questions about it and get answers to these questions. This is what gave us XPath, XQuery and XSLT.
>
> And every developer knows about SoC (Separation of concerns), SRP (Single Responsibility Principle), Interface Segregation Principle (Many client-specific interfaces are better than one general purpose interface: no code should be forced to depend on methods it does not use), DRY (Don't repeat yourself).
>
> If we know in advance that some object doesn't have certain properties and abilities, like children, descendants, etc., specifying such properties and abilities for this object contradicts all these principles and is what we call an "antipattern" (a nice synonym for "stupid" and "bloated").
>
> Thanks,
> Dimitre
>
> On Sun, Jan 16, 2022 at 6:12 AM Kit <kit.saels@gmail.com> wrote:
>>
>> Computer memory space is not important today. The place on the screen
>> is more important if one reads or edits such structured text.
>> --
>> Kit
>>
>> ne 16. 1. 2022 v 2:54 odesílatel Dimitre Novatchev
>> <dnovatchev@gmail.com> napsal:
>> > Personally,  I am trying to use whenever possible attributes over elements, due to a "minor", boring reason: attributes take much less space in memory (and in written form) than elements, and this can lead to significant memory footprint difference and performance difference for big documents.
>> >
>> > Thanks,
>> > Dimitre


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS