Skip to main content

Azure Portal - Web-based code editor for App Services



A feature that caught my eye is the App Service Editor, a preview addition to the Development Tools section of the navigation bar of your app in the Azure Portal.

In essence it is a web-based editor for App Service. That's right, you can edit and save your web site LIVE with a clean, easy to use, web editor!

We have already come to love the Visual Studio Team Services code editor, which allows code and config edits pre-deployment but this feature is production level, post deploy / release. Cannot stress how useful this is for quick fixes and post deployment edits which would otherwise mean re-deploying or falling back to FTP. Project Kudu has been around for a while now but great to see it appearing as a first class citizen in the portal. The underlying functionality is provided by the Monaco Editor, which powers Visual Studio Code.

It is worth noting that if Continuous Integration (CI) has been enabled for your application, that the next build will overwrite your changes. But that is what you would expect, any changes made using the editor would need to be fed into your code repository / build workflow.



Code Editor

To access the editor, simply type 'App Service' or go to App Service Editor (Preview) in the Development Tools section of the left-hand navigation of your app. (see below)





After selecting 'GO' a nice tree view of your sites assets is visible along with the editor and options to view split pane and changes.


Search Features

There are a number of a really good search features, below are the results of my query text 'sitemap'. As toy can see it not only found the set of sitemap files, it also discovered the robots.txt.




There is also a nice 'Go to File...' button which give a context based search dialog



Code Repository Integration

Another great feature of the editor is the ability to hook up your repo from either a GIT source or Visual Studio Online. Then you can benefit from all the goodness of having the repository commands right from within the editor. 




Command Console

Backing up the GUI and driving the underlying command experience is the command console.



Typing 'help' in the console gives a list of available commands.


There is a lot that can be performed with that set of commands. Expect more commands to appear as other services are associated with your application.

Output

To support the commands and output of your application is the output window. It provides an ongoing set of information, warnings and errors, based on the logging level set. You will also see custom log output from your application.


Conclusion


The benefits of this new feature are clear for all to see and can mean the difference to being able to react immediately to certain scenarios or not. Obviously with this power does come responsibility and more than the usual care is required before committing changes with wide reaching impact. But if used conservatively, under the right circumstances and by those with the domain knowledge to understand the impact, it is a superb tool to have in your back pocket.



Available to discuss your next project.

Comments

Post a Comment

Popular posts from this blog

.Net TDD (Test Driven Development) by example - Part 1


Introduction In part 1 of this mini-series, we will develop a trivial business logic layer from scratch with a TDD approach with the goal of achieving the following:

Better code quality through Red, Green, RefactorDocumentation that grows as we develop and remains up to dateAutomatic regression test harness
This will primarily involve creating unit testsfirst, having them fail, making them pass and then refactoring the code to be of better quality and then re-running the tests. When using tools such as resharper to aid in refactoring code, having the tests in place right from the beginning really gives you peace of mind that you haven't broken anything. It also helps the thought processes while designing and developing an application or feature to be more targeted.

We will further develop the application in part 2 to add an MVC4 web client and continue the TDD story... 


Some BackgroundTest First or Test Driven development is a valuable software engineering practice. It c…

Azure Devops - Pull Request Merge Conflicts

Before a Git pull request can complete, any conflicts with the target branch must be resolved. Out of the box, at the time of writing this article, Azure DevOps requires this to be resolved locally. Following best practices to not allow direct commits to our release/master branches further exasperates the problem as we need to effectively clone the branch or go with a rebase approach, both of which break the natural flow of resolving the conflicts as part of the pull request.

With this extension, from the Microsoft DevLabs team via the Marketplace, you can resolve these conflicts online, as part of the pull request process, instead of being forced to break flow and resolve locally.




Online Experience After adding the extension the new conflicts tab is visible which enables conflict resolution in the familiar side by side review page as shown below:


Really nice extension, which should make resolving merge conflicts a much more straightforward part of the DevOps workflow. 

Additional - Ad…

Simple Git branching strategy for release cycles

Coming up with a branching strategy that works well can be challenging when working with multiple developers and managing release cycles. A simple approach is presented here to manage release cycles, with a small to medium sized team of developers while still being able to react to production issues and fix bugs. The primary goal being to isolate work streams without impacting development progress. BackgroundGit does not enforce any particular strategy when it comes to branching which is partly what makes it such a great and flexible repository. The problems start to arise though as you move into different stages of your development process. As an example, you have a release almost complete but don’t want to impede progress on the upcoming release cycle which is where the majority of effort is required. The Basic ApproachThe focus is around producing a release while still being able to react to hotfixes or production issues without impacting on going development of features. The branches…