I’ve been using SB for about 2.5 weeks and have been loving it. The ability to throw in dynamic queries, customize templates / widgets, and write space-script
’s to extend functionality is amazing. Thank you, Zef!
The main areas I would love to see more functionality on (and where I’ve been hacking it together so far) is in exposing more of the relational model to the user.
To illustrate one example: I’ve hacked together a light-weight personal CRM/PRM in Silverbullet using Meeting
and Contact
and Organization
objects and have been using frontmatter attributes and queries to link in between:
- on each
Meeting
object, I have acontact
attribute with a value ofContact/[NAME]
which links to the correspondingContact
object for the person I had the meeting with - my
Meeting
template has asuggestedName: "Meeting/[INSERT NAME]-{{today}}"
and I prepopulate thecontact
attribute with areplace
call and a quick regex to isolate the name from@page.name
- on my
Contact
template, I have a query block that shows every meeting I’ve had with the individual by querying allmeeting
objects againstcontact = @page.name
- I’ve had to hack together things an updated
Contact.last_connected
attribute which I’ve done by adding a custom command in myMeeting
template which useseditor.setText
to quickly create a template block in to runs a custom functionchangeAttribute(@page.contact, 'last_connected', @page.date)
and then removes it (so that I can access theMeeting
’s attributes)
In a traditional relational database, a lot of this would be handled with foreign key references and aggregation functions on GROUP BY queries or table JOINs (as I currently don’t have a great way of handling multi-contact meetings or things like counting the number of contacts at a particular organization).
I know the intent of SB is not to be a full-fledged database app (although that’s why I heavily considered Siyuan and AnyType while I was thinking about what to use) but I think exposing more relational functionality could be quite powerful and just wanted to plant that seed.