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.
I've thrown together a few very simple ideas on github:
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:
- C# 6 - an interactive workbook version of Xamarin's C# 6 Overview.
- Mastermind - an attempt to build a simple game.
- Magic Eight Ball - since I've built that for a number of different platforms previously:
See Miguel's talk (if you didn't already) for a really cool demo.
Some Notes
- 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.