Amiga.org

Amiga computer related discussion => Amiga/MorphOS/AROS Programmers Forum => Topic started by: hth313 on June 30, 2019, 10:53:21 PM

Title: Datatypes and boopsi architecture documents?
Post by: hth313 on June 30, 2019, 10:53:21 PM
Having messed around inside some datatype code I begin to wonder if there is any good in depth architecture description of it?

I mean, there are attributes to be set, asynchronous layout, notification and then rendering going on. The descriptions I found are some example code and very basic descriptions of how to do it, but I have yet to find an in depth description of how it is actually supposed to work. What are the roles, responsibilities, in which order does it happen, how to do proper locking and how does typical things happen over time?

I have looked at some code and even tried to address some issues in it, but it is hard to fully comprehend it. That is also based on object oriented programming does not help (as usual), as it is all about delegating and not explicitly expose how it works, which makes it hard to follow.

So far my idea is that changes somehow cause a layout (not sure how), which can be kicked off asynchronously internally, which sends a notification that is picked up by another object or more often the IDCMP in the main app, which does a RefreshDTObjects which translates to a rendering operation. Normally the layout and renderer have a semaphore to prevent simultaneous access, which I suppose are not to happen so often in reality as they are kind of chained together in sequence by these object messages, as otherwise the renderer could get blocked (holding a layer lock) waiting for the object semaphore when a slow layout is being done.

I may have misunderstood things above, a pointer to a good architecture description would probably be very helpful to me...
Title: Re: Datatypes and boopsi architecture documents?
Post by: NinjaCyborg on July 01, 2019, 06:58:05 AM
Do you have the RKRMs? and OS3 NDK?
Title: Re: Datatypes and boopsi architecture documents?
Post by: hth313 on July 01, 2019, 05:01:03 PM
Yes, I have all of them.
Title: Re: Datatypes and boopsi architecture documents?
Post by: NinjaCyborg on July 01, 2019, 07:29:24 PM
Then you've probably got all the information there is on the topic. Aminet might have some third party content also, including plenty of datatypes source code to crib from.
Title: Re: Datatypes and boopsi architecture documents?
Post by: hth313 on July 01, 2019, 10:26:20 PM
OK, I had a hunch about that. The documentation is mostly aimed at developers using datatypes, not so much about implementing them. I suppose I need to read some source then and try to figure out how the methods and threads are supposed to interact.
Title: Re: Datatypes and boopsi architecture documents?
Post by: kolla on July 02, 2019, 06:54:25 AM
The sources are out there :)
Title: Re: Datatypes and boopsi architecture documents?
Post by: hth313 on July 03, 2019, 04:59:32 AM
It seems some source reading is the best way forward at the moment. I found a couple of pages with some information on how to implement datatypes. A quick look indicates that they both contain a good amount of information, but fall a bit short in describing the actual interactions between involved processes and the internal states for a non-trivial datatype. Basically, what I miss is a cook-book with best practises, but I suppose you cannot have it all.

References (for the benefit of anyone interested and who may stumble on this thread in the future):
https://en.wikibooks.org/wiki/Aros/Developer/Docs/Libraries/DataTypes
https://wiki.amigaos.net/wiki/Writing_Datatype_Classes
Title: Re: Datatypes and boopsi architecture documents?
Post by: NinjaCyborg on July 03, 2019, 07:17:03 PM
Correct. But, there are loads of examples on aminet.
Title: Re: Datatypes and boopsi architecture documents?
Post by: SamuraiCrow on July 04, 2019, 12:27:32 PM
I managed to find Stefan Ruppert (https://ruppert-it.de/) by googling.  He gave some talks about making and using datatypes at the Gateway Amiga show in 1998.  I still have the handouts somewhere in my stash.  It seems he's been out of the Amiga scene a few years though.  If he doesn't object, I can probably dig around until I find those handouts and scan them.
Title: Re: Datatypes and boopsi architecture documents?
Post by: hth313 on July 05, 2019, 07:14:41 AM
I downloaded several of Stefan Ruppert's datatypes from aminet, seems like a lot of good stuff!

There are plenty of datatypes on aminet as NinjaCyborg points out, I will have a lot to play with for long time.
Title: Re: Datatypes and boopsi architecture documents?
Post by: Minuous on July 05, 2019, 08:29:57 AM
@SamuraiCrow:

That would be great.

Title: Re: Datatypes and boopsi architecture documents?
Post by: SamuraiCrow on July 05, 2019, 03:53:46 PM
I looked through my boxes and haven't found the handouts yet.  Sorry to get your hopes up.