-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Structure of Storage in the WordPress Tables #121
Comments
To quote @jackjamieson2 Current structure for feed items Feed items are stored as posts with a post type of yarns_microsub_post. These are hidden from the dashboard and rest of the site These posts have custom taxonomy to store: I also registered post statuses to track the read/unread status of each feed item, yarns_unread and yarns_read And I rely on the following properties stock to wordpress posts: ^^ That's all described in class-yarns-microsub-posts.php |
I'm working on revising this structure, as I personally think we can do better.
Also, the latest thinking on Microsub, out of the last session, is that Posts should be attached to a Source. And Channels would be a set of sources. This creates a problem of the current structure where individual posts are attached to a channel taxonomy. It would also address #61 and #45, which would benefit from this change in structure. So, this is what I'm going for in a rewrite:
@jackjamieson2 Does this make sense to you? |
Still thinking. The structure I'm proposing doesn't allow a source to be in multiple channels. The scenario being that you might want a channel for only articles, and have all your articles from all sources in there. The question being whether we need to cover all cases. |
Another consideration is the idea that a source is not necessarily a traditional feed. What if I decide to teach Yarns to poll an API and output that as a source? It might not have a traditional feed URL. |
I also want to adjust the terminology to match. Entries and Sources, over Posts and Feeds. |
Thanks @dshanske, This makes sense to me. Very clever to use post_parent - great idea! Like we discussed on slack, I think there’s value in being able to include a single source in multiple channels. E.g. I might want to file the same source in a ‘friends’ channel and a ‘photos’ channel. Actually, I don’t understand why the structure you propose here wouldn’t allow that — so maybe I’m misunderstanding something As for polling an API instead of a traditional feed URL, I’m not sure how to best do that. This seems like it might be a special case, in which case maybe an additional field could be used to indicate the source type (defaulting to a regular feed). I don’t know what’s best here, but it seems doable I don’t have any other comments, except this sounds really good. |
Re the API, that's not something I'm worried about right now. But by not tying the sources to URLs, you open the possibility in the future for different sources. You could reinterpret the new comments on your site as a source, for example. The structure would allow it. The only annoying complication would be entries from a source moving channels, as opposed to the whole source, but I have an idea for that. |
As I work on this, I'm trimming out some of the pieces to optimize it. The uid for the channel can be stored in the slug field of the term for each channel. With that, the entire channel structure stored in options becomes redundant. If we need to add other fields, taxonomy terms now support their own metadata and have a table. So, to get a list of channels, you just get a list of terms in the taxonomy. To get a list of sources in the channel, you just query which posts, as source is a post type, have that term added to it.... |
@jackjamieson2 If you want to follow...I've already made a lot of changes...but it is currently in a broken state. Committing just so you could see.. https://github.com/dshanske/yarns-microsub-server/tree/structure |
After Create Day, have a lot more to do, but got a lot done. Entries, Sources, and Channels are pretty much built and unit tested. Next need to rewrite polling to fit the new organization. Also, with sources being a post type, exploring adding sources using the standard Post screens, rather than custom. Have a lot of paradigms to change. |
This is different than #82 . The issue is about changing to custom tables. This is about redoing the usage of standard WordPress tables.
The text was updated successfully, but these errors were encountered: