Class representation of ActivityPub Object Types #1

Closed
opened 2023-11-18 16:07:37 +01:00 by linos · 3 comments
Owner

@ruru4143 The current ActivityPub implementation does not use any real object oriented expandations of "Base_Object", rather Base_Object leaves all freedom to just put the "right" content everywhere.

If we think of the way we implement transformers, should we still stick to this approach where a transformer kind of can "decorate" the ActivityPub object, or should it select a available ActivityPub object (those could also be added via an addon system...)

@ruru4143 The current ActivityPub implementation does not use any real object oriented expandations of "Base_Object", rather Base_Object leaves all freedom to just put the "right" content everywhere. If we think of the way we implement transformers, should we still stick to this approach where a transformer kind of can "decorate" the ActivityPub object, or should it select a available ActivityPub object (those could also be added via an addon system...)
ruru4143 was assigned by linos 2023-11-20 17:48:02 +01:00
Author
Owner

My current opinion is, that the ActivityPub plugin should ship different object types as classes.

The question if if common extensions used by most software for a specific object type should be already included in the class.

The main advantage of this approach is that other transformers have a clear guideline visible which properties can/need to be set.

The current draft already uses PHP-docs for the JSON-LD context, but we could also use those to add information whether this field needs to be set for example in the Event object for compatibility with Mobilizon.

My current opinion is, that the ActivityPub plugin should ship different object types as classes. The question if if common extensions used by most software for a specific object type should be already included in the class. The main advantage of this approach is that other transformers have a clear guideline visible which properties can/need to be set. The current draft already uses PHP-docs for the JSON-LD context, but we could also use those to add information whether this field needs to be set for example in the Event object for compatibility with Mobilizon.
linos changed title from Object Type to Class representation of ActivityPub Object Types 2023-12-05 08:16:47 +01:00
Owner

I agree with your opinion on adding common object types and i also like your idea of coupling the properties and the context via the PHP-docs

I agree with your opinion on adding common object types and i also like your idea of coupling the properties and the context via the PHP-docs
Author
Owner
See https://github.com/Automattic/wordpress-activitypub/pull/629
linos closed this issue 2024-01-12 17:55:43 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Event-Federation/wordpress-activitypub#1
No description provided.