[exprla-devel] Re: [XPL] The structure of classes in XPL
Status: Pre-Alpha
Brought to you by:
xpl2
|
From: reid_spencer <ras...@re...> - 2002-01-31 09:00:53
|
--- In xpl-dev@y..., "Garreth Galligan" <garreth.galligan@o...> wrote:
When worlds collide, data architecture meets class architecture :)
What's good for data: highly ridged, hierarchical and dependent
structures
is not necessarily good for a program.
We are certainly staring right into the face of some very big and
interesting contradictions:
Alexander E. Gutman wrote:
> As soon as XPL is closely related to XML, the structure
> of its classes should be as flexible as XML structures.
> Should we regard classes as XML element types
> (and, probably, declare them via schema element type definitions)
> or should we employ a standard approach of some kind?
Just to muddy the waters further - Why Classes at all?
Do Classes truly have any relevance to XML?
Is XML and Classes a square peg in a round hole?
Are we forcing OO paradigms on XML for paradigms' sake?
I don't have the answers, just a lot of questions :)
> but I wonder if there is a solution close (in flexibility) to that
of XML
I risk my neck and offer classless (no pun intended) object-based
languages
(e.g. Self, JavaScript) as an alternative model which perhaps more
closely
mirror the flexibility and *simplicity* of XML. XML already offers
many of
the advantages of a class based system, e.g. encapsulation via
namespaces.
This is probably not the best example in the world to display
prototyping,
but:
<occupation id="occupation1">
<title>mathematician</title>
<workplace>An Institute</workplace>
<alias>Some Guy</alias>
</occupation>
<occupation id="occupation2">
<title>programmer</title>
<workplace>A Company</workplace>
<alias>Some Guy</alias>
</occupation>
<me>
<human>
<name>Alexander Gutman</name>
<birthdate>1996-07-01</birthdate>
</human>
<prototype obj="occupation1">
<workplace>BlahBlah Institute</workplace>
<alias>Alex Goodman</alias>
</prototype>
<prototype obj="occupation2">
<alias>Alex Softman</alias>
<workplace>Foobar Software</workplace>
<prototype>
<description>My main job</description>
</prototype>
</prototype>
</me>
As you can see with the above we are looking at a much simpler DTD in
terms
of structural relationships. Defining 'objects' on the simplest level
possible in the DTD and building up relationships in the instance
document.
--- End forwarded message ---
|