Rewrite of json creation #4

Closed
opened 2023-11-29 12:13:28 +01:00 by ruru4143 · 6 comments
Owner

I'm not satisfied with how jsonld-objects (activities and transformed wp_posts) are created.

I plan to implement a builder pattern, with the transformers as directors.

I'm not satisfied with how jsonld-objects (activities and transformed wp_posts) are created. I plan to implement a [builder pattern](https://refactoring.guru/design-patterns/builder), with the transformers as directors.
ruru4143 added the due date 2023-12-04 2023-11-29 12:13:51 +01:00
Author
Owner

due time is for the first prototype

due time is for the first prototype
linos changed title from rewrite of json creation to Rewrite of json creation 2023-11-29 20:26:18 +01:00
Owner

The basic current strucure of the ActivityPub creation is influenced by the ActivityPub library of landrok. Wheres the library uses a builder pattern approach the ActivityPub WordPress plugin currently ommits this logic.

Pixelfed, one other major ActivityPub platform sharing the PHP language uses Fractal to generate the json-ld output. For example: https://github.com/pixelfed/pixelfed/blob/dev/app/Transformer/ActivityPub/Verb/CreateNote.php

TODO: Review what CastoPod does... https://code.castopod.org/adaures/castopod/-/blob/develop/modules/Fediverse/Core/AbstractObject.php

The basic current strucure of the ActivityPub creation is influenced by the [ActivityPub library of **landrok**](https://github.com/landrok/activitypub/blob/master/src/ActivityPhp/Server/Activity/CreateHandler.php). Wheres the library [uses a builder pattern approach](https://github.com/pixelfed/pixelfed/blob/dev/app/Transformer/ActivityPub/Verb/CreateNote.php) the ActivityPub WordPress plugin currently ommits this logic. **Pixelfed**, one other major ActivityPub platform sharing the PHP language uses **Fractal** to generate the json-ld output. For example: https://github.com/pixelfed/pixelfed/blob/dev/app/Transformer/ActivityPub/Verb/CreateNote.php TODO: Review what CastoPod does... https://code.castopod.org/adaures/castopod/-/blob/develop/modules/Fediverse/Core/AbstractObject.php
Owner

@ruru4143 I used this branch for my current changes as I did not want to spam the upstream github draft pull request too much! https://code.event-federation.eu/Event-Federation/wordpress-activitypub/src/branch/dev/extendable-transformers

@ruru4143 I used this branch for my current changes as I did not want to spam the upstream github draft pull request too much! https://code.event-federation.eu/Event-Federation/wordpress-activitypub/src/branch/dev/extendable-transformers
Author
Owner

There is an (unpolished) but nice looking tribe transformer now, can you give me feedback?

There is an (unpolished) but nice looking tribe transformer now, can you give me feedback?
Owner

There is an (unpolished) but nice looking tribe transformer now, can you give me feedback?

I will give it manual test with my local (not ready to share) Mobilizon interoperability setup and have a look at the code later today.

> There is an (unpolished) but nice looking tribe transformer now, can you give me feedback? I will give it manual test with my local (not ready to share) Mobilizon interoperability setup and have a look at the code later today.
Owner

https://github.com/Automattic/wordpress-activitypub/pull/629 implements a much more straight forward, though less powerful approach. This was chosen together with the upstream developers.

https://github.com/Automattic/wordpress-activitypub/pull/629 implements a much more straight forward, though less powerful approach. This was chosen together with the upstream developers.
linos closed this issue 2024-01-12 17:55:07 +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".

2023-12-04

Dependencies

No dependencies set.

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