The first public demonstration of Xamarin’s new Workbooks idea was Miguel de Icaza’s //build 2016
talk “Mobile First”
(although he first wrote about it back in February
). In his talk, Miguel demonstrates a new take on interactive documentation in which a Markdown-formatted file can live-execute C# code-fenced blocks; not just in-line but also in an iOS or Android simulator.
This opens up a great opportunity to write and share interactive documentation that not only describes an API or feature, but shows it in action. Further, it’s easy to write, being based on the well-known Markdown format.
Give it a try!
You can now try Workbooks for yourself! The editor can be downloaded here, and there is some Workbook documentation on the Xamarin developer portal.
I’ve thrown together a few very simple ideas on github:
See Miguel’s talk
(if you didn’t already) for a really cool demo.
- They’re written in Markdown, but with a .workbook file extension.
- Each file begins with a small JSON-formatted metadata section. The editor will add this for you.
- C# code inside triple-backtick code fences will be executed when the file is viewed in the Workbooks editor.
There’s sure to be other resources popping up now that the project preview is publicly available — Ben Bishop’s video is the first community resource I’ve seen. Can’t wait to see what everyone creates with it!