Object Members: Renders a complete list of the object’s properties in a table. Plain Text: An unescaped string value (for example, new lines are rendered as multi-line text). Use the small menu next to the result to choose from the available visualizations, including:Ĭ#: A string escaped for C# (for example, new lines encoded as “\n”). By default, the object’s string representation is used, but Workbooks supports a number of additional visualizers to help you explore the results.
The result cell contains a representation of the last object reference in the code cell. This is how developers learn with Workbooks-by reading the documentation, and running and modifying the example code as they go.) You can edit any part of the code cell, to change how it runs or to experiment with the API, and press Play to run it again. Once the code has executed, a result cell is displayed below the code cell. You can also run the entire workbook at once from the Run menu. Press the Play button (arrow inside circle, on the far left) to execute that code cell (and any preceding code). When you click inside a code cell to give it focus, a set of action buttons appears below it (as shown in Figure 1). Features like syntax highlighting, code completion, compilation errors and keyboard shortcuts are all supported. Simple C# assignment will render the resulting object as a string.įigure 1 shows the resulting workbook before and after execution.įigure 1 MyFirst.workbook Before and After ExecutionĮxecutable code cells have a grey background and utilize the same editing experience as Visual Studio Code. The file extension is “.workbook.” You can write a workbook with any text editor, but the Xamarin Workbooks app includes the ability to create and edit workbooks, so you don’t really need to learn the underlying format. Workbooks files are essentially Markdown files with a YAML header they contain formatted text and code-fenced C#.
For Android and iOS, you should have Xamarin and the platform SDKs and simulators installed on your system.
You can download the Workbooks app for Mac and Windows at bit.ly/2ejXBj8. What, exactly, is Workbooks? In short: It’s live, interactive documentation for mobile and desktop platforms. As an added bonus, you can interact with the UI in the simulator, and explore the visual tree in the inspector view. Instead of creating your hundredth File | New Project to try something new, you get a faster, easier way to experiment. Writing your own Workbooks is easy, whether testing out an idea or building your own courseware to teach others.Because you’re using the same tools your mobile apps are written with, working code can be copied from Workbooks into your Xamarin app projects. Exploring online APIs-including Microsoft Azure services-can be done without the hassle of starting up a sample app and navigating through a maze of source files.Rather than just reading the docs, Workbooks lets you interactively code and test native mobile app features. Learning Xamarin Mobile app development becomes an interactive and exploratory process.In conjunction with device simulators, Workbooks gives you the same immersive experience as the online tools I mentioned, but provides the added ability to learn and experiment with the entire native SDKs for Android, iOS, Mac and Windows Presentation Foundation (WPF): Xamarin Workbooks brings this interactive-documentation-plus-live-coding concept to mobile and desktop application development. These new tools make learning simpler and more interactive.
Learning experiences, such as Gistlyn ( bit.ly/2d00D7b) and the new online C# tutorial from Microsoft ( bit.ly/28WyuvW), immerse the developer in documentation and code, without the overhead of solutions and projects.
NET compiler service-facilitates new experiences that mitigate these problems by removing the need for the IDE. Developers who’ve switched from Visual Basic to Eclipse to Xcode understand just how different these experiences can be. There can still be barriers to learning, though: Configuring the new IDE you want to start programming in, understanding the File | New Project wizard and all its options, typing or copying sample code into a new or existing project to try it out, and even navigating the resulting solution structure, can all be confusing for the uninitiated. Today, you’ll find a myriad of content online, from product documentation to developer blogs, from Stack Overflow to GitHub, and from podcasts to YouTube-even Xamarin University online classes. Once upon a time,printed technical books were the primary approach to learning new programming languages and SDKs. Volume 31 Number 12 The (Interactive) Future of Technical Docs