Written by Ruben Verborgh   
Not Version related

Reference
This document explains how the new Live Editing feature works for Umbraco programmers.

Chapters

Overview

Attention: the features described in this document are only available with the latest source code version of Umbraco 4 beta, which is available on CodePlex.

Be sure to read the book Introduction to Live Editing first, so that you can see the latest features of Live Editing.

Introduction

First of all, we can proudly say about the Live Editing features that it was implemented in a architecturally well-considered, non-hacked way. Also, each class was coded according to theIDesign C# guidelines and is fully commented. Don't believe me on my word, go check that out for yourself.

All Live Editing code can be found in the Presentation project, inside the umbraco/LiveEditing folder. To get you started, a class diagram is included in the root folder.

Main components

The first important change is an addition to Umbraco itself (which should have been there a while ago already): the UmbracoContext. This class provides information about the current Umbraco request, just as the HttpContext provides information about the current HTTP request. Analogously, UmbracoContext.Current returns the Umbraco context associated with the current request.

UmbracoContext contains a property LiveEditingContext, which returns an object containing all information about the current Live Editing request. It has an Updates list, which contains all pending changes to the current ASP.Net page. Next to that, it has a Menu containing the currently active modules.

To activate Live Editing, an instance of the LiveEditingManager control is put on the Umbraco main masterpage. The manager handles the creation of controls like the LiveEditingToolbar and modules such as ItemEditor. It also adds functionality for client-server communication in an event-driven way.

Explore the coming Umbraco 4

Brilliant umbraco hosting provided by FAB-IT