Themes
- -- Themes are “applet compositions” and provide a traditional browser web application way of - using them. Each theme is unique, not just a skin (eg. not like winamp skins). -
- -- For example, most themes here will limit the currently playing audio tracks to one item, - but you might as well create a DJ theme that can play multiple items at the same time. -
- -Abstractions
- -- These are applet configurations that enable certain use cases outside the traditional web - app experience. Just like themes, these include various assumptions of how certain parts - of the system should interact. -
- -TODO: Enable intelligent user (ai) agent use-case.
- -Constituents
- -- Constituents are UI applets that are used in themes and abstractions. These are organised - per theme or abstraction, but that doesn't mean they are restricted to that theme or - abstraction, you can mix and match as you like. You can even use them on their own. -
- -- Some themes may be constructed out of various applets that are not listed here. The reason - for that is those applets cannot be used solely on their own, they require an external - context to coordinate them. -
- -- There's tradeoffs to both approaches. A particular tradeoff to keep in mind for constituents - is that they'll have nested dependencies. So when overriding applets dependencies, the - overrides need to be passed down the tree. -
- -Applets
- -- Applets are web applets, the components of the system. These - are then recombined into an entire music player experience, or whatever you want to build. -
- -Demos
- -Just some utility web pages to help demo the system.
- -Cross-Origin
- -- You can use applets from different origins. However, one important caveat to remember is state partitioning. This causes local state (eg. IndexedDB) to be different when the applet is used on a - different domain versus using the applet directly. There might be ways around state - partitioning, but I haven't found a user-friendly way of doing so. -
- -- That said, there isn't that much local state that needs to be shared cross origin. Much of it is associated with the input applets and that configuration is saved in your chosen - output applet. So essentially, state partitioning behaves as if the two domains are on different - devices; so using an output applet to sync data between devices works nicely. It does mean you - have to somehow configure the same output applet in both contexts. -
-Build your own
- -- Ideally you'd be able to mix and match these applets to build your own music player. There - are still a few todos and unknowns here: -
- --
-
- - This is currently using a fork of the web applets SDK that adds a few features (waiting on - PRs). Meaning that it won't be as easy to write your own applets in the same way as done - here. - -
- - I wrote some custom code on top of the web applets SDK that makes the applets talk to each - other over a broadcast channel. This should ideally become a JS library or added to the - web applets SDK. Though you can just copy-paste from the Diffuse repo if you want (it's - not that much code). - -
- ... Probably a bunch of stuff I'm forgetting, teaching materials, etc ... -