Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am ignorant of the underlying mastodon protocol, but couldn't there be a (mostly) HTML-only frontend for mastodon, or something like that?

I really hated that about twitter too, that for reading a goddamn SMS-lenghty tiny text it couldn't just have been "prerendered" on the server, no, you have to fetch a million things and watch different spinners before you get at it.



The awful thing about Mastodon is it used to serve inert HTML but this behavior was removed.

https://github.com/mastodon/mastodon/issues/19953


You can thank W3C's ActivityPub charter for that, who, in their infinite wisdom, have decided it woukd make sense to use JSON for sending hypertext around, rather than, you know, HTML.


How else would you deliver the metadata accompanying the content? HTTP headers are too flat, they don't support nested elements.

In contrast, JSON parsers are a dime a dozen, and HTTP+JSON has been the standard in APIs for well over a decade now. Be happy Mastodon isn't based on XML-SOAP, that would have been a right fucking mess and depending how rigid the clients would parse it, you'd end up with immediate ossification of the protocol instead of people just adding new fields for new functions (e.g. polls).


Why would you get ossification? The point of XML based RPC protocols was that XML had lots of extension features like namespaces and parsers were dime a dozen.

The forgotten 2000-era web had solutions for all of this in the form of XML and XSLT. The server serves XML, which is "semantic" (data structures). The XML has a header pointing to an XSLT file, which defines a functional transform of the XML to HTML. You could use namespaces to embed semantic info inside other schemas like XHTML if you wanted, also.

It never took off, partly because XSLT was a pretty unpleasant programming language (I actually built a product with it back in the day), partly due to latency reasons and partly because the XML vision wasn't sufficiently backwards compatible with regular HTML.

These days browsers don't support such tech anymore, so you need to treat HTML+JS as an app platform, HTTP as an RPC protocol and JSON as the serialization format but because that arrangement was never really designed per se there are lots of little missing pieces, like being able to discover the RPC protocol a web app uses without actually executing that app.


Ah the obsession with "metadata". Looks like W3C spent too much time on non-problems of the "meta" kind first with XML and then RDF/JSON-LD, now they're looking for problems to their "solutions".


Sure, you can write or run your own fediverse server that renders HTML-only page, and every time you see a Mastodon link you paste it in your server's lookup form and browse it from there. Honk (https://humungus.tedunangst.com/r/honk) is HTML only and very minimalistic. I'm sure there's frontends or clients for Mastodon that use less HTML as well, so you can also swap out Mastodon's default frontend for a less heavy one.


GoToSocial exposes an API for basic frontends pretty much. https://github.com/superseriousbusiness/gotosocial



I must be misunderstanding this site. Is it really a third party you give your login/password to who then uses it to log into the instance and handle the activitypub?

And people do this?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: