[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Syntax + object model


hashmap syntax
> From: Bill de hÓra [mailto:bill.dehora@p...]

> > Hashmaps, arrays, red-black trees, dictionaries, etc. all 
> operate on pretty
> > much the same principles (at least in the OO languages) 
> regardless of the
> > actual language they're implemented in.  
> 
> Oh sure, but have you tried moving them around (even only amongst OO 
> languages)? Perhaps this is ungenerous, but sharing basic data 
> structures seems to be something of a continuing research 
> project in WS.

The point is not to move the implementations around, but to describe a set
of behaviors to be )(optionally) implemented.  Nobody's talking about
sharing the data structures, but sharing the serialization of those data
structures through XML, and not losing the intent of those structures in the
process.

Basically, it's adding a bit extra information to the serialization that can
potentially drive automation in a more efficient way.  This is as opposed to
a DOM, or fine-grained and inefficient object instances. It does not
presribe a language, and implementation, or even specifics of the internal
representation. It doesn't even prohibit alternate internal structure more
amenable to the consumer's processes.  All it does is avoid the loss of
potentially useful information in regards to how the originator found the
best way to internally represent the data that was serialized.  

Example:

<a>
   <b key="233">"foo"</b>
   <b key="245">"bar"</b>
   <b key="335">"baz"</b>
</a>

Normally, if you're consuming this data and hand-coding the classes, you'll
have enough understanding of the data to write and efficient structure,
whether it's and array, dictionary, or hashmap.  But what if you want to
generate code?  Not enough information here.   

The problem with code generation utilities that I've used is that they will
generate lowest common denominator type data structures.  You can modify
what's generated through mapping files, but these don't seem to support
higher-level type data structures (it's more atom-to-atom fine grained
mapping that's supported).

I think if you add information to the serialization that the above
informatio was generated from, say, a hashmap, then you've added some pretty
useful processing information (and actually documented some semantics as
well):

<!-- using Bad Boy non-XML syntax for clarity -->

<a {struct="hashmap" keyval="key" keytype="int" target="text-node"}>
   <b key="233">"foo"</b>
   <b key="245">"bar"</b>
   <b key="335">"baz"</b>
</a>
   
Now this is useful information for even non-OO representations, such as SQL
tables.  This doesn't even describe an interface that need to be conformed
to.



> 
> Bill de hÓra
> --
> Propylon
> www.propylon.com
> 
> 

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.