[DISCUSSION] Object Relational Mapping (ORM) for different programming languages

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Oct 10 15:55:12 CDT 2007


On 10/10/07 8:55 PM, "Thorsten Hohage" <thohage at objectmanufactur.com> wrote:

> --------
> 
> I know I can't explain everything necessary to get behind the full
> concept. But In my ORM for RB (DynamicDataObjects - DDO) you can use
> a code style, but in most cases you don't need to touch any code, but
> use an external XML file.
> 
> So in Code style you say
> 
> In the constructor of an inherited class you say
> 
>    App.DDO.SchemaManager.AddJoinToObjects( _
>    "optionValues","", "DBOBasicOption", "idserial", _
>    DDOSchema.CREATE_NOTHING, DDOSchema.CLONE_CLEAR,
> DDOSchema.DELETE_CASCADE, _
>    DDOSchema.JOIN_MANY, _
>    DDOSchema.PREFETCH_YES, DDOSchema.DESERIALIZE_YES, _
>    "option", "", "DBOBasicOptionValue", "basicOptionSerial", _
>    DDOSchema.CREATE_NOTIFY, DDOSchema.CLONE_CLEAR,
> DDOSchema.DELETE_NOTIFY, _
>    DDOSchema.PREFETCH_NO, DDOSchema.DESERIALIZE_NO)
> 
> where
> 
> "optionValues" - name of the join on "parent" side
> "DBOBasicOption" - parent class name
> "idserial" - name of the UID for this class (=table)
> 
> "option" - name of the join on "child" side
> "DBOBasicOptionValue" - child class name
> "basicOptionSerial" - name of the id in this class (=table)
> 
> to acces the values I used KVC keyValueCoding so i.e. I used GetValue
> ("(some more here). optionValues.Option") to acces a value in a
> joined class.
> 
> 
> In a high level Framework on top of the DDOs the statement is far
> shorter
> 
> DefineMeAsInfoItem("GLOSSERPMaster", "currencys","","erp","")
> 
> "GLOSSERPMaster" - parent class name
> "currencys" - name of the join on "parent" side
> "erp" - name of the join on "child" side
> 
> But of course, THERE are the RoR issue back, because using this
> framework will force to need fix names, (of course in contrast to RoR
> and much better, there are few constants to change the fix name you
> like)
> 
> 
> But in most cases you didn't need any class for extend business
> logic, so you can specify such a join as an xml "line"
> 
> <schemaJoins valueType="ddoBasicDynamicInterface"
> dynamicClassName="DDOXMLSchemaJoinData"  
> schemaName="DDOXMLSchemaJoinData">
> <schemaJoin objectId="3325" so_serial="3301"
> parentObjectName="MFVisitors"
> parentJoinName="companions" parentIDName="idserial"
> parentPrefetch="True"
> parentCreateAction="Nothing" parentDeleteAction="Cascade"
> parentCloneAction="Clear"
> childObjectName="MFVisitors" childJoinName="visitor"
> childIDName="visitor_id"
> childPrefetch="FALSE" childCreateAction="Nothing"
> childDeleteAction="Notify"
> childCloneAction="Copy"/>
> </schemaJoins>
> 
> I just finished an exhibition visitors management system using only a
> XML definition without any class defined in RB.

Frankly saying I understand almost nothing from this :-)
A lots of parameters in single place.

And the main question. Above CodeStyle or XML ways define what?
    Table + its link to some other child table?

Or this is only description of LINK ?


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list