Over the past couple of months we’ve been hard at work on the service side of our architecture, we’ve changed the length of our sprints from 4 weeks to 3 weeks (better alignment with other Microsoft teams), and we’ve been pushing out incremental updates to the client experiences every few weeks instead of monthly. As a result, we’ve been a little quiet here on the blog.
In this post I’ll try to catch you up and show some of the changes we’ve made to make your development experiences with Monaco that much more enjoyable.
Is my file saved?
Many online experiences don’t require an explicit “Save” action by the user to persist data. For example, I’m writing this blog in Word Online and at the bottom of the page in the status bar I can see two states: "SAVING…" and "SAVED TO ONENOTE".
Monaco has the same auto-save experience since its inception. You don’t need to explicitly save your files, they will be persisted on idle, which is generally within 1 or 2 seconds. Our telemetry shows us though that developers like to press Ctrl+S to save files! In fact, 95% of all keyboard commands are Ctrl+S!
It appears that there is a lot of muscle memory out there or people are concerned that they will lose data. We could have added an explicit Save button to the workbench, but we like the clean experience of web applications (and even client apps like OneNote) that eliminate the need to constantly save. Therefore, we took a cue from Office Online and added "SAVING…" and "SAVED" indicators to the workbench, at the top of the editor.
Our hope is that this is enough of a visual indicator that your files are always safe and you don’t have to press Ctrl+S quite so often, making your experience with Monaco even smoother. After we’ve collected additional telemetry data, I’ll let you know if the change makes a difference.
git user.name and user.email
When using git on your desktop you usually set the user.name and user.email globally, and just one time. When using git in Monaco, every website is conceptually the same as a new desktop. So, on the first commit you are always prompted to set these configuration values.
We tried to make this process easier by opening the configuration editor in the console on first commit. Now, on first commit from the git viewlet we will set the global user.email and user.name to the email you are logged into the Azure portal with. To change the git configuration options, simply issue git config –global -e from the command prompt:
The Monaco editor is used in a number of places across Microsoft and one of our partners requested support for fenced code blocks.
As you can see above on the left, we also do proper syntax colorization in the markdown based on the language mode supplied after the triple back-tic. Interestingly, we use the same tokenizer to color source code in the preview, on the right.
New Node Inspector
Azure recently updated to the latest version of node-inspector for debugging Node sites using Chrome. It’s a two step process to enable the tool. First, enable Web Sockets on the CONFIGURE tab for your site in the Azure portal.
Next, update the web.config file to turn on debugging. If web.config isn’t present, simply run the site once from within Monaco and we will generate it for you.
Restart the site (press Run in Monaco), open a new tab in Chrome, and browse to http://yoursitename.azurewebsites.net/app.js/debug to load the debugger (assuming “app.js” is your startup file). For more information on using node inspector in Azure, check out this great article.
Try Azure Websites
Admittedly, getting started with Azure takes a little commitment. You need to provide a credit card to get started, even with a trial subscription (it helps prevent abuse of the service).
The site will expire in about 30 minutes after creation so we did some work to make the whole experience smoother and let you know how much time you have before you need to push the code to a repository or download it as a zip (from the overflow commands on the EXPLORE viewlet).
Send your friends to http://azure.microsoft.com/en-us/services/websites/ and have them create a Website for free. When they click on "Edit in Visual Studio Online" they will be able to experience the full power of Azure Websites developed with Monaco.
Thanks for following us. Try out the latest features of Monaco and let us know what you think!