Marcus Lindblom wrote:
> Dirk Reiners wrote:
>
>> I consider those places bugs. The Field-Interface has to work 
>> completely, or it's not useful, IMHO.
>   
> Is it possible to design something that works solely with data like 
> that? It seems to be kind of difficult, but I'm no wizard. :) Most other 
> designs I've seen tend to mask set/get-calls as simple data without 
> side-effects, rather than the other way around. The set/get-pattern is 
> seen in ActiveX/COM,  JavaBeans, Python, etc.
> 
> Making a reflective interface is good, but having it work on data and a 
> changed() function seems, to me, a bit awkward and error-prone. Are 
> there other succesful systems that have used that?

Sorry for replying to myself again. I was reading Dev/WindowGLFields and 
figured that that problem might be related to this, and it would perhaps 
not exist if field-set was done via member functions (setFoo()) rather 
than data-copy (_sfFoo.copyFromBin())?

Is it just a matter of how to generate the FooBase-code simply and 
efficiently, and in the process stopping the user from implementing 
set-functions with sideeffects altogether? If a fielddesc in .fcd could 
be tagged with 'custom set function' (so that one must implement it in 
Foo, otherwise it would be autogenerated as today, in FooBase), as well 
as the sync-functions being a part of Foo (but in a separate cpp, 
FooImpl.cpp), not FooBase (to allow access without virtual funcions), 
this might have been an option?

Of course, it would be a bit trickier to externalize the to/from 
string/bin stuff, but certainly possible? .. or would the performance 
cost be too great for such an 'external' scheme? (I can't see why, since 
most of it would inline anyway?)

Or are there other issues which come in to play? I'm just curious as to 
the design decisions here. (I'm doing something similar, and I haven't 
yet scaled it up to OpenSG-size & functionality yet, so..)

Cheers,
/Marcus

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to