Search the web
Sign In
New User? Sign Up
metal-dev · MetaL Development
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
obj. relations question   Message List  
Reply | Forward Message #528 of 553 |
Hello, Manuael and everybody,

I have the question regarding how to set up classes relationship.

I'm designing the system that must provide to end user the capabilities to
describe and create custom object types.
Such objects may have custom variables, validators, behaviour etc.

I have 2 components named 'Object_prototypes' and 'Object_instances' (verbose
names here for simplicity).

Object_prototypes contains metadata for future object that will be created by
end user.
Among of all this component contains class called 'Properties' that describes
properties of certain object (created by end user).
Fragment of 'Object_prototypes' definition:

<component>
<name>Object_prototypes</name>
...
<class>
<name>Objects</name>
...
<variable>
<name>title</name>
<type>text</type>
</variable>

<collection>
<name>properties</name>
<class>Properties</class>
<reference>title</reference>
</collection>
</class>
...
<class>
<name>Properties</name>

<variable>
<name>title</name>
<type>text</type>
</variable>

<collection>
<name>type</name>
<class>property_type</class> <!-- the type class not shown -->
<reference>type</reference>
</collection>

<variable>
<name>value</name>
<type>text</type>
</variable>

<variable>
<name>default_value</name>
<type>text</type>
</variable>
</class>
...
</component>


Further, the component 'Object_instances' will contains object instances created
by end user based on one of 'Object_prototypes' class object.
Each object must have its own set of properties regarding to template this
object based on.
The instance of object of certain type may have 'private' value of any property
either must take default value from 'prototype' if private value not specified.

Fragment of 'Object_instances' definition:

<component>
<name>Object_instances</name>
...
<class>
<name>Instance</name>

<variable>
<name>title</name>
<type>text</type>
</variable>

<variable>
<name>template</name>
<component>Object_prototypes</component>
<class>Objects</class>
</variable>

<collection>
<name>properties</name>
<class>instance_properties</class>
<reference>title</reference>
</collection>
</class>

<class>
<name>instance_properties</name>

<!-- below I'm stuck -->
<variable>
<name>property</name>
<component>Object_prototypes</component>
<class>Properties</class>
</variable>

<variable>
<name>value</name>
<type>text</type>
</variable>
</class>
...
</component>


I feel like I'm inventing a wheel because it seems I'm trying to do the thing
that is always done.
I see that it will be meta meta system, but how to handle my needs in more
effective way?
Maybe the way I'm trying to solve this problem now is fundamentaly mistaken and
I have to use native metastorage capabilities to achieve end user fuctionality?
In short, I'm stuck.

Besr regards,
Sergey Klenin

[Non-text portions of this message have been removed]




Mon Apr 21, 2008 11:12 am

scleann@...
Send Email Send Email

Forward
Message #528 of 553 |
Expand Messages Author Sort by Date

Hello, Manuael and everybody, I have the question regarding how to set up classes relationship. I'm designing the system that must provide to end user the...
Sergey Klenin
scleann@...
Send Email
Apr 21, 2008
6:08 pm

Hello, ... This is a bit confusing, not because of your definitions, but rather because you do not tell me what exactly what you want to do and you are not...
Manuel Lemos
mallemos
Offline Send Email
Apr 21, 2008
10:41 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help