2012

Friday, December 28, 2012 by Per Ploug

Umbraco 6 is coming soon, and its arrival marks another huge step forward for us, as it is the culmination of the very ambitious plan we announced just 6 months ago.

This previous Summer we promised everyone that we would fully support ASP.NET MVC, implement new and better API’s, a faster and cleaner request pipeline and a completely new datalayer.

With the coming Umbraco 6, we will be delivering a massive amount of improvements and new features, which will make the way you build Umbraco sites change for the better.

Getting training up to speed

As Umbraco the CMS is progressing at a high pace, so must the rest of our company. We’re currently working hard on getting new courses ready, so we can teach all these new things to developers, as well as preparing a new Umbraco.tv site, which will also cover all the new things in Umbraco 6.

For webdesigners on the Level 1 masterclass, we’re taking a much closer look at how the new uComponents data controls can be used to create powerful editing UI’s and dig into the much improved media section, both features added in the last couple of months.

For .Net developers, the training will especially cover all the new API’s and how you use them to create content, media and modify existing data. We will also explore the new options included in the MVC support, such as views, partial views, Surface Controllers and the API’s associated with using MVC.

The first round of these new courses will take place in Copenhagen in January and then London and Seattle in February.

In demand

Everywhere you look these days, you see a high demand for developers who have experience with Umbraco and MVC, which is just a perfect fit with Umbraco 6 and its support for MVC.

Just a couple of the current open positions:

Get a head start

If you haven’t already, get your hands on one of the nightly builds of Umbraco 6 and explore the new features, and even better, invest in your job and future by becoming a Certified Umbraco 6 developer at one of our Master Classes in January and February, there is no faster way to get into Umbraco than this

Think an Umbraco Masterclass is something for you? see our training schedule.

Friday, December 28, 2012 by Sebastiaan Janssen


In this last progress blog post of the year, I’m here to tell you that v6 is being delayed a little bit.


Internal testing revealed some issues that require some extra time to fix and properly test, I felt like we shouldn’t release this just yet. It’s frustrating because we’re SO close, but we need a few more fixes and some more testing before we’re happy to show you this work.
Who releases something on the Friday between Christmas and newyears anyway? ;-)

Close -but -no -cigar

If you really can’t wait, there is always the nightlies for you to check out. As of build 92, we switched a lot of the backoffice calls to use the new API and while most things are working, there is still some friction there.
We know of a few bugs that you might run into, like some datatypes producing a nasty error that can’t be fixed easily and a few packages not working yet.

Package developers who are bored of spending time with their families should also check if their packages are still working.
I tested the top 30 packages and have worked with some of their developers already to work out some bugs, but some of them are still failing, we’re looking into that but it would be a great help if you could tell us why things aren’t working, after all you know your code way more intimately than we do.

Things you can expect to break are:

  • The upgrade to MVC4 and therefore Razor 2.0 leads to stricter checking of misplaced @ signs. For details, issue 1143.
  • If your code does queries to the cmsTab table of the tabId column in cmsPropertyType, you will get errors because they have been renamed, details in issue 1353.
  • Enthusiastic developers who have already implemented the IPublishedContent interface introduced in 4.11 will notice a slight change to support the Url property, see issue 1065.
  • If you do direct queries to the umbracoApp and umbracoAppTree tables, you will notice they are now removed (they have been empty since 4.10), more info in issue 682.


We’re looking forward to see any other issues you may find so we can make this release better!

One other thing I’m really proud of is that, not only are we delivering a great CMS for you, we also sometimes feel that we need to fix third party tools that we like using. As you may now, in v6 we’ll be using PetaPoco to do all of our data access, but there was one problem: it didn’t fully support medium trust.
Morten and Shannon have worked together to make sure we can still support medium trust by fixing PetaPoco and Shannon made a pull request for his fix. I love open source!

By the way, we’re still doing nightly builds of 4.11.2 as well and I’m holding of the release of that version a little longer until we can put in a fix for the NiceUrl issues some people are experiencing. However, I can recommend everybody using 4.11.1 to upgrade (just overwrite the bin folder, that’s all) to get all of these lovely fixes.

Finally, on a personal note let me just say that I’m so happy that in the past few months we’ve made huge progress on improving Umbraco’s core, introducing MVC into Umbraco, an overall focus on higher quality releases and getting a LOT of community help through pull requests, patches, etc.
Thank you all, I am super excited to continue this work in 2013!

Wishing you a very Umbraco new year!

Friday, December 21, 2012 by Sebastiaan Janssen
It’s been a very very busy few weeks at the Umbraco HQ, what we’ve been up to:

  • We’ve been trying to get most of the team to focus on making big progress on Concorde
  • There’s been a lot of work done to stabilize the 4.x branch of the core
  • Of course a lot of progress has been made on the 6.0.0 release coming next week
  • And we managed (to our own surprise) to get Our Umbraco open sourced and in the hands of the community who’ve been asking for this for a long time

I'll focus on the core for this post. It has been evolving rapidly and in a previous progress post I’ve already talked about relaxing the amount of huge changes a little. But not after we introduce... *drumroll please*.. v6.0.0 with a new API!

Yes, there will finally be more consistent APIs geared towards developers who are creating and manipulating content and media (more areas to come later)! In addition to that, we’ve replaced the “SqlHelper” with PetaPoco, which is the new datalayer in Umbraco. PetaPoco also homogenizes the querying of the database, no longer do you have to know the specific query syntax for SQL CE or MySql or whatever database that might get plugged into this.

We’ve been testing the new APIs by implementing them in the backoffice in as many areas as possible and we're in the progress testing many of the most popular packages to see if they still work. But as you can imagine, it’s very hard to test all scenarios so we’ll be releasing 6.0.0 as a beta next week (December 28th) so we can get it into the hands of package devs to play with and report things we might have overlooked.

And while 6.0.0 is maturing, so will the 4.x branch. We’ve been continuing work to fix some bugs that are starting to pop up after switching to the new request pipeline since 4.10.
One thing we promised to do after every release is to get bugfixes in your hands sooner and that’s exactly what we’re doing with the 4.11.2 branch that was opened after a few bugs with regards to published and unpublished content were found in 4.11.1.
You can follow along with the fixes that are being done for 4.11.2 on the issue tracker the nightly  builds are very stable, so you can update them if you have encountered any of the bugs mentioned on the issue tracker: http://nightly.umbraco.org/umbraco%204.11.2/. We’ll continue to do bugfixing on the 4.x version until the 6.x version is considered stable so the transition will be a smooth as possible!

Well, the movers are almost here to move the Copenhagen HQ office. We’ve rented a lovely big office space next to our friends of Chainbox. So I’m sticking the laptop in a box now. See you on the other side!

WP_000422

Friday, December 07, 2012 by Peter Gregory

I'm not talking about the relations who will be showing up at your place for Christmas in a few weeks time. I'm talking about the little known API that has been part of Umbraco since the early days but is seldom used.

Up until recently Umbraco Relations were not easy to work with. They are not very well documented and required some database hacking. As of version 4.9 this is no longer the case as relation types can be managed via the back office.

Umbraco Relations allow us to relate almost any object in Umbraco to another Umbraco object.  For example Member to Content, Content to Media. Many of you will say "whoop-de-doo I can already do that with a picker" (tree, member, media) to form a one way relationship between items. This is where Umbraco Relations are different.  They allow you to create two way relationships and query the parent for the children and the children for the parent. More on this later.

In this blog post I am going to create a way for logged in members to mark pages as favourites using relations.

I will be working with a site based on Umbraco 4.11.1 with the Standard Website MVC for Umbraco starter kit installed using SQL CE.  This provides us with some basic content and the membership login etc already implemented.

So lets get to know Umbraco Relations :o)

Relation Types

As with almost every part of Umbraco we begin with a type.  Relation Types define the types of relationships that we can create in our Umbraco installation. In version prior to 4.9 you were required to create a new database record in the umbracoRelationType table.  This record was made up of the following parts.

dual = Boolean value to specify whether this relationship could be queried two ways.
parentObjectType = GUID of the parent object type.
childObjectType = GUID of the child object type.
name = The friendly name for the relation type.
alias = String alias of the relation type.

You are probably going "whoa there.  GUIDS???!!!? you gotta be kidding!" and that is pretty much why many people discounted relation types as being too difficult to use.  For a start you needed to know what the GUIDs of the objects were.  Fortunately someone had the smart idea of creating a wiki article listing the Umbraco object GUIDs.

Fast forward to 4.9+ this is no longer the case.  You no longer are required to manipulate the database yourself but can create your Relation Types via the back office.

Steps to create a new Relation Type in 4.9+

  1. Navigate to the developer section in the back office.
  2. Expand the Relation Types folder, you should see the default Relation Type for "Relate Document On Copy".

    relation type tree

    This relation type is used by the little checkbxo on the content copy dialog that says "Relate copied item to original". Now you know what that was all about :o)

    Relate copy to oringinal
  3. Right click on the Relation Types folder and click create.
  4. The following dialog will apear.

    Relation Type Create

    For our example I am going to create a simple relationship between Member and Document to record what the member has favourited the page.

    So here are the settings we will use in the create dialog.

    Name = Member Favourite
    Alias = memberFavourite
    Direction = BiDirectional (this allows us to quiery the relationship either from the parent or the child)
    Parent = Member
    Child = Document

    Click Create

So now our relationship type is setup now what? Well, for our example we are going to write some code. This will allow us to show you the Relations API which is where the real magic happens.

Create a relationship via the API

In this task we are going to setup a link on the page that when a logged in member clicks it they will "Favourite" the page or create a relationshp of type Member Favourite between their Member object and the Document.

We are going to do a little AJAX via /Base and a little bit of JQuery so the action is performed asynchronously rather than on a postback.

So lets begin by creating a new class called MemberFavourites.

To begin with we will need to include a couple of name spaces to work with favourties and Members and Base.

using umbraco.cms.businesslogic.member;
using umbraco.cms.businesslogic.relation;
using Umbraco.Web.BaseRest;

Then in the body of our class we are going to create a new Method called SetFavourite which takes in a PageId and has a return type of String.

public static bool SetFavourite(int pageId)
{
}

In the body of the method we are going to first load the relationType that we created earlier.

var relType = RelationType.GetByAlias("memberFavourite");

This will retrieve our RelationType via the alias that we gave it in the earlier task.
We will also need our currently logged in Member.

var currentMember = Member.GetCurrentMember();

next we are going to create or delete the relationship between the objects depending on if they are already related. For this we are going to use the Relation.MakeNew method. This method takes in the following parameters, Parent Object Id, Child Object Id, Relation Type and a Comment.

HINT: The comment can be used to store things other than just a simple string. You could store small amounts of JSON or XML in this field also. But be warned that the default database setting for this field is nVarChar and can only hold a limited amount of information. You might want to consider changing its type to Text or increasing the number of chars the field can hold.

// try and load a relationship between these objects.
var rel = Relation.GetRelations(pageId, relType).FirstOrDefault(x => x.Child.Id == currentMember.Id);
// if a relationship doesnt exists we want to create one.
if (rel == null)
{
    rel = Relation.MakeNew(pageId, currentMember.Id, relType,
         "Page with ID: " + pageId + " favourited by member with ID: " +
         currentMember.Id);
}
else
{
    rel.Delete();
} 

And that is about it!  You now have a relationship between the page and the member. Well not quite  because we need to write it up so that it works with base and we also need to return something to the page.

For the return type we are going to return a simple Boolean value.  We are going to use another part of the API to return this value. IsReleated is a method that will allow us to check whether two objects are related.  We are also able to pass a relationship type to filter what type of relationship exists as the objects may be related in some other way.

return Relation.IsRelated(currentMember.Id, pageId, relType);

Finally we need to decorate or class and method to expose them via /base as rest extensions.  Our completed class should look something like this.

using System.Linq;
using umbraco.cms.businesslogic.member;
using umbraco.cms.businesslogic.relation;
using Umbraco.Web.BaseRest;
namespace RelationsDemo.BaseExtensions
{
    [RestExtension("favourites")]
    public class MemberFavourites
    {
        [RestExtensionMethod(AllowType = "client", ReturnXml = "false")]
        public bool SetFavourite(int pageId)
        {
            //load the relationship type
            var relType = RelationType.GetByAlias("memberFavourite");

            //get the currentmember
            var currentMember = Member.GetCurrentMember();

            //if the current member is null then they are no logged in and cant favourite
            if (currentMember == null)
            {
                return false;
            }
            // try and load a relationship between these objects.
            var rel = Relation.GetRelations(currentMember.Id, relType).FirstOrDefault(x => x.Child.Id == pageId);           
            // if a relationship doesnt exists we want to create it.
            if (rel == null)
            {
                rel = Relation.MakeNew(currentMember.Id, pageId, relType,
                                       "Page with ID: " + pageId + " favourited by member with ID: " +
                                       currentMember.Id);
            }
            else
            {
                rel.Delete();
            }
            //return the value for whether or not they are related.
            return Relation.IsRelated(currentMember.Id, pageId, relType);
        }
    }
}

Now on the page some where all we need is a simple link on the page.

<a href="#" class="favouriteLink">Favourite</a>

And some jQuery to wire it all up which changes the class on the link depending on whether or not the page is a favourite.

//DOM Ready
$(function() {
    //favourite a page
    //attach jQuery to all links with the class "favourite"
    $("a.favouriteLink").click(function(e) {
        //get the current link
        var link = $(this);
        //get the statusID from its rel attribute
        var pageId = link.attr("rel");

        //Call the SetFavourites url and update the link with the returned value
        $.post("/base/favourites/SetFavourite/" + pageId, function (data) {
            if (data == "True") {
                link.addClass("favourite");
            } else {
                link.removeClass("favourite");
            }
        });
        //stop the link from doing anything
        e.preventDefault();
    });
});

Going Further

In the download I have also included a check to see if a page is already a favourite and applies the class. You can also see how you could use these relationships to create a listing of favourite pages on the home page. Make sure you login first as you will not see any of the favourite features till you have.

Relations can be used for so many things and not just simple relationships.  As mentioned earlier you can record extended information in the comment.

This primer should give you enough to now go forth and relate!

Download the solution used in this blog post here.

Wednesday, November 28, 2012 by Sebastiaan Janssen


Since the 4.11.0 release just 5 days ago, we discovered two bugs that warrant a patch release to get them fixed as soon as possible:

  1. In 4.11.0 a few issues around managing hostnames cropped up, these have been fixed now (mainly: the new "wildcard" domain support and scenario's where people don't use actual hostnames).
  2. In 4.11.0, we introduced a different way of caching some Umbraco internals. This mainly affected the trees, media section and razor macros. Unfortunately, sometimes Umbraco generated an incomplete cache for you. This has now been fixed.

We've also added some missing translations and an issue where the layout was set incorrectly is now also fixed.

The new version is out on CodePlex and easy to upgrade to if you're coming from 4.11.0. There's a seperate patch file that includes only the changed files, just drop them into your existing Umbraco 4.11.0 site and you'll get the upgrade wizard (the only thing it'll do is set the new version number).

The full list of fixes can be found on the issue tracker.

Friday, November 23, 2012 by Sebastiaan Janssen


Oh happy day! 

Umbraco 4.11.0 is here, fixing a few dozen bugs found in 4.10.0 and including some more pull requests/patches delivered by community members.

The upgrade couldn't be easier, just overwrite the /bin, /install, /umbraco and /umbraco_client folder and follow the upgrade wizard. You should also change the version number in your ClientDependency.config file. This is to clear the cache so that updates to the backoffice UI (js/css/html) will actually be visible to you and your editors.

There's one breaking change (easy to work around) and no database upgrades since 4.10.0 so if you're on 4.10.x, the installer will only change the version number in your web.config.

If you're not on 4.10.x yet, make sure to follow the upgrade instructions of the versions between yours and 4.11.0.

So now it's time to dance the weekend away:

Thursday, November 22, 2012 by Sebastiaan Janssen


It’s now 4 months after Codegarden and we’re very happy to that version 4.11.0 is eagerly knocking at the door. 4.11.0 delivers what we promised you at Codegarden: a strong comeback of Umbraco 4 with full MVC support. We’re very proud of that. Even better: the reception of 4.10.0 both in- and outside of the community has been very positive.


Another thing that we’re very happy with is the great number of contributions we’ve received from the community. It’s very satisfying to be accepting bug fixes for things that people have been annoyed by for ages and finally now they feel empowered to try and fix them. We’ve been trying to help everybody who wants to get involved out and the effect has been an explosion of pull requests and patches. Thank you, thank you, thank you. Awesome work!

With our new (more agile) focus we’re also regularly doing reflection on what works and what doesn’t work. This has led to a few discussions within the core team to see how we can improve our process and we came to a simple conclusion: we’ve been wanting to do too much in too little time, we need to pace ourselves.

We've also had feedback from the community saying that we’re releasing a bit too often now and people can’t keep up. Very fair feedback and we’ll be releasing less aggressively.

Easytiger

In short

  • We love that we’ve been able to put out the recent releases with good quality but want to do better
  • We’ll soon relax the release schedule so you can keep up again
  • No more breaking changes between major versions allow you to upgrade with confidence

This means that we’re going to change the roadmap a little to adjust for these new insights. In practise, this will lead to a more agile way of doing things, we’ll be putting less work items in each sprint. 

We still have an overarching vision of where we want to go, but very specific smaller tasks won’t be set in stone. So the big things that are upcoming are (in order of appearance):

  • New low-level and high-level APIs plus improvements to the MVC bits
  • Project Belle, the new user interface
  • Concorde, Umbraco as a Service

In detail

With regards to the release schedule, we’re relaxing that a little bit after v6.1.0. We’re really eager to get the new API’s in the hands of everybody and deliver all that we promised for v6: new routing, new api’s, new business layer and MVC, which is exactly what we wanted for v5.

As of 6.1.0, we’ll still be doing sprints of 2 weeks with the team, leading to a deliverable after each sprint. We’ll be doing actual releases every 8 weeks though, this will be either a major or a minor release.

Speaking of backwards compatibility, we had so many things that really, really needed to be fixed in v4, that we bended the rules of SemVer a little and introduced some breaking changes in minor releases. We realize that it’s not been very consistent with our own guidelines, and as of v6 we’ll only make breaking changes in major releases, so you will be able to upgrade with ease.

A lot of people (especially Jeroen) actually like our fast release schedule and don’t want to wait weeks to be able to take advantage of the improvements we’re making. Because we’ll have no breaking changes, it will be safe to upgrade to nightly releases, so that’s what we’ll be recommending from now on.

As for breaking changes, we’re allowed to break things for v6.0.0. And we will, but we’re trying to keep them minimal. The main changes will be around the database and these will be handled by the installer during the upgrade so it shouldn’t be too painful.

Conclusion

We realize that while our main job is to produce software, you job is to both understand and implement our software. We'll be easier to keep up with, giving you more time to learn, understand and build.

And with that: go forth and make awesome websites!

Thursday, November 22, 2012 by Tim Geyssens

The new version of our official form designer is available for download and use today!

Features

Wondering what’s new in this version, you can read all about the new features.

Get it

Like usual, you can find the package on it’s project page over at our.umbraco.org

Getting started

After downloading and installation the package you’ll have fully functional forms on your site within minutes, for a quick getting started guide check out this post.

Upgrading

Have an existing Contour installation you want to upgrade well upgrading from version 1.x to 3.0 is free (so if you have an existing license it will still be valid), to upgrade please follow the instructions on the project page.

Friday, November 16, 2012 by Niels Hartvig

Today the Champagne will flow at the Umbraco HQ Office as we passed an incredible milestone - we're now the most downloaded Web CMS on the Microsoft stack! 

Umbraco downloads from Codeplex
Umbraco download stats from 2006 to 2012 

Ever since the early days of Umbraco, we've seen a steady growth in downloads (and obviously installs) and while the priority always have been around making an awesome product and fostering a friendly community, it does feel incredibly motivating that you can climb to the top with those values in place.

The math

Of course stats are a grateful thing and it's said that it's easy to bend them to whatever conclusion you want to achieve. So here's the math:

Umbraco downloads in 2012
Umbraco download stats from 2012 - yellow circle shows ratio of download / visit

  1. Our source is download numbers at Microsofts website for open source projects called "Codeplex".
  2. When you browse projects on Codeplex you can see statistics if you append /stats to the url - for instance, here's the stats for Umbraco.
  3. We looked at download stats for the year of 2012, but as Codeplex tracks any download - whether it's the product, documentation, starter kit, etc - we had to clean the numbers based on downloads per visit ratio. As in no matter how much you download, at max you download the product once.
  4. So while we'd love the idea that we were downloaded 341,620 times we need to adjust it based on our ratio of 1.19 downloads per visit. So this means that there's been 287,075 downloads of Umbraco in 2012 so far. 
  5. Then we did the same exercise with other CMS hosted on Codeplex and started dancing when we saw the results.

More than a quarter of a million downloads in 2012 so far. Time to stop blogging and start popping the cork.

Have a great weekend!

Wednesday, November 14, 2012 by Shannon Deminick

On Nov 14, 2012 we discovered a security flaw in the Umbraco 4.10.0 codebase which we released a patch for on the same day.  The security issue relates to a fix that was addressed in 4.10.0 regarding starter kit installation in which the application domain wasn't restarted properly during install which was causing unexpected results.  The fix applied uses a new REST service to install the starter kit packges but unfortunately this REST service wasn't properly secured and thus exposes this REST service as a public API. This meant that it may be possible for someone to remotely install a package or restart your application domain. 

We strongly urge everybody with a 4.10.0 site to upgrade to 4.10.1 as soon as possible. Versions OTHER than 4.10.0 are NOT affected at all, so you won't need to take any action for those. Please rest assured that this fix has been merged into the 4.11.0 branch so it will definitely not be an issue moving forward.

Again, our sincere apologies for the incovenience!

Wednesday, November 14, 2012 by Sebastiaan Janssen


Just now, Shannon stumbled upon a bug in the recent 4.10.0 release, that exposes a security issue. 

This security problem ONLY affects installs of 4.10.0 and is easily fixed by downloading the patch file on CodePlex to upgrade your site to 4.10.1.

How to upgrade:

  • Download the UmbracoCms.Patch.4.10.1.zip
  • If you extract the files using Window's built in compression tool you will need to 'UNBLOCK' the ZIP filefrom the Properties Dialog before doing so. Otherwise your installation may not include all required files.
  • Place the dll files you find in the patch zip file in your /bin folder
  • Change the version number in your web.config from 4.10.0 to 4.10.1
    • Or if you still have the install folder in place, run the installer, it will do the exact same thing (update the version number). There are no database upgrades.
  • All done!

We've update the version checker so anybody running 4.10.0 should see an upgrade message soon.

We urge everybody with a 4.10.0 site to upgrade to 4.10.1 as soon as possible. Versions OTHER than 4.10.0 are NOT affected at all, so you won't need to take any action for those.

Our sincere apologies for the incovenience!

Friday, November 09, 2012 by Tim Geyssens

So now you know about all the new stuff coming up in Contour 3.0 (code first, conditional logic, full markup control, easier to work with lots of forms) and wanna give the beta a try. Here’s a quick guide to get you going:

Download the package

You can get the beta package from the build server http://nightly.umbraco.org/Umbraco%20Contour/3.0%20WIP/

Install the Beta

Go to the developer section > Packages > Install local package and follow the installation wizard

image

Design forms

Go to the new Contour section and start designing your forms

image

Add script references

The new razor form render needs jQuery, jQueryUI, jQuery validate and jQuery validate unobstrusive. So you’ll need to add those to the head section of your template/view

	 <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js" type="text/javascript"></script>
	 <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.22/jquery-ui.js"></script>  
     <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js" type="text/javascript"></script> 	
     <script src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js" type="text/javascript"></script> 	

Add the form to your page

Use the insert macro button the insert the contour form macro

image

image

Report bugs

If you find any bugs please report them on the public issue tracker found at http://issues.umbraco.org/issues/CON

Enjoy!

Friday, November 09, 2012 by Tim Geyssens

Final post in the Contour 3.0 feature series. These 2 last add-ons are aimed at installs with a large amount of forms.

Structure forms

By using a little convention in the form name (using a slash) you can create folders to house your forms in.

image

Small but useful feature if you are dealing with a big collection of forms.

image

Default form settings

It’s now also possible to save form settings and apply them on all future forms, with the addition of a new button in the form settings toolbar. This should be a time saver when dealing with multiple forms.

image

Thursday, November 08, 2012 by Sebastiaan Janssen

Ladies and gentlemen. The moment you've been waiting for since CodeGarden 2012 has arrived.

Drumroll please.... : Umbraco 4.10.0 Final is here, TADA!!

Tada

A summary of the most important points out of the previous blog post (about the release candidate):

There's an awesome, mind boggling, list of changes for this version, including 71 bug fixes 34 of tem are community contributions, a large portion of which were submitted during the recent Hackathon the day before the Umbraco UK Festival.

Stéphane did an awesome job on the new request pipeline, he also managed to explain what he has done so that he's not the only one to understand it now, go read it here (it's human readable, not technical):
https://docs.google.com/document/d/19Ids3S57BGnKbGkG-eWACYa0fgTLKiTohsgcOPHBS8Q/edit
https://docs.google.com/document/d/1JEwVCdpIhxBUS7c3hunjaFRAXLQIZnkvErSleVA9zro/edit

Shannon, after adding MVC to Umbraco (like a boss!) has made the most documentation ever made for any Umbraco release on the subject of the MVC bits in 4.10.0. He's also has done a few blog posts and Peter has written up a MVC primer on this blog.

Does that mean you can only use MVC or WebForms, but not both? No! You can actually use both, more choice for everybody (iz gooood).

Since the RC

What's new since we released the Release Candidate last week? Well basically nothing but bugfixes Thanks to every one of you out there who's been testing the RC we managed to fix 2 major bugs before the release and plenty of smaller annoyances!

One thing to note is that we now support Medium Trust fully again (we accidentally broke that in 4.9.0). To make sure we don't have any more accidents like that, we will always be developing the core of Umbraco with medium trust turned on. The release version will not be limited in any way, but we've developed everything under medium trust so it should just work on those medtrust-only hosters out there.

Work it

Needless to say, we are very happy to get this release out the door, it's been highly anticipated and we believe it's an awesomely solid new version of Umbraco. We hope you'll enjoy it too!
Go forth and download.

Thursday, November 08, 2012 by Tim Geyssens

Yup you’ve read it right, coming up in Contour 3.0 is full markup control!

Contour 3.0 comes with a new macro that uses razor to render the form instead of a .net usercontrol (so you can get rid of the form with runat server attribute too!).

The main advantage of this new macro is that the razor views used to render the form can be customized to your needs! So the markup that contour generates isn’t fixed anymore and can be altered depending on the code you want to output!

For a short intro check out this demo:

Wednesday, November 07, 2012 by Tim Geyssens

Another post to highlight a new feature coming up in Contour 3.0. This time it's the most requested feature that made it in: support for conditional logic on fields.

Let's say you have the following form:

image

It only makes sense to show email or phone when that was the option in the 'how should we contact you' field.

And that's exactly what the addition of conditional logic will make possible!

By enabling and setting up a rule on both the email and phone field with the new UI component

ConditinalLogicUI

The fields will be hidden and only shown if the corresponding option is chosen

image

 

That's it!

Tuesday, November 06, 2012 by Tim Geyssens

The upcoming Contour 3.0 release also features some nice addons for developers, one of which I'll highlight in this post: the new code first framework

With the new framework devs will be able to design forms in Visual Studio, so there is no interaction with the UI needed to create fully functional forms. Making it possible to have source controlled Contour forms and automated deployments of those forms Smile

Registration form example

Lets looks at an example, lets say we want to create a member registration form using Contour and the code first framework, the first step would be to add the necessary references to a Visual Studio project

image

Once those are in place (Umbraco.Forms.CodeFirst, Core and Core.Providers) you can start designing the form

    public enum FormPages
    {
        Registration
    }

    public enum FormFieldsets
    {
        Details
    }  
    [Form("Registration")]
    public class Registration: FormBase
    {

        [Field(FormPages.Registration,FormFieldsets.Details,
            Mandatory= true)]
        public string Name { get; set; }

        [Field(FormPages.Registration, FormFieldsets.Details,
            Mandatory = true,
            Regex = @"(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})")]
        public string Email { get; set; }

        [Field(FormPages.Registration, FormFieldsets.Details, 
            Type = typeof(Password),
            Mandatory = true)]
        public string Password { get; set; }

        [Field(FormPages.Registration, FormFieldsets.Details, 
            Type = typeof(Password),
            Mandatory = true)]
        public string RepeatPassword { get; set; }

        [Field(FormPages.Registration, FormFieldsets.Details, 
            Type = typeof(FileUpload))]
        public string Avatar { get; set; }

    }

 

It's basically a class with some properties

First you 'll see 2 enums, one is for the pages and an other is for the fieldsets but since the form simply has a single page and fieldset these enums only have a single value

    public enum FormPages
    {
        Registration
    }

    public enum FormFieldsets
    {
        Details
    }

The actual form class inherits from FormBase and is marked with the Form attribute (where you need to specify the form name)

    [Form("Registration")]
    public class Registration: FormBase

Then for each field you want on the form there will be a property on the class decorated with a Field attribute

        [Field(FormPages.Registration, FormFieldsets.Details, 
            Type = typeof(Password),
            Mandatory = true)]
        public string RepeatPassword { get; set; }

It needs to know the page and fieldset plus you can specify other settings like the type, if it has to be mandatory, a regular expression… (everything that's available trough the UI)

After compiling the project and dropping the assembly in the bin diractory of your umbraco instance the code should sync with Contour and a new form will appear

image

That will look like

image

Next is making sure the email is unique and the passwords are identical, this can be done by adding additional validation rules

        public override IEnumerable<Exception> Validate()
        {
            var e = new List<Exception>();
            //checks if email isn't in use
            if(Member.GetMemberFromLoginName(Email) != null)
                e.Add(new Exception("Email already in use"));
            //makes sure the passwords are identical
            if (Password != RepeatPassword)
                e.Add(new Exception("Passwords must match"));

            return e;
        }

So using the Umbraco API to check if there isn't a member with the same login name and then simply comparing the password fields

IF there are exceptions these will be shown and it won't be possible to submit the form

image

Final step is creating the actual member using the Umbraco API

        public const string MemberTypeAlias = "Member";
        public const string MemberGroupName = "Authenticated";
 
       public override void Submit()
        {
            //get a membertype by its alias
            var mt = MemberType.GetByAlias(MemberTypeAlias); //needs to be an existing membertype
            //get the user(0)
            var user = new User(0);
            //create a new member with Member.MakeNew
            var member = Member.MakeNew(Name, mt, user);
            //assign email, password and loginname
            member.Email = Email;
            member.Password = Password;
            member.LoginName = Email;
            //asign custom properties
            if(!string.IsNullOrEmpty(Avatar))
                member.getProperty("avatar").Value = Avatar;
            //asssign a group, get the group by name, and assign its Id
            var group = MemberGroup.GetByName(MemberGroupName); //needs to be an existing MemberGroup
            member.AddGroup(group.Id);
            //generate the member xml with .XmlGenerate
            member.XmlGenerate(new System.Xml.XmlDocument());
            //add the member to the website cache to log the member in
            Member.AddMemberToCache(member);
            //redirect to another page
            HttpContext.Current.Response.Redirect("/");
        }

This code assumes that there is a member type called Member and a member group with the name Authenticated then it will just do the actions to create the new member, using our property values.

That's it!

SourceControlAllTheForms

The sourcecode of this example is available here

Tuesday, November 06, 2012 by Tim Geyssens

It's been almost 3 years since we released our  form builder addon Contour (time sure flies) and today we are happy to announce a new upcoming version that has some much requested features!

Here's an overview of the new stuff you can expect:

Conditional logic

Hiding or displaying a field depending on the value from another field, that's now possible with the addition of conditional logic.

Rules can be easily added on fields with the new UI component (found in he additional settings of each field).

image

Easier to work with lots of forms

There are 2 improvements in there that should make it easier when you have a large amount of forms.

Creating some structure in your collection of forms by creating folders.

image

And saving form settings as default so they are applied to all future forms.

image

Full control over form markup

Version 3 introduces an alternative to the webcontrols form macro by adding an MVC alternative.

image

The MVC version will use razor views to render the form and these razor views can be edited to generate the form markup you want! This will of course also work perfectly in a non MVC umbraco install.

image

Code first

Inspired by uSiteBuilder we've added a code first framework that will allow developers to design forms in Visual Studio (source controlled forms, automated deployments, unit testing, … are just a couple of the advantages).

Here's an example:

 [Form("Contact Form", MessageOnSubmit = "Thank you")]
    public class ContactForm : FormBase
    {
        [Field(FormPages.Contact, FormFieldsets.Details,
           Mandatory = true)]
        public string Name { get; set; }

        [Field(FormPages.Contact, FormFieldsets.Details,
            Mandatory = true)]
        public string Email { get; set; }

        [Field(FormPages.Contact, FormFieldsets.Details,
           Mandatory = true,
           Type = typeof(Umbraco.Forms.Core.Providers.FieldTypes.Textarea))]
        public string Message { get; set; }

        public override void Submit()
        {
            
            umbraco.library.SendMail(
                Email,
                "me@company.com",
                "New Contact",
                string.Format("New message from {0} : {1}",Name,Message),
                false);
        }
    }


The code will result in the following form:

image

Another feature of this approach is that it makes it super easy to add custom validation rules

public override IEnumerable<Exception> Validate()
{
    var e = new List<Exception>();
    //extra validation rules
    if (Date < new DateTime(2012, 01, 01))
        e.Add(new Exception("Date has to be after 2012/1/1"));

    if(Password != RepeatPassword)
        e.Add(new Exception("Passwords must match"));

    return e;
}

Try it today

The beta build can be found on our build server

Be sure to keep an eye on the blog for more in detail posts on the new features.

Friday, November 02, 2012 by Sebastiaan Janssen


Today we are proud to announce the long awaited
Release Candidate of Umbraco 4.10.0, (also known as "The MVC Edition")!

There's an awesome, mind boggling, list of changes for this version, including 65 bug fixes including 31 community contributions, a large portion of which were submitted during the recent Hackathon the day before the Umbraco UK Festival. Thank you everybody who has contributed (great or small), you absolutely rock!
It's always fun to see that people start contributing when they find a little thing that has annoyed them for ages and finally decide to do something about it (I did a talk at the UK fest showing how easy it is to get involved if you have a similar annoyance!).

As I've mentioned before, this release has been in the works since CodeGarden 2012 and is a rather big one. This has unfortunately led to multiple delays because we wanted to be really sure that we could deliver the highest possible quality release for you.

To that end, we've done a few things to verify that we didn't break anything:

  • Dogfooding - Internally, we've been building a few sites on the pre-release versions of 4.10.0, using WebForms, MVC and existing packages
  • A nightly and beta release to get help from the community
  • Upgrades of existing sites to see if everything still worked
  • Installing the top 50 most popular packages and weeding out any problems that we might've caused in the core

Today, we are confident that we have a very solid release ready for you but we still want to give everyone a little time to verify that. So today we present the release candidate that will become the final release next Friday (November 9th) unless we find any major problems with it.

I can haz bugs

We're also very sure that we probably introduced a bug or two somewhere. Yes, bugs happen. We're working very hard to write solid unit tests for this and future releases so that we can see things starting to fail before we release, but the codebase is pretty old and hard to unit test at the moment. This is one of the major reasons that we decided to rewrite the request pipeline and make it testable.

Currently we have 434 passing unit tests in the 4.10.0 codebase (and having a little look at 6.0.0 reveals that there's 608 passing unit tests in that version). Progress!

To make sure that you don't have to beg us for new releases, we're going to actually open a patch branch as soon as the first bug is found. In the past we've posted an updated dll in the issue tracker, but that doesn't actually scale (what if there's 2 important fixes, which dll to use?). By actually actively committing to a patch branch, you can very easily upgrade to a nightly release after we fix a few things that are very important for you.   

Documentation

The two most important parts that we worked on for this version is the request pipeline and MVC support.

Request pipeline

For the request pipeline we've had a helping hand from Stéphane who has delivered an awesome contribution that should be celebrated.

Stéphane, like other people decided to scratch his own itch (so to speak). The request pipeline was something he was very unhappy about for ages and he couldn't stand it any longer. So after consulting with us he decided to make himself very happy and refactor it, the side effect is that it makes us also much happier! Everybody was completely avoiding any changes to the request module as it was such a spaghetti that a minor change would most likely have a huge impact.

Not only did Stéphane do an awesome job, he also managed to explain what he has done so that he's not the only one to understand it now, go read it here (it's human readable, not technical):
https://docs.google.com/document/d/19Ids3S57BGnKbGkG-eWACYa0fgTLKiTohsgcOPHBS8Q/edit
https://docs.google.com/document/d/1JEwVCdpIhxBUS7c3hunjaFRAXLQIZnkvErSleVA9zro/edit

MVC

Yes, the rumors are true: Umbraco supports both WebForms and MVC. Fully, completely, in every way, shape and form. No compromises.
Everything you can do in WebForms, you can do with Umbraco.
Everything you can do in MVC, you can do with Umbraco.

Shannon has been working on porting a lot of the v5 MVC support to Umbraco 4. This means that SurfaceControllers are back, razor helpers are back (and better than ever). Now, don't be scared, none of the complexity of v5 is back. Instead, working with MVC in v4 really is a breeze!

Actually, MVC support is the best documented feature of Umbraco we've ever released, currently the documents still live in Shannon's fork, but they will be merged into the documentation section of Our umbraco soon, go have a look if you want to use MVC in Umbraco:
https://github.com/Shandem/Umbraco4Docs/blob/4.8.0/Documentation/Reference/Mvc/index.md
Also Shannon has done a few blog posts and Peter has also written up a MVC primer on this blog.

Hybrid

I can hear people scratching their head and thinking: does that mean you can only use MVC or WebForms, but not both?
No! You can actually use both! Let me explain.

In the UmbracoSettings.config file there's a new key caled defaultRenderEngine. If you set this to MVC and create a new template or create a new document type and tell it to also create a template for that, then it will create MVC views. If you leave defaultRenderEngine set to WebForms then you will always get masterpages instead of views.

However, if you already have a masterpage and decide that you actually would like to use MVC features you can just create a new file in the Views folder that has the same name as the masterpage. So if you have a Home.master, you can create a Home.cshtml.
Umbraco will then automatically pick that up and render the view instead of the masterPage.

So if you're the type of person that can't stand WebForms and want to move existing Umbraco sites over to MVC immediately you can use this hybrid form to have both for a while, until you move everything over to MVC.

Known issues

Currently, Courier won't install correctly because it puts a slightly older version of log4net in the bin folder, so do not try to do a new install of Courier at this point. Upgrading a site that has Courier already installed should not be a problem at all.

Courier 2.7.3 also has a release candidate available that includes the new version of log4net and will install perfectly (look for builds 26 and higher!).

There's also a problem with formatting code in the code editor on IE9 and lower.

As always, please report issues in the issue tracker and use the "Affected versions" field to set it to 4.10.0.

Tuesday, October 30, 2012 by Peter Gregory

Shazwazza

For those that have been following the Umbraco Roadmap closely would have noticed "MVC Support" in the list of features for the upcoming v4.10 (currently in BETA and can be downloaded from codeplex).  Why did we add MVC support to Umbraco? Other than the standard MVC separation of concerns, one of the main advantages of using MVC is that you will be able to use Razor everywhere and not just in your Macros.

Prepping the Umbraco back office for MVC.

By default Umbraco 4.10 only knows about WebForms. On the surface its not too obvious how to put the Umbraco back office into MVC mode. 

To switch on MVC features we need to modify the ~/config/umbracoSettings.config file.  Scroll down the file to about half way and you will come across a key called templates with a child key called defaultRenderingEngine.  You will need to change this keys value from WebForms to Mvc.


<defaultRenderingEngine>Mvc</defaultRenderingEngine>

This will put your Umbraco 4.10 install into MVC mode, and make the back office aware that you are working in MVC.

Creating Your first View

Now that you have Umbraco configured to use MVC we want to get started building a website. Nothing is different from a standard Umbraco website, where you begin with your document types, but now, rather than the system creating MasterPages in the templates area, it is creating MVC Razor views. By default, Views created by Umbraco look like this.


@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = null;
}

 The first line basically wires up your view to Umbraco and gives you access to Umbraco features such as the Umbraco Helper (more on this later). The Layout = null; line is just like MasterPage inheritance in WebForms that allows you to set what the parent View is. Template inheritance is as easy as it was in WebForms and we will explain how to do this later.

Your HTML markup goes in below the closing }. 

You may have noticed that there are very few options on the template editor toolbar. This is because MVC features are a work in progress across a number of versions, and as features become available, this toolbar will become more populated with options such as insert Macro, insert Partial View.

What is the Umbraco Helper?

Retriever

The Umbraco Helper is just that, a helper that you can call on to retrieve things from Umbraco, to perform tasks like Searching the content index, rendering Macros, stripping HTML from text, finding out if a content item is protected etc. Generally useful and commonly used tasks that would otherwise take you a long time to build yourself. 

To access the helper in your Views is easy.  Just use @Umbraco.  If you are working in Visual Studio and you you will get Intellisense and it will allow you explore all of its options.  

Here is a quick example of how you would use the @Umbraco helper to perform a search on the Umbraco content index.


<ul class="search-results">
@foreach(var page in Umbraco.TypedSearch("mvc")){
<li><a href="@page.NiceUrl">@page.Name</a></li>
}
</ul>

 Or here is an example of how to use the helper to truncate (shorten) some text.


@Umbraco.Truncate(Model.Content.GetPropertyValue("bodyText"),200)

So how do I add page properties?

There are a number of ways to put your content properties on the page, through the Umbraco helper, through the strongly typed Model.Content, or via the Dynamic CurrentPage.  There are advantages to each.


@Umbraco.Field("alias")

This is the way that the insert Umbraco Page Property button will put your properties on the page.  The helper has all the options that you are used to with the WebForms <umbraco:item> tag such as fallback fields, insert before, insert after etc.


@Model.Content.GetPropertyValue("alias")
@Model.Content.GetPropertyValue<Type>("alias")
@Model.Content.GetProperty("alias").Value

This is how we access our properties through the strongly typed IPublishedContent (@Model.Content) representation of our Umbraco content.  The main advantage is that because its strongly typed, you get intellisense in VS, and you also can write linq against it.  This is probably my preferred way to work with Umbraco content when developing views in VS.


@CurrentPage.Alias

If you have been using Razor via dynamicNode you would probably have used the similar dynamicNode derivative. @CurrentPage is basically the same.  It is a dynamic representation of your Umbraco content (DynamicPublishedContent or the Dynamic version of IPublishedContent).

What about template inheritance?

Create a new template and then set the Layout value to the filename of the parent template. For example to set a View to have the parent View of _Layout.cshtml we would modify it to be as follows:


@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = "_Layout.cshtml";
}

Lets take a look at what your _Layout.cshtml template might look like as we need a couple tags to tell our child templates where to put their content. 


@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
<!DOCTYPE html>
<html>
<head>
<title>@Model.Content.Name</title>
@RenderSection("head",false)
</head>
<body>
@RenderBody()
</body>
</html>

There are two very important tags on this template which are standard Razor View tags.  They are @RenderSection("head",false) and @RenderBody()

@RenderSection("head",false) is the equivilant of the <asp:contentPlaceHolder runat="server" ID="head"> that you would use in WebForms MasterPages.  It specifies a named section where a child template can place content.  The boolean value specifies if it is required for a child template implement this section.

@RenderBody() is a catch all type tag.  Basically it will render any content from a child template that has not been placed inside a named section.

Lets look at how a child template might be formatted to use this parent View.


@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = "_Layout.cshtml";
}

@*this content will be rendered in the named section head*@
@section head{
<script type="text/javascript">
alert("Iz in yo head");
</script>
}

@*The following content will be caught by the RenderBody() tag in the parent template*@
<h1>@Model.Content.Name</h1>
@Html.Raw(Model.Content.GetPropertyValue("bodyText"))

What about Macros?

Working with MVC is a little different than working with Umbraco in WebForms mode.  You will find that most of the time you will get away with not having to create Macros at all as you can either write the Razor directly in the template or include a Razor Partial View. Macros with MVC will most likely only be needed when you want to allow editors to insert functional blocks into the rich text editor or when you need to include a form (Child Action Macro) in the page.  

Tooling for inserting Child Action Macros and Partial View Macros will be coming in v4.11.

With all that to say if you have an existing Razor or XSLT or UserControl macro that does not require any postback (ie no forms) there is an Umbraco helper method to include your macro.


@Umbraco.RenderMacro("myMacroAlias", new { name = "Ned", age = 28 })

The anonymous object (new{}) passed in are your macro parameters.

But you're using MVC so lets look at Partial Views.

The power of the Partial View

We are building our site using MVC so with MVC we also get access to Partial Views.  So for instance we could build our site navigation as a Partial View. To build a partial view they live in the standard MVC Partials folder ~/Views/Partials folder.   At the moment there is no tooling for creating a Partial view in the Partials folder via the back office.  If you must create it via the back office you can just create them in the template section which means they are just in the ~/Views folder which is ok.

Lets look at a typical navigation Partial View and then dissect it.


@inherits Umbraco.Web.Mvc.UmbracoTemplatePage

<ul>
@foreach(var page in Model.Content.AncestorOrSelf(1).Children.Where(x => x.IsVisible()))
{
<li><a href="@page.NiceUrl()">@page.Name</a></li>
}
</ul>

Notice that it inherits the class Umbraco.Web.Mvc.UmbracoTemplatePage. We do this is so we can get access to the Umbraco helper and the the Current Page and other Umbraco specific features.

To include this Partial on our page we use the following syntax.


@Html.Partial("Navigation")

This tells MVC to render a partial called navigation.cshtml passing it the Model to use.  In our case it is the IPublishedContent representation of the current page.

If you want to render a Partial View with a custom Model we can use the following inheritance and still have access to the Umbraco helper.


@inherits Umbraco.Web.Mvc.UmbracoViewPage<YourCustomModel>

To insert this partial we would do the following


@Html.Partial("Navigation", YourCustomModel)

Sometimes you will want to pass parameters to your Partial View.  This is done through the ViewData dictionary.  ViewData is an object that allows us to store and retrieve values for the current request.

So lets say we wanted to pass a value to a partial we would do it like this.


@Html.Partial("YourPartialName", new ViewDataDictionary{{ "age",33},{"name","peter"}})

And then in your Partial you can retrieve the values using: 


ViewData["age"]

Go to it!

ikea

That should be enough to get you going with MVC under v4.10 BETA.  This was only a simple primer and doesn't go into querying or how to build forms etc but we will cover this in future posts and there is already a lot of documentation written for the new 4.10 features over at GitHub that can fill in some gaps.  Also you might want to check out this blog post by Shannon on his personal blog that gives a little more information on some of the other more technical aspects of MVC features of 4.10.

Please also be aware that currently the MVC features are a work in progress and there is still a lot of tooling to be built to support it in the back office that will appear in future versions.

This is a BETA, we need your help!

4.10 is a massive step forward for Umbraco and besides the new MVC features there are loads of bug fixes and small tweaks that need testing. Unit tests only go so far and will not always catch everything. We are also "dog fooding" this release on a few internal projects but we might not catch everything either. The more real world developers we have helping to identify issues the better the final release will be. So this is a call to anyone who has some spare time or is considering starting a build on the BETA please provide your feedback and report issues at issues.umbraco.org and help make this one of the best releases yet!

UPDATE 5/11/2012: an issue has been identified in the RC that causes a YSOD when you try to pass an IPublishedContent obejct to a partial (not menitoned in this blog post but could frustrate some developers trying it out). 

For instance if you were iterating over some child pages and calling a partial for each child item.


@foreach(var page in Model.Content.Children){
@Html.Partial("somePartial",page)
}

And then your partial inherits like this


@inherits Umbraco.Web.Mvc.UmbracoTemplatePage

it would throw a YSOD saying:

The model item passed into the dictionary is of type 'Umbraco.Web.Models.XmlPublishedContent', but this dictionary requires a model item of type 'Umbraco.Web.Models.RenderModel'.

This is due to the Partial expecting a RenderModel.  The good news is that this has now been fixed! and will work as expected in the release.

Tuesday, October 09, 2012 by Sebastiaan Janssen

 

In the past few weeks we've done a lot of internal testing of Umbraco 4.10.0 and many bugs have been fixed already but we're still not happy with the results at this point. As you might've noticed, we should have released a preview version last Friday but didn't and that's got everything to do with the test results so far.
Today we decided we're going to have to shift the roadmap and take another two weeks to finish this version and release something that we can be proud of.

This also means that we're now putting in a feature freeze, no new things are going in 4.10.0, we're just bug fixing and doing thorough testing. So your pull requests and contributions (they keep coming in, thank you!!) will have to wait until at least 4.11.0 unless they're direct bug fixes of 4.10.0.

A little backstory is in order: work on 4.10.0 actually started a few months ago with a refactor of the most difficult part of the source code: the request pipeline.
Over the years we've added tons of things on top of it, and never really took the time to do that properly. This resulted in everybody being scared whenever something needed to change there:
I wouldn't touch that if I were you...

In order for us to support MVC in 4.10.0 we needed to make changes to the request handler and we were reminded of the famous Boy Scout rule that Uncle Bob Martin always quotes: "Leave the campground cleaner than the way you found it.".
This is such a good rule of thumb: when you change code somewhere, make it at least a little bit cleaner all around before you commit it, so the next person to look at it doesn't see extra mess there.

So that's what we did, slowly but surely we cleaned up the request pipeline. Most of that work was done by the awesome Stéphane who had been annoyed with the mess we made on the campground for a long time. He decided to volunteer a lot of his spare time to help us out to make the code make sense! While doing that, Shannon (who has very limited time since he's still on his trip around the world) had a much easier time enabling MVC support.

As it turns out, we underestimated the impact of these changes. We could've double down tried really hard to make the release date but that's the "old" Umbraco and we knew that would lead to much too little testing.
The "new" Umbraco wants to deliver quality builds and while we failed at planning this release, we will succeed (just a little bit later) at delivering a solid release for your pleasure!


In the meantime, if you'd like to help, we're more than happy to receive bug reports regarding the nightlies.
Note that today's nightly (build 651) will only work on SQL Server, not yet on MySQL or SQL CE. We are doing some database updates to be able to support
container document types and need to do some more database scripting for that.

Friday, September 28, 2012 by Per Ploug

We are currently working on some really exciting improvements to the Umbraco core, but to know that we are doing the right thing, we need to have some data on how everyone has configured their umbraco installation.

And this is where you, dear reader, and your Umbraco installations come into the picture. We need as many as possible to collect data about their installation, so we can improve the core of Umbraco in a way that fits with the way people actually use it.

UPDATE: Package works on all installs Version 4.7+, it should also work on earlier versions, but has not been tested. 

It helps us answer questions like "How many tabs do people have, and how should the UI accommodate that?" or "How do people use document type inheritance today, is it actually used?"

So, today we are introducing the Umbraco.InstallStatistics package. A simple and tiny package, which on install will go through your installation and log all relevant data about it, and send it to us anonymously, so we can crunch the numbers. Additionally, as users log on, it will record their browser and screen size, as well as the user-type.

Go to our.umbraco.org and download the package now

It is very important to emphasize that all data is logged without any trace of the person/site/domain or IP it comes from. This is NOT data for marketing, it is for developing the future of Umbraco.

To ensure transparency, the InstallStatistics package is open sourced and available on our BitBucket account, which also contains sample data collected so you can see what we collect:

  • Number of document types and properties, as well as how they are arranged on tabs
  • Templates and template structure (not template markup)
  • Macros and macro types (no macro code)
  • Datatypes and installed types
  • Installed Packages
  • Number of users and user types
  • Amount of content and depth of documents

We hope as many as possible wishes to take part in this data collection so we can get as accurately a dataset as possible and provide everyone with a even better Umbraco in the future.

Go install the package right away

Friday, September 14, 2012 by Sebastiaan Janssen

If you've had a look at the agile board for 4.10.0 it's likely that you came away a bit confused. Don't worry, it's not just you! I too had a hard time figuring out what exactly is going on, but I'm here to explain it to you now.

The theme for 4.10.0: Hybrid MVC support and solution love. 
We're cheating a little bit, because some of the things we're working on have started a while ago, and are now coming to fruition. The reason this has taken a little longer is because people like Shannon (who's actually on sabbatical) and Stéphane haven't been able to work on it full time. So slowly they've been adding to the code while sipping Martinis and hiking up mountains (or in Stéphane's case doing actual work for clients and being with his family).

What to expect from MVC support
What we'll deliver in this sprint is a hybrid model, you will be able to create your templates as MVC views instead of master pages and use your macros in there as well. We're still taking some time to bring in surface controllers, partial view macros and child action macros. We want it to work well and not be half baked, so it'll be completed during the next version.

We'll be implementing full Umbraco integration over the next few releases, as one does when taking the agile approach: deliver semi-small blocks of functionality and then iterate quickly on them.

Solution love?
This might sound a bit broad, but what we're actually doing (aside from making the actual Visual Studio solution easier to use) is some architectural changes that will support not just MVC but mainly the rest of the Umbraco core in the long run.

This has led us to completely refactor the request pipeline, so all of the things that happen when you request a page.
This includes routing to the right Umbraco document, doing things like 404 handling or rendering an altTemplate, etc. It has been a complicated process because over time a LOT of things have been bolted on to the old pipeline and there are many paths to be taken into account. We think we've got a really good version almost ready now, but it will require more testing (more on that later).

Speaking of testing: we're also adding unit tests around this new pipeline and around most other new code that we write. That way we won't have to be afraid to break things when improving the code in the future, the unit tests will verify that everything should still work like it did before.

Technical tasks
There are a lot of really technical tasks in the issue tracker at the moment, and once we get to a point of releasing this version you'll learn more about what they mean for you.
Rest assured though: You can still use Umbraco in the same way you've used it before! You will not be required to learn any of these new things immediately. They are there for you to slowly get comfortable with and reap the benefits from.


That said, we are going to introduce 2 minor breaking changes and we're sorry to have to do this to you in a minor release, but they're quite necessary:
The first one is: for MVC support we're introducing a global.asax file that inherits from the new Umbraco.Web.UmbracoApplication class. This means that if you have your own global.asax file already then you'll need to recompile your code to be compatible with this. Should be quick and only a tiny bit painful.
The other change: we actually fixed the ChildrenAsList call you could do in Razor, which made you have to deal with DynamicBackingItems and more unintuitive things. With this change it now actually gives you back a nice list of nodes, which is how it was always intended to work, all the while, improving it's performance at the same time.

Uncle -sam -we -want -you1

Early nightly for testing
Insert promo here: We want YOU! Yes you, and you and you and you!
In about a week we want to show some of our early work (an incomplete nightly) for you to start testing the upcoming release early on. We've done a ton of work for this release already as you can see in the issue tracker and because a lot of it touches on the great multitude of different configurations out there, we hope you can help us detect potential problems early on.

Internally, we're going to be testing a lot as well, but we would like to ask you soon to start trying upgrades and see if things work in real life configurations just as well as with our test setups. It can be as easy as making a copy of a site and trying to do an upgrade on that one. Should take 15-30 minutes of your time and any bug reports will help us weed out any bugs early on.
We'll put out the message on Twitter and the dev mailinglist or just leave a comment below to be notified by email when the time comes.

Even if you have little time to do your own testing, we wouldn't mind trying to upgrade your sites, get in touch with me at sebastiaan@umbraco.com if you feel comfortable sharing one or some of your sites that we can learn from (of course anything we see is completely confidential).

Update: The nightly is now ready for testing, please read about it on the dev mailinglist.

Friday, September 07, 2012 by Niels Hartvig

Niels Hartvig and Kasper Bumbech releasing Umbraco 2.1 in 2005The early days of Umbraco was the result of a wonderful collaboration between three guys in Copenhagen, then we scattered and became a small group of developers around the world. This was late 2004 and the first version of Umbraco as open source - v2.0 - was released in beta.

I still remember the cheering and late night beers with Kasper Bumbech and Anders Pollas at the offices of FAB-IT when we pushed the release button. Little did we know back then what the future of Umbraco had in store.  While we were just three guys in the room, we all felt the project was bigger than just us.

What was so wonderful was that we knew we had succeeded in creating a tool that wasn't just satisfying for us, as developers, but also one where we had gone great lengths to make our clients - yes, we all built websites back then - happy.

Back to the roots!
Now - almost eight years later - I'm smiling again. The team is different, but the joy of releasing is as big and satisfying as with the first versions. And finally, we're back with a release that, once again, has a great focus on what really matters - the non-developers who use Umbraco daily - the 'editors'.

For a couple of years Umbraco has had a lot (read: too much) of a focus on developers. As I haven't really done websites for clients in almost a decade, most of my professional network is developers, not "end-users" and the same goes for the rest of my colleagues in the HQ. This meant that most of the feedback we get around Umbraco are feature requests from people or our partners who implement Umbraco - and most of the requests revolve around building - not maintaining - sites with our dear tool.

Hello Umbraco 4.9, hello editor focus, hello world class collaboration!
The new Media library in 4.9 (screenshots)
Today marks a wonderful shift in focus around the core with the introduction of Umbraco v4.9. While developers are still a massive part of our DNA, most of todays release has a focus around improving the experience for editors - and this is just the beginning.

While it may just seem like a tiny version bump, Umbraco 4.9 includes an improved editor, easier integration of 3rd party videos and images and a whole new media library. Your clients will love it!

In addition, it contains over 50 big bug fixes. Not "just" your average type of bug fixes, but super relevant ones submitted by more than 20 new core contributors making Umbraco 4.9 the release with the highest number of contributors ever.

Over the past quarter since CodeGarden we've worked hard opening up the development process of Umbraco and much to our surprise, the project already benefits highly from this. The number of pull requests - which is the 'term' for when an external contributor submit an improvement to the core of Umbraco - the past quarter is higher than than any other quarters  combined.

So September 2012 feels like October 2004 on steroids. The excitement, the curiosity and the right focus is back. So is the collaboration. Everything is just bigger. Much, much bigger.

That calls for a Carlsberg Jacques Selosse! And a download!

Monday, September 03, 2012 by Sebastiaan Janssen

2012-09-03 13.29.52-2Those of you who have been keeping an eye on the progress of 4.9.0 will have noticed both a bit of stagnation AND steady progress over the last few days. The stagnation lies in the Document Type Enhancements that we have been trying to implement. We could do some quick hacks to get it done in time, but it's not worth the problems we'd be causing.
Instead we're taking responsibility for underestimating the work to do this properly and moving it to be finished in the next version. We'd much rather release something stable and not rush things than putting the burden of a poorly tested release on you and your customers.
Of course we'll also take the learning from this and will be more careful in estimating what can be done in the next sprint so that we can actually deliver on time. Estimating is hard, and we're learning to do it more reliably. For now, Niels is hiding in shame.

The steady progress, however lies in the number of bug fixes and features that actually have been added by you, the community. We've been reviewing your contributions, be it pull requests patches or just some inline code in the issues. Out of the 34 fixes, 23 of them are directly due to your contributions, so a big #h5yr goes out to the contributors for the upcoming release.

We continue to actively monitor your contributions, give you feedback in a timely manner and hopefully we're able to accept them. We added the criteria for accepting a contribution on our guidelines page ("reviews of code contributions"), so make sure to read through them if you'd like to fix something. We're also still actively going to be marking easy to solve issues as such in the issue tracker, if you don't know where to start, this is an excellent place to look.

2012-09-03_140805

Matt has done an awesome job at getting most of the media library enhancements in place and the few items that are not yet done relate to the document type enhancements so some of them will move to the next sprint as well. But here's a sneak preview of the media library enhancements.

2012-09-03_143517

Tim, meanwhile has been working on a Freedom Friday project called "Embed 'em all" which allows you to very easily embed all kinds of media directly into the rich text editor: YouTube & Vimeo video's, Flickr pictures, Slideshare presentations and much more. Any media from sites that use the oEmbed standard can be embedded really easily in the upcoming version.

2012-09-03_143855

We're currently fixing the last few things and will do some internal testing tomorrow. After that, we'll provide a nightly for everybody to play with and give feedback on.

Monday, August 20, 2012 by Sebastiaan Janssen

Hey Umbraco community, from now on I (Sebastiaan) will blog regularly about what we're currently doing during the development of the core.

First off, as you will have noticed, v4.8.1 (featuring a dozen bug fixes) has been released recently and that took a bit longer than we had hoped partly because we wanted to make sure the release was of high quality, partly because we were still getting better organized. 
Speaking of quality: unfortunately, even though we did try to test for every install and upgrade scenario, a SQLCE problem still slipped through. This seemed easy to fix at first, but it turns out there is some SQL CE specific problems that indicate that we're trying to connect to the database with two seperate connections (which is not allowed). So while we're trying to fix this, here's a workaround if you want to upgrade to 4.8.1: http://bit.ly/TEmMJN .
Please note that this is strictly an issue regarding SQL CE installs, SQL Server is not effected, we'll fix the upgrade for 4.9.0.

On to better news: We have now completely moved the issue tracker over from CodePlex to YouTrack (http://issues.umbraco.org ). This is an exciting change because in YouTrack we have so much more control over the way we manage issues, it suits our needs perfectly. Have you seen the Agile board in which you can see what is being worked on in real time? 

To make this happen, we first went through all of the open issues that had been active (created, voted on or commented on) for the past 12 months (650+!) and evaluated which ones still had merit and which ones had already been fixed or were duplicates. This left us with about 350 existing bugs and another 150 or so feature requests or tasks. We decided to close issues older than a year because they had very little chance of still being valid. That said, if you're really desperate to get an issue re-opened or look at it's comments, we do have the raw export available in both Report and BCP format (we were unable to actually use these for importing so we scraped CodePlex instead, the formats are therefore really very "raw"). 
The CodePlex Id's and owners of the issues were also imported (in the description text), you can search for them and vote or star your own issues.

We will soon be going through the issue list and making a judgement call on the difficulty to fix. There are many little issues that just need a change of about 15-60 minutes and we hope that beginning contributors will find it less intimidating to get started once they realize that there's something they can do, easily. Another thing that will be looked at shortly is the existing patches and pull request, we're going to start evaluating them and hopefully can integrate a bunch of them soon.

Looking at the overview, you can see that Matt has made great progress on overhauling the media section to make it much easier to manage media files in folders. He's also abstracted away the disk access part of the code so that in the future we can start writing providers for, for example DropBox or S3 (for which Matt has made a proof of concept for that as well).

Meanwhile, Niels has been giving the document type editor a lot of love, taking the best ideas from the community recently and integrating them directly into the core. This includes an easier way to group properties on a tab (fieldsets), allowing for document type mixins (one doctype can inherits from multiple others) and setting of root doctypes, which limits the number of document types you can create at the root level (currently, you can just create anything there).

And finally, the wonderful Lee Kelleher and Hendy Racher have put some fixes in place to make management of  Relations much easier. This includes a way to edit your relation types from within the backoffice (no more manually constructed SQL statements!) and an actual relations picker. #h5yr!

If you are itching to get some issues fixed, then don't hesitate, Peter recently added a whole new Contribute section to Our Umbraco and it describes exactly how you can get involved. If you run into any problems, make sure to comment here, or leave a message on Our or Twitter if you need some help, we're happy to show you the way and excited to see your patches and pull requests!


Tuesday, August 14, 2012 by Niels Hartvig

Today I had a great chat with our new core project manager - Sebastiaan - about handling bugs in the issue tracker. Or rather - handling peoples (high) expectations about how bugs are handled.

I've often heard (sales) people embrace open source because "thousands of developers in a project fix bugs immediately" and "loads of volunteers contribute to solve issues in their spare time". However, I've yet to see a major project where that's actually the case. I have - however - seen several projects where this rather romantic illusion of the power of open source have led to the death of a project.

You see, when a bug is fixed it's not the result of an incredible digital miracle. It's usually the case of a developer somewhere working in front of a computer and by typing letters in the keyboard, the buggy code is replaced with something less buggy. That work usually happens because the developer needs the bug fixed in order to move on with something else or because someone is paying the developer to fix the bug. In most cases it's a combination of the two.

You could argue that in this case, open source doesn't differ from closed source. Yet, the major difference between the two is that anyone can fix a bug in an open project where in a closed project you solely rely on the owner.

In the Umbraco project bugs aren't fixed magically either - it comes down to one of two scenarios:

  1. Someone in the Umbraco HQ (or core) fix the bug. This happens either when we feel that the bug is crucial for the project to move on, because one of our Confidence customers asks us to or because the bug annoys the hell out of us.
  2. Someone in the community submits a pull request. This means that the developer has fixed the bug on his own installation and then ask for that fix to be included in the core. While there's always an exception to any rule, the reason for this fix is usually that it's caused by a bug that prevents the developer to continue whatever work he (or she) was told to do. And of course because the developer had the skills and was given the time to fix the bug - usually by an awesome employer rather than a forgiving spouse.

Just like any other project, there'll always be bugs in Umbraco and just like any other project - open or closed, free or paid - a bug isn't just fixed because an issue has been submitted.

But in the Umbraco project, you're not just left hoping that your prayers of a bug fix will be heard - you're given the power to have it fixed. Either by doing it yourself (whether that means you or maybe in collaboration with your colleagues/employee) or by asking the Umbraco HQ to get it fixed through our paid services. But if you don't have the power to get a bug fixed, you are left hoping that someone else will.

Luckily, it's both more fun and healthy to contribute to a project you rely on then it is to believe in a romantic illusion. So don't just sit there with your arms crossed - start contributing.

Thursday, August 02, 2012 by Niels Hartvig

I love every single one of the fantastic members on the HQ team and there's little I'd like to see happen than one of them leaving. Nonetheless, a while ago I had a chat with one of them and recognized the look in his eyes when he said that he wanted to move on to pursue his dreams. It reminded me of myself years back when I went freelance to build Umbraco. So rather than getting on my knees trying to make him stay, I want to let as many people as possible know about the chance to work with this amazing guy.

Matt Brailsford is stopping in the HQ by the end of this month to start on his own being a freelancer and getting back working on his own packages. While I'm losing an amazing employee, the red hot freelance market in the UK just got access to one of the most skilled Umbracians available.

I told Matt to be insanely expensive, so don't even think of approaching him for a bargain. He knows every single corner of Umbraco, he has done a ton of implementations, authored some of the best packages and he knows exactly what's coming in the future. In other words - even if he's twice as expensive as your second candidate, he'll save you a lot of money. Whoever gets to work with this gentleman is simply lucky. I've been.

Godspeed, Matt!

Friday, July 13, 2012 by Niels Hartvig

core-team-2012

The wonderful people from the 2012 Umbraco Core Retreat where it all started.

I'm excited to finally announce the roadmap for the Umbraco core for the next six months. Since the action at CodeGarden '12, we've been working hard on digesting all the input from the core mailing list, feedback from our partners and conversations with the community.

TL;DR: We'll release often and everything we work on will be transparent, so you know where and how you can contribute.

Based on feedback, we've decided to change how we release. In the past, this has been too random, leaving community and partners surprised when there was a release and by what it contained. It has caused a lot of uncertainty for professional users, as it's been hard to plan when you don't know what to expect. It has also made it difficult for the community to know where and when they can contribute.

We believe that the most healthy solution is for Umbraco to be in constant development ("perpetual beta") with a short but constant flow of release cycles. This will ensure that even major enhancements are split into smaller bits, thus helping us to keep focus. Therefore, no new features will become so large that it becomes impossible for others to contribute. At the same time, there's a demand for regular, super-stable and polished versions that you can trust. With this draft we believe we've found a solution to accommodate all scenarios without compromising!

The plan is to have minor releases every five weeks, with four weeks dedicated to development (2*two week sprints) leaving one week as a beta and bug fixing sprint.

After two minor versions, we'll work on a major version based on the previous two minor versions. This major release will consist of one two week sprint with the focus on polishing the two previous releases.

This means that every quarter will bring us two minor releases containing new features, and one major release that polishes and stabilizes the work of the minor ones.

Now that you know our intent, what you really want is to look at the roadmap and see what's planned for the future. We hope that you don't just want to read it and then wait for the next release to drop, but will also want to contribute towards making it happen.

So without further ado - go to the brand new roadmap section on Our Umbraco.

Thank you to everyone involved in making this roadmap real - it has been a massive team effort. The future is incredibly bright and fun for all of us.

Friday, June 22, 2012 by Peter Gregory

Now that the dust has settled and people are getting back into the swing of things after a fabulous but exhausting CodeGarden, it's time to wrap up and summarise CodeGarden12, in a mega bumper edition blog post.

OpenPanel

First up I would like to thank everyone involved for making it a great CodeGarden this year, be it if you talked at a session, got involved with the discussions to push the project forward, hacked away in the hack room, or just simply attended. Without you, the Umbraco community, we wouldn't have a great conference, so a BIG 'Thank You'!

Open Space

After a couple of year's absence, we decided to bring back Open Space to day three of CodeGarden and we are glad we did, as it was a great success. After the news on day one about admitting failure and deprecating support and development for V5 it was a great way for people to voice their feelings and suggestions on the way forward.

It ended up being a great opportunity to reintroduce Open Space as we had very passionate, motivated and highly opinionated attendees at the conference to help discuss and push the project forward, to go onto bigger and better things.

openspace

What is Open Space?

Open Space is a format that allows conference attendees to formulate the agenda of topics that they wish to discuss.  They then attend the sessions or Open Space meetings they wish to participate in and contribute to.  On the conclusion of the sessions all those that ran a session then report back on what was achieved during their meetings and upload the notes for everyone to see.

Notes from the CodeGarden 12 Open Space sessions can be viewed here.

Umbraco Awards 2012

The Umbraco Awards are an opportunity to celebrate all the awesome and high quality work that the community produces when building great Umbraco websites.  We short listed three finalists for each category.  The winners were announced at the end of CodeGarden when each winner was presented with a very unique award: a custom Umbraco skateboard. Below, Peter Gregory from HQ talks us through the category winners.

Best Design

livingroom.gg
Blix- http://www.blix.co

six60.co.nz
BKA Interactive - http://www.bka.co.nz

tasteatthecloud.terabyte.co.nz
Terabyte Interactive - http://www.terabyte.co.nz

Winner: livingroom.gg
"livingroom.gg was selected because it is beautifully crafted, easy to use & mobile friendly. We were impressed with the thought put into the responsive layout and we found it extremely intuitive to use. It demonstrates current web trends in an appropriate way."

Livingroom

Best Integration

egedalkommune.dk
Eksponent - http://www.eksponent.com/

giltrap.com
BKA Interactive - http://www.bka.co.nz

boxnation.com
Crumpled Dog - http://www.crumpled-dog.com/

Winner: Giltrap.com
"We were impressed with their integration of a full email marketing suite into the back office of Umbraco.  Editors were able to create send and manage their campaigns directly from the back office without the need to interact with the third party tool directly."

giltrap

Best Technical

folkeskolen.dk
Eksponent - http://www.eksponent.com/

stairplanner.com
CaB Studios - http://www.cabstudios.co.uk

panasonic.co.nz
Terabyte Interactive - http://www.terabyte.co.nz

Winner: Folkeskolen.dk
"Folkeskolen has massive amounts of content.  Content items are stored in a custom DB which is loaded into a custom Lucene engine for indexing and faceting. Custom content is edited via a custom version of DEWD.  The Lucene implementation allows for incredibly quick searching. This solution is packed with stuff that makes your average developers head go BOOM!"

folkeskolen

Our panel of judges loved taking the time to look at all the submissions and it was really hard to choose the nominees & winners from all the great entries we received. What was also amazing was that we received entries from all corners of the globe meaning our shipping bill will be much higher than usual :P So if you entered into the Umbraco Awards, we would like to say a BIG thank you.

Package Competition

Every year at CodeGarden we run a package competition, where attendees have the opportunity to submit an Umbraco package that extends the out of the box functionality of Umbraco.
At the end of CodeGarden we ask all our package competition entries to present their package, giving them five minutes apiece to present before being thrown off the stage, finished or not. Submissions can range from useful and powerful packages to the downright silly, which of course, we love :)

Prizes

This year we introduced a theme for our package competition prizes, deciding on gadgets that have a .NET SDK to extend and hack around with.

Third Prize - Programmable BetaBrite Scrolling LED
By itself it may not be the most sexiest prize ever, but when you know you can extend it with a .NET SDK, just imagine the possibilities!
http://betabrite.com

Second Prize - Lego Mindstorms
This is not just any old Lego, but Lego that can be used to make robots.  With the sensors that come with it you could start programming something beautiful!
http://mindstorms.lego.com

First Prize - Parrot AR Drone
This was a great first prize and looked a lot of fun to use. It's a quadcopter that can be flown using an iOS or Android device.
http://ardrone.parrot.com

The Winners

The packages were judged by the attendees with the biggest cheers and the winners for this year were as follows:

3rd Place - UmbraCodeFirst
Stephan Kvart demo'd a package that allows you to define your templates, document types, tabs and properties all from code, which you can then version control. Other features include an a live page preview feature that allows content editors to see a page preview in the back office UI before they publish.

http://our.umbraco.org/projects/developer-tools/umbracodefirst

3rdplacepackage

2nd Place - Document Type Fieldsets
Tom Fulton demo'd a package that adds another level of grouping in addition to tabs on a document type - called "fieldsets". This makes it easier for content editors to edit relevant data in a group on the same tab.

http://our.umbraco.org/projects/backoffice-extensions/document-type-fieldsets

2ndplacepackage

1st Place - UmbraMVCo
Shannon Deminick demo'd a package that takes the first steps to introducing the MVC concepts from v5 back into v4.  This package provides the developer the ability to use MVC for their front end website instead of webforms. 

http://our.umbraco.org/projects/website-utilities/umbramvco
http://shazwazza.com/post/MVC-in-Umbraco-v4.aspx

1stplacepackage

Honourable mention - FaceLog
Matt Brailsford built a package for Umbraco that allowed Umbraco back office users to login to Umbraco using facial recognition. Unfortunately Matt couldn't get his laptop to play nicely with the projector and demo it to the crowd at CG12, but was able to demo his package from his laptop to a group of people and they were impressed.... so much so Shannon kindly donated his 1st place prize to Matt.

mentionpackage

Congratulations to all our winners and thanks again to everyone who entered the package competition. High Five You Rock!

Bonus: The Umbraco Song

Umbraco Bingo is indescribable in a blog post, it's definitely an experience you have to have in person. For this year's Bingo finale our Dear Leader and General Ploug instructed the Umbraco corporate song be sung:

Want to sing along and get practising for your next karaoke night? No problem here's the lyrics...

Played to the tune of Cliff Richard's - Congratulations

Chorus:
Oh, oh, Umbraco, Oh, how I love you, 
I want the world to know that you´re my No1.
That loving feeling, no one could give me, 
when I met you that is exactly what I found.

Who could believe that I could be happy and contended
I used to think that good software hadn't been invented
I used to love Frontpage, days before I met yoouuuuu
When I let yoooou walk into my heaaart

Chorus

We used to think that stuff should be so complicated
and our working codebase felt so damn outdated
then we thought the key to this was more ab-straaac-tions
but it turned out, that we were wrroooooong

Chorus

Pan Flute Solo

Who gives a shit about being enterprisey
We know the key to love is acting super friendly
Don't give a fuck, write simpler code, and then start shaaring
that is caring, make the sun shiiiiine

Chorus X3

One last thing...

Has all this talk of CodeGarden got you excited about what next year's CodeGarden will bring? Wondering how can it get any better? Trust us, it can! So make sure to get in early with our super early discount for CodeGarden13 tickets at a low price for a limited time (first 100 tickets or when we remember to turn the discount off).

badges

Make sure you keep your eyes peeled on the Umbraco twitter stream and the CodeGarden12 site as we continue to release a new video every other workday.

Until next year.... have fun, and don't forget to start practising the lyrics to the Umbraco song :)

Cheers,
The Umbraco HQ

[Photo's by Doug Robar. #H5YR!]

Wednesday, June 13, 2012 by Peter Gregory

Watch the CG12 keynote video where Niels explains the reasons why it was decided that development on v5 could not continue.

Wednesday, June 13, 2012 by Paul Sterling

UPDATE: We're back on track!

Since the original post post, everyone in the community have been hard at work getting the project back on track and with the release of 4.10 in November we have delivered what we promised at CodeGarden - MVC support in Umbraco. 

In addition we've never had more people participate in the development of Umbraco, we've never registered a bigger number of site launches and the vibe and the morale in the project are at a record high.

In addition to this we have a completely new UX coming in spring 2013 and with v6.0 - coming in December 2012 - a new foundation that increases our already industry best performance and scalability. All of this, through the most transparent development process in the industry that ensures that everybody can follow what's going on right now and what's in store for the near future. 

We made a mistake, took the full responsibility and learned from it and have come out stronger. Much stronger.

 

 

 

Original post:

 

In the end, the only responsible decision, the only decision that respects the community and the core values of the project was to retire v5.

Firstly, our apologies for not being better prepared with a public announcement for those of you not at Codegarden regarding v5.  It is not a decision that has been brewing for months, but a discussion that was started and researched a few weeks back, culminating in an honest and open conclusion made by the community group who attended the weekend's pre-codegarden retreat.  These were not all HQ and core members but an impartial and honest group of both core and community members, new and old.  

That being said it is a decision that has not been made lightly and on the spur of the moment however happened quickly as it was in the end the most obvious and logical decision to make.  v5 has become an overly complex system that has turned into the very monster Umbraco was originally created as a reaction against.  The community was not involved in its development, with one of the results being a highly complex set of code which also means the community will never HAVE the option of being involved with its development.  This goes against everything Umbraco stands for.  Within the community there was a great deal of frustration with v5.  It was difficult to use, had performance issues, and was generally not an improvement over v4.  The vast majority of Umbraco community members were continuing to develop and release using v4.

A simple look at the solution is to take all that is awesome about v5 and add it into v4.  We will still support Umbraco 5.2 to solve the worst issues with those still running a v5 site, but at this point we cannot recommend beginning any new projects with v5.  The focus needs to return to simplicity, community involvement and transparency, and more will be posted in the coming days/weeks with regards to these things.

Update:

Watch the CG12 keynote where Niels explains the reasons why development on v5 could not continue. CG12 Keynote Video

Sunday, June 03, 2012 by Per Ploug

The Umbraco ecosystem is growing stronger and larger every day. Every day we hear about large companies or members of the public sector launching yet another new project on Umbraco, and in 2 weeks we will kick off the biggest Umbraco conference/festival ever, with more sessions and more attendees then ever before. (If you want to grab one of the last tickets, check the conference site here)

This enormous interest and growth also comes with its own set of challenges: Finding qualified developers and companies to run all these projects, which is why we for years have pushed developer certifications, company partnerships and a global training program, it means happy customers and happy developers, a happy ecosystem.

We've just announced the next batch of copenhagen certification courses spanning over the next 6 months, so if you havn't already ordered a seat, I suggest you do it now, as all courses the last year has been sold out. This is THE way to get started with Umbraco and get the official stamp of approval as a certified Umbraco developer, no matter if you are a webdesigner or a hardcore .net developer.

The next course will run in the end of June (25th-26th and 27th-28th), so why not get those certifications in time for summer?

See the list of copenhagen courses and book a seat online

Wednesday, May 30, 2012 by Peter Gregory

Hello there!

With it being exactly 14 days to go until CodeGarden begins, we thought we should run through some useful information, let's call it: "The beginner's survival guide to CodeGarden."

Who's coming?

As silly as this may sound, we need to know who is coming to CodeGarden to ensure we have your name badge ready for your arrival. We ask for this information as sometimes the ticket buyer is not the attendee who is coming.  It would be embarassing for example if Wendy bought your ticket and your name is infact Brian.

So it's very IMPORTANT to ensure you ticket has been assigned on the Umbraco.com website, otherwise you won't have a name badge. Even if you have purchased your ticket for yourself please ASSIGN the ticket to yourself, so we are certain that the ticket is for you and not a colleague.

To assign your tickets log in to the Umbraco.com website and follow this link /profile/options/your-event-reservations.

One last thing to do with name badges, if you want your twitter username printed on your name badge then please ensure your codegarden12.com website profile has this information.

It will be what you make it.

CodeGarden is all about participating and getting involved. Not finding the session you're in relevant? Move to another! You make CodeGarden what you want it to be, so make sure you come prepared to make the most of it, and most importantly, get involved.

Leave work at home.

It is super important to make sure you leave work at home and make yourself unavailable to your boss, workmates & clients if and when at all possible. At CodeGarden we want you to have a great time and make yourself present, rather than being unsociable and sitting in the corner checking your work emails every five minutes.  It's just good manners really. :)

Internet.

It is unlikely there will be a good stable internet connection at the venue.  We will have some 3G wireless boxes which worked reasonably well last year, but as we all know, WiFi at most tech conferences is unreliable at best.

If you desperately need to use the Internet, which you shouldn't really, due to the "Leave Work at Home" rule, then we recommend you bring a 3G dongle with you.

Marketing.

If you distribute marketing material (Flyers, t-shirts, etc) without being a sponsor we'll beat you over the head with the above aforementioned dongle, and ban you from CodeGarden forever. If you're interested in becoming a last minute sponsor get in touch and avoid any bruises ;)

Finding the venue.

The venue is called "Kedelhallen" (The kettle hall) and is located on Nyelandsvej 75A, 2000 Frederiksberg. Here's the street view of the venue location and the venue has a huge chimney, handy to use as a landmark.

Be there before 9:00

The Conference starts at 9:30 sharp, but registration opens at 8.00. So help everyone by coming early and making registration as smooth as possible. There is a large number of us, so it may take a little time to get everyone through.  Take the opportunity, meet some new people, drink some coffee, shake a few hands and remember to 'smile.'

Remember cash.

While food, water, coffee, etc is on the house, you might want to buy snacks or something else at the cafe. BUT the cafe only accepts the Danish credit card "Dankort" or cash. So, make sure to bring Danish crowns in cash.... most places will only accept Danish crowns, not EUR or USD.

Sun block.

The venue has a large outside area which traditionally is used for informal breakout sessions, and the weather is looking GOOD. So remember to bring sun block, sunglasses and a hat, and look forward to turning that LCD tan into something a bit more decent.

It's a festival - not a conference... CodeGarden doesn't stop at 4'o clock.

There's dinner and social events on both Wednesday and Thursday. On Wednesday we'll celebrate a great first day by touring around the canals of Copenhagen in charted canal boats with music and a bar. On Thursday, there's the infamous and classy (cough) Umbraco Bingo. So to recap, CodeGarden does not end at 4 o'clock, make sure you stick around!

Bring your laptop.

To get the most out of CodeGarden you'll need your laptop ready to run Umbraco.  You will likely be installing tons of new stuff during the conference, especially if you plan on attending the new hands on track we have organised.

#CG12 is the official Hashtag.

If you're adding photos to Flickr or if you tweet about CodeGarden make sure to use the CG12 hashtag (#CG12 on Twitter) so it'll be a part of the backchannel.

We've also added a Flickr Group for everyone's photos, so any photos you take, make sure to post them to this group with the following tags: "CodeGarden12" "CG12" "Umbraco".

Also please tag yourself or other people in these photos, as they will appear on your profile page on the CodeGarden 12 site. For example here are some photos of Niels.

Sweet!  That's about everything you'll need to know to survive this year's CodeGarden Festival. We'll see you soon, when the fun begins!

The Umbraco HQ.

Wednesday, May 23, 2012 by Morten Christensen

One of the tasks we have been working on in the past Sprint is to enable localization of the backoffice by making sure that all texts used in the backoffice is fetched from the localization files. Now that the default English localization file is done we are putting it on Github, so the Community can help with the translation efforts. So if you want to see a localized version of the Umbraco 5 backoffice in your language please feel free to fork the repository and start translating.

Please note that we do accept partial translations through pull requests, so if the complete file seems like a big mouthful rest assure! We'll merge all the contributions we get through Github.

The procedure is that once you send us a pull request we will merge your pull request once the translation has been approved by at least one other person who understands the language of your translation.
Complete translations will ultimately be added to the Core and possibly be part of the 5.2 release.

All contributions will be awarded the shinny "Core Contributor"-badge on their our.umbraco.org profile.

So what are you waiting for? This is the perfect opportunity to try out the new Github client for Windows and contribute to the Umbraco 5 project!

Umbraco 5 Localization project on Github

For more information about localization in Umbraco 5 check out these blog post by Niels Kühnel:
The New Localization Framework in Umbraco 5
An 101 on the Localization framework in Umbraco 5

and if you would like to see Niels talk about Localization there is a video from CodeGarden'11.

Wednesday, May 09, 2012 by Per Ploug

Courier 2 is a commercial add-on, for handling deployment of content, media, files and anything else in you umbraco installation. It detects and handles dependencies for you, to ensure you always deploy working components.

Time sure flies, Its been just 12 months since the first release of Courier 2 was introduced to the Umbraco community. Since then, there has been a steady stream of updates to make things more stable, handle edge-cases such as very old DB schemas, and of course make things easier and faster.

Courier 2.6 represents a big leap forward compared to the previous releases, which has mostly been about tweaking the existing architecture. 2.6 has some pretty big architectural changes which you won't notice today (besides the performance), but will appreciate in the long run.

Many many thanks to dedicated users like James Drever, Nic Wise,Peter Bersani (and many many others), as we have received fantastic feedback and issue reports. It has helped shape Courier and ensure that it has been taken in the right direction.

As always, my Inbox is open for comments, suggestions and so on, so don't hesitate to get in touch: per (at) umbraco.dk

So what's new?

New Compare UI, which enables you to either compare and deploy against the local installation or against any other site you are connected to through courier.

image

The improved UI will give you a much better overview of what courier intend to do, and you can toggle items on an off

image

 

Splitting the dependency resolver into 2, in past versions Courier ran a file depency check against all items, this could take a lot of time, especcially if you had a lot of inbound links, relations and big collections of dictionary items. With this change I've split the resolver into 2 parts. One that handles content items (such a content data, document types, macros) and one that specificly handles resources (images, xslt files, template files, pdfs and so on) Deviding it into 2 makes it much easier to determine if the dependency resolution of each type is even needed, and it makes it much easier for 3rd party developers to write specificly targetted resolvers as well. 

 

Simpler Nhibernate mappings, this is all about performance, ensuring that Nhibernate doesn't try to query for too much data, and is really caused by Umbraco 4s schema. So alot of the mappings have been replaced with hand-written nhibernate quriers to ensure we only get the data we need.

 

Cached hashings, when you package a revision, Courier now automaticly create a file containing hashes of all the items, this doesn't take any extra time to do, as we have all items in memory at some point so it's quick to dump the hash to a file. What matters is that when we later want install these items, we have a quick way to determine if anything has changed, or if we can simply skip the item.

 

Better packaging and extraction engines. This is really the biggest change, which is what enabled us to do the remote compare and deploy UI. It basicly enables the engines to say, give me a source, give me a target and some settings, and I'll run the packaging/extraction, and you can do this in any environment, so on a computer in russia, you can run a cmd-line app, that packages content from a site in sweden, and extracts it to a 3rd site in Mozambique (given that you have a internet connection ofcourse..)

 

What's next?

2.7 has one feature on its todo-list, which is "ongoing-compare", which basicly merges the packaging and extraction process into one. So as you pick items to deploy, you tell courier where you intend to deploy these items, and while Courier packages the items, it compares against the remote site to determine if changes have been made. What is important to notice, is that it does a compare based on the unique finger-print of the item and its dependencies, so if a item is determined unchanged, Courier can also skip the dependencies as well, meaning that alot of checks can be avoided.

 

Where to get it?

You can get 2.6 from our.umbraco.org now. And for those who havn't given it a try already, you can run it on any local machine with no limitations (or remote desktop on a remote server), so you can test if this works with your specific site.

Friday, May 04, 2012 by Warren Buckley

We're thrilled to announce the return of the Umbraco awards at this year's CodeGarden.

There's a lot of great Umbraco work going on in our community with people using Umbraco in many impressive ways. Now it's time to get all that fantastic work out in the limelight. We've made it free to participate and we'll have the following categories.

Best Technical Solution

In this category we'll promote the best and most innovative usage of Umbraco, the concepts and API's. So the focus is on the technical usage of Umbraco. So show us the clever things you have done with Umbraco.

Best Designed Site

We're looking for the designs that blow you away. Not only visually, but also in respect to web standards. Where stunning design meets clean markup.

Best Integration

Usually Umbraco doesn't stand alone and is often integrated with other systems. We've got an award ourselves for integration (BNP CMS Awards) and we'd like to see how you're using Umbraco as a hub for other systems. 

umbraco-awards
Last years winner Kraftvaerk of the Technical Solution category with a unique Umbraco Award

Case studies

Here at the Umbraco HQ, we think that with all these great submissions that it would be a brilliant idea to turn these into case studies. So by entering into the Umbraco Awards please make sure you and your client agree that we may use your submission as a case study on the umbraco.com website - its great exposure for you and your client.

How do I enter?

To enter the Umbraco Awards is simple, just fill out the form over on the CodeGarden12 website.
But what are you waiting for? Come and show us your best stuff and see if you can win an Umbraco Award that you will be proud to show off to your clients and colleagues. With it being an Umbraco Award you can expect the award itself is something unique and cool that you will want to show off.

Rules

  • An individual or company can only participate once in each category
  • Only submissions with full details are evaluated & considered for nomination
  • The submitter must be the creator of the work
  • Voting will be done by the Umbraco HQ

Dates

  • Deadline for submissions is Mon 28th May
  • We'll announce the final winners during CodeGarden12

Notes

  • If you submit a website to the Umbraco Awards you will most likely want to buy a ticket to CodeGarden, so that you or your company can pick up the award in person if you win.
  • By entering into the Umbraco Awards please make sure you and your client agree that we may use your submission as a case study on the umbraco.com website - its great exposure for you and your client.

One last thing - Good Luck!

Thursday, May 03, 2012 by Tim Geyssens

After several months of development I'm pleased to announce that Contour 2.0 for Umbraco 5 is out! Contour extends umbraco with a new section that makes creating contact forms, entry forms and questionnaires just as easy as using Word.

image

Getting started

In order to install Contour 2.0  you'll need to be running  Umbraco v5.1 (we are targeting 5.1, 5.0.x isn't supported, newer Umbraco version will be supported obviously).

It just takes a couple of clicks to install Contour and once it's active you can start adding forms to your pages. Simply navigate to developer/packages/local packages , choose the Contour nuget package  and follow the installation wizard, once it's installed you should have access to the Contour section. For a detailed installations instructions check the beta video.

image

Try before you buy

Contour is a commercial product so after installation it will run in trial mode until you provide a valid license file. There have been no changes in the licensing model compared to the Umbraco v4 version so all existing licenses should just work and new ones can be ordered through the site as usual.

Upgrading

If you are already running the beta or RC build of Contour upgrading is simple, just delete the \App_Plugins\Packages\Contour directory and install the release through the Umbraco UI, all your forms and entries will still be available after upgrading.

Download

Contour 2.0 is available from it's project page on http//our.umbraco.org (including new developer documentation)

Friday, April 27, 2012 by Peter Gregory

We have even more great news in regards to this year's speakers at CodeGarden 12.   Neither of these fellows are strangers to CodeGarden (or presenting at CodeGarden) and we consider them a couple of Umbraco heroes.

So without further adieu let me introduce them and their sessions :)

Lee KelleherLee Kelleher - uComponents, Y U NO UMBRACO 5?

Lee is an Umbraco specialist. Having first used Umbraco 3.0.3 in 2007, he has become increasingly involved with the community and helped towards building a network of user-groups within the UK. With over 15 years of web-development experience, Lee has worked with a vast range of clients such as Tesco, Toyota, PwC, Ernst & Young and JPMorgan Chase.

Session Info:

Over the last 2 years, uComponents has become an essential part of an Umbraco developer's toolkit. Initially with Multi-Node Tree Picker being the must-have feature, then discovering other desirable gems, such as uQuery and countless XSLT extensions. Questions arose as to why uComponents wasn't part of the Umbraco core product... in this session, we will explore how uComponents started, why it wasn't part of the core, and how this has changed for Umbraco 4.8. Now the question remains.... what does this mean for Umbraco 5?

Aaron PowellAaron Powell - What I learnt by building Stats It

You may know Aaron best by his twitter handle @slace or because of his massive contribution to the Umbraco v4 Core. Over the past 7 years as a web developer he's worked his way through a number of different content management systems from enterprise to open source.

"I've always admired the passion of the Umbraco community and what they have put together. It's that kind of strength that can ensure a community will thrive and one of the reasons I love coming back to CodeGarden each year".

Session Info:

When v5 was under development Aaron decided to undertake an ambitious project, a self-contained analytics package. An analytics package isn't exactly simple though, there's trees (including a full representation of the content tree), macros, surface controllers, hive interaction and editors. Then there's actually building the package!  So while undertaking this task what did he learn?  Come to the session and find out!

There are going to be so many good speakers and masses of valuable information you would be silly not to be at CodeGarden this year.  If you haven't already done so, why not live a little and book your ticket to CG12.  Live life without regrets :)



Monday, April 16, 2012 by Warren Buckley

Hey All,
It's time to give you an update on what is happening with the annual Umbraco conference CodeGarden. This year we are introducing a new session format for one of the tracks, which is the lightning sessions.

What is a lightning session?

A lightning session is a usual one hour session slot in the schedule broken down into three smaller sessions of twenty minutes each. This allows for a fast rapid pace of learning and keeps the speaker focused with more hands on demos rather than long lengthy theory and slides.

The one hour slot will be a mixture of three different speakers on a related topic or it will be one speaker for the hour talking about three different topics in their session.

After each of these lightning sessions the speaker/s will be available in the hands on room to take any questions and to discuss their talk further. This allows you as an attendee to get more direct access knowledge from the speakers at CodeGarden and build up some great relationships.

 

We are happy to announce...

We are happy to announce a few of the lightning sessions that we have confirmed for this years CodeGarden schedule. Below are some of the confirmed speakers and sessions we have for the new lightning format.

pete-dPete Duncanson - Mobile first with Umbraco V5

Pete is the Managing Director and chief geek at Offroadcode, a small team of three developers based in Huddersfield, UK.
He and the team have been active in the community since 2009 and like to support it by releasing handy packages (XSLTouch, DocType Mixins, XSLToJSON, etc.).

Working with others over a pizza and a beer (or two) we like coming up with interesting solutions to Umbraco related problems.

Offroadcode are currently working on a complete rebuild of the Olympic Holidays website to make it one of the first truly mobile friendly travel websites on the market using numerous best practises.

Session Info:
We will be sharing some of the lessons we learnt while using HTML5, CSS3 and some Umbraco goodies to make developing your site for mobile easier along with some tips and tricks too. Hold on to your hats, it is going to be a whirlwind tour!

 

 

soren-sSøren Spelling Lund - Coding Nerdvana With ReSharper

Søren is co-founder of the uCommerce company, which develops a full featured e-commerce platform for Umbraco with everything you need to run a successful online store on Umbraco.

He's been involved with the Umbraco community since 2008 when work began on the uCommerce platform. Since then he's been a regular speaker at Codegarden. Prior to getting involved in Umbraco he worked as an e-commerce consultant for more than 10 years and was named Microsoft MVP for ASP.NET in 2010, 2011, and 2012.
Søren hates writing these bios :-)

Session Info:
Achieve nerdvana! Create those Umbraco 5 macros in Visual Studio blazingly fast, with less errors too.
ReSharper has become a staple of the .NET world and if you're not using it today you should. Don't waste time using vanilla Visual Studio. Be more efficient and have more fun doing your work with ReSharper.

Already a keen observer of ReSharper zen? Fear not, you'll walk away with a few new tricks up your sleeve to make your everyday coding experience even better.

During this session you'll get a introduction to the goodness that is ReSharper and we'll take a dive in the deep end and see how you can achieve coding nerdvana. Use ReSharper and become a coding ninja in no time! (Outfit sold separately).

 

 

richard-sRichard Soeteman - CMSImport for V5

Richard Soeteman is actively involved in the Umbraco community since 2008 and the author of several popular Umbraco packages such as CMSImport.

Session Info:
In this session Richard will show you how you can import your content or members from various datasources such as SQL server and Excel into your Umbraco V5 environment using CMSImport for Umbraco V5. Richard will also show you how you can import content while remaining the hierarchical structure, how to avoid common pitfalls during the mapping of columns and how to update existing content or members.

 

OK that's it for now but keep your eyes peeled as we announce more sessions and details about CodeGarden.

If you haven't purchased your tickets to CodeGarden yet, why not? As this year sees the entire schedule dedicated to the new MVC version of Umbraco, version 5. If you want to be ahead of the competition and start working with version 5 then this is a must attend event. Not only will you learn a lot from the sessions but you have the opportunity to socialize and network with some great people of the Umbraco community and meet the who's who of the Umbraco world.

Umbraco certified partners, keep an eye soon as we will be sending you details about a great offer for CodeGarden 12 tickets for you and your team.

Until next time...
Warren and the Umbraco HQ

Wednesday, April 04, 2012 by Tim Geyssens

After the beta release 2 weeks ago Contour 2.0 is now feature complete and we are releasing the RC.

What can I do with the RC?

Everything you can do with the Umbraco v4 version of Contour should now also be possible on Umbraco v5 with the RC release of Contour 2.0.

That includes:

  • Managing forms from within the Umbraco backend
  • Viewing, exporting and editing submitted records
  • Outputting records on your frontend
  • Attaching extra functionality to your forms (send email, creating Umbraco content, …)
  • … for full details check out the Contour product page

There's even a great improvement, it's now possible to have complete control over the form markup Contour will generate.

Custom markup for your Contour forms

The default view for the Contour form and field types can be updated, making it possible to have custom form markup. You can do this for al your forms or for a single form.

To do this for all your forms simply update the default views:
~/App_Plugins/Packages/Contour/Views/MacroPartials/ContourForm.cshtml (view for the form, including page name, fieldset, legend, field container)
~/App_Plugins/Packages/Contour/Views/Partial/FieldType.*.cshtml (view for a specific field type like textfield, datepicker, ...)

If you want to do this for a specific form you'll need to create the following folder:
~/App_Plugins/Packages/Contour/Views/Forms/{FormId}/ (FormId needs to be an existing form id, you can view the id of the form on the settings tab of the form designer)

As an example if your form id is 85514c04-e188-43d0-9246-98b34069750c then you can overwrite the form view by adding the ContourForm.cshtml file to the directory
First copying the default one and then making your changes is the best way to get started
~/App_Plugins/Packages/Contour/Views/Forms/85514c04-e188-43d0-9246-98b34069750c/ContourForm.cshtml

You can also overwrite views for 1 or more field types by adding the views to the folder (again if you first copy the default one and then make your changes...)
~/App_Plugins/Packages/Contour/Views/Forms/85514c04-e188-43d0-9246-98b34069750c/Fieldtype.Textfield.cshtml

A final option is to overwrite the view for a specific field on a form (if you want to target a specific field but not all fields of this type)
~/App_Plugins/Packages/Contour/Views/Forms/85514c04-e188-43d0-9246-98b34069750c/FieldName/view.cshtml

Getting started

In order to run the Contour beta you'll need to be running an Umbraco 5.1 build (we are targeting 5.1, 5.0.x won't be supported), you can get the latest build here: http://nightly.umbraco.org/Jupiter/51/

It just takes a couple of clicks to install Contour and once it's active you can start adding forms to your pages. Simply navigate to developer/packages/local packages , choose the Contour nuget package and follow the installation wizard, once it's installed you should have access to the Contour section. For a detailed intro check the beta video.

image

Whats missing?

All features are in place and it should be on par with the version you know from Umbraco v4. What we'll focus on now before the release is updating the documentation (most things have stayed the same but there are a couple of small changes due to the move from Webforms to MVC that we'll outline in the docs).

Report bugs

Again it would be a big help if you could take the RC for a test run and report any bugs you might find here.

Download the Contour 2 RC build

Wednesday, March 21, 2012 by Tim Geyssens

The last couple of months I've been working hard at getting Contour (HQ's official form builder) ready for Umbraco v5. Today we are releasing a beta version that you can install on your Umbraco v5 sites.

What can I do with the beta?

If you've already used Contour it will look almost identical, all the UI bits are in place so you can create forms, attach workflows, view and export entries, use prevalue and datasources and fine tune form security for your backend users. All that from a new section in your Umbraco v5 backend. There's loads of great lessons learned from making it that I can't wait to share and I'm preparing an awesome CodeGarden session about it

image

The beta will be fully functional untill 01/04 after that it will go into trial mode and you'll need a valid license (still using the same license model so existing licenses should simply work).

Getting started:

In order to run the Contour beta you'll need to be running an Umbraco v5 5.0.1 build (since Contour relies on some recent fixes), you can get the latest build here: http://nightly.umbraco.org/Jupiter/501/

It just takes a couple of clicks to install Contour and once it's active you can start adding forms to your pages. To see how easy it is check this short intro:

Whats missing?

We're aiming to get all the features you know from the v4 version in the v5 port but currently there are a few bits missing.

  • Datasource: umbracoNode
  • Prevaluesource: nodePrevalue
  • PrevalueSource: umbracoPrevalues
  • Record editing
  • Page id missing on record
  • Place holder parser for umbraco properties

Once these are in place we'll have the final release ready

Report bugs

If you encounter any bugs during your tests  it would be a huge help if you report them  by going  to this page.

Download the Contour 2 beta build

Wednesday, March 21, 2012 by Warren Buckley

Hiya,
To continue the blog post series of confirmed sessions for the annual Umbraco conference CodeGarden. I caught up briefly with fellow HQ colleague, Shannon Deminick to tell me about his session at this years CodeGarden conference.

Warren: So Shannon Can you tell us what your session is called for CodeGarden?
Shannon: It's called 'Rebuilding the Node Selector in V5, from .proj start to .nuget end'

Warren: That sound's like a neat title, but what is the Node Selector?
Shannon: Well you would have known it as Multi Node Tree Picker aka MNTP from the uComponents package, but in V5 it has been given a more appropriate name of the Node Selector.

Warren: So what will your session cover?
Shannon: Well as the title suggests I will dissect the Node Selector for V5 and take you through each step as to how I built it for V5, from creating a Visual Studio project all the way through to creating a V5 Nuget package out of it. In addition to guiding you through some best practices in creating plugins, this session will show off some of the cool gems and inner workings of v5 that you will probably want to know about.

Warren: That sounds like a killer session. I know I will be there, to see if I can pick up some tips from you!

 

Shannon Deminick

shannon-deminickShannon has worked on the Umbraco core for 4 years since pre 4.0. He's developed Examine and ClientDependency frameworks as well as founded the uComponents project and created the most popular v4 DataType: MNTP (Multi node tree picker). Shannon has since worked on the v5 codebase since its inception and has been the lead developer for much of the MVC portion of the codebase. He regularly blogs about both Umbraco and ASP.Net MVC @ http://shazwazza.com

 

So that's another CodeGarden session confirmed that you know about and it sounds like it will be a great session to attend. If you haven't already bought your ticket I highly recommend you buy it now to avoid disappointment.

Keep an eye on this blog as we post more confirmed sessions and other great info about CodeGarden as time goes on.
Warren & The Umbraco HQ

Friday, March 16, 2012 by Peter Gregory

With the release of Umbraco 5 demand for training worldwide is at an all time high and for the first time ever we had an opportunity to open up courses in South Africa. So with bags packed with course books and a boat load of excitement I set off on what would be a big adventure.

After 18 hours of travel I finally arrived in Johannesburg, the biggest city in south Africa. I had been told many horror stories by former South Africans of muggings, hijackings etc so I was somewhat apprehensive about looking like a tourist.  Joburg is a massive contrasting place, a mix of 3rd and 1st world separated by security fences and is completely landlocked.  The streets are full of people peddling phone chargers, car badges or asking if they can clear the rubbish from your car for a fee. You are always alert and watching out for the insane minibus taxi drivers who follow their own road code (none). After a while however you get used to it. 

Minibus
Minibus Taxi (photo from wikipedia because I was too chicken to take one :P)

My first challenge was making my way to the hotel.  I had been given instructions to catch the Gautrain, the ultra modern light rail system that was installed during the World Cup, and then the Gaubus to my hotel.  However things didn't quite go to plan.  The train got me to Sandton, which is the new business district of Joburg. It's the new business district because "the old one has been hijacked by Nigerians" I was later informed.  I guess this is where most of our spam originates.  On arrival I wandered around the station trying to find the Gaubus.  There were loads of buses parked in the station but no drivers.  After a searching around for another 15mins a security guard informed me that "the buses do not run today".  This is typical of public transport in South Africa.  Its next to non existent.  So a taxi was my only choice.  I had been told to be careful about what kind of taxi to get into and under no circumstances should I get in a minibus taxi.  Minibus taxis are somewhat of a game of Russian roulette from what I can tell.  Most of them are would not be road legal in most countries and I had heard a story that one driver had been caught driving one with a spanner rather than steering wheel because it took up too much room and without the steering wheel he could fit more passengers.  They apparently have also discovered others that have used cardboard for brake pads. The drivers pack in as many people as they can then drive a circuit picking up and dropping off passengers much like a bus.  However I couldn't figure out how you tell where they go?.  Anyway I managed to find a cab that I figured I could trust.     My driver spent the whole time texting while driving well above the speed limit.  As we approached our turn a lady in a car behind us did not check her speed.. BAM we were in a car accident.  It was a pretty interesting introduction to the city.  I made to the hotel shaken but not deterred.

My hosts in Joburg, Oilstone, were a fantastic group passionate about Umbraco and excited about the opportunities for the platform.  They chose to certify almost their entire organisation from administrators through to the company directors to ensure that as an organisation they could truly say they knew Umbraco.  After 4 days in the training room, Oilstone emerged equipped and excited about Umbraco 5 and ready to take on new projects.

oilstone
Level 2 students Jobrug

This was the VERY FIRST TIME the new version 5 course had been taught, and as a teacher, I personally thoroughly enjoyed teaching it.  Level 2 in particular was a lot of fun!  I'm pretty sure the attendees enjoyed it also, with many expressing how much they learnt and got out of it. 

Sa -1
Level 1 students hard at work

Next I was off to Cape Town which is a seaside city surrounded by stunning scenery. One of Cape Town's main trades is tourism, with activities such as cage diving with great white sharks, wine tours, whale watching, and the cable car to the top of Table Mountain. There is loads to do and unlike Joburg, it's generally a safe place to be. I had a day to myself so I decided to go check out Table Mountain which rises almost vertically over 1km about sea level. You travel to the top via a cable car which is fitted with a rotating floor allowing everyone on board to get a glimpse of the view. It is well worth it if you ever find yourself there.

Capetown
Cape Town from the summit of Table Mountain

The courses in Cape Town were hosted by Blue Grass Group who are massive advocates of Umbraco and who are actively promoting Umbraco with a view to build a community of Umbraco developers in Africa.  The course attendees were varied, from agencies to contractors. The courses were again a great success and all left positive and energised, pleased with what they had managed to achieve. 

I have left South Africa able to add not only three new companies to the growing list of Umbraco certified partners but in fact a whole new country. I enjoyed my time there and can truly say that Umbraco has a bright future in the region if the talent and passion that course attendees showed is anything to go by.  I am sure that we will be back again to run more courses in the near future.

I am excited about teaching this latest version 5 course in some of our more regular cities. Courses are quickly filling up with some now completely sold out.  If you would like further information about course locations, dates and availabilities please check out the course schedule. These courses are aweomse, and we'd love to see you soon.

Tuesday, March 13, 2012 by Per Ploug

Anyone who has been part of the Umbraco ecosystem for more than a couple of days, have most likely been searching for documentation or samples. It has not always been easy to find, but I do believe that the situation has improved dramatically with our community wiki, umbraco.tv and all the starter kits available.

Rebooting documentation

However, as we started on a clean slate with Umbraco 5, we also wanted to reboot documentation. We wanted to move away from the wiki model, and establish a more formalized flow for documentation, so we had a way to ensure structure, quality and uptodate code in the samples.

How do you solve that? Do you really want to build a workflow that can handle all this, or was there already something out there that we could leverage? Looking at what other open source projects have done in the past, a clever solution quickly presented itself.

On the bandwagon

Orchard  and  nuget  (both are great .net projects) are storing their documentation as markdown files on github.com, allowing contributions through pull requests, that results in documentation that is simple to browse, read and contribute to, and we don't have to reinvent anything

So last week, inspired by these fine projects, we setup a  Github repository, which will contain all future Umbraco 5 documentation. Documents are written using  Markdown , and is very straightforward to get started with.

The best thing, about this setup, is that Github and git now handles our workflow and approval flow. If you want to submit or edit anything, simply fork the project, do your edits and do a pull request. For simple edits, you can even edit directly on github.com, or use  Cloud9 which is an online editor that integrates nicely with Github and git.

On a regular basis, we will then pull the latest changes to  http://our.umbraco.org , index it for the site search and convert it into nicely formatted html, as it is a very simple format, we could at a later date also consider distributing documentation as .pdf or .mobi files

Be part of it

Work is progressing nicely, we have written the first batch of reference documents, and basic getting started guides. And best of all, we have received the first handful of pull requests from the community, for which we are very very grateful, keep them coming!

All frdays in March at the HQ are 100% dedicated to this project, so on friday (the 13th) you can join the umbraco room on jabbr and give us feedback, ask advice on how to get started, or just hang out.

The plan is to enable the the new documentation section Friday the 13th, it is still to be considered a preview / work in progress, but we want to share all the stuff that is already written, and inspire even more people to join in and contribute.

EDIT: As noticed, it is friday 16th, not 13th :) and also, we are in jabbr #umbraco room on all fridays so do stop by.

Also, we have a public trello board here that outlines the progress

Watch a video on how to contribute on github here

The documentation project on github

Monday, March 12, 2012 by Warren Buckley

As you all know Umbraco V5 has been released and this is year of 5 at the annual Umbraco conference CodeGarden as we dedicate the entire conference to V5. This will allow you to attend lots of great sessions on how to get up to speed with V5 and start building your next project on the most advanced version yet.

Here at the Umbraco HQ we are going to bring you a series of blog posts of confirmed sessions for this years conference and to get the ball rolling I thought I would start with my own session first :)

So without further-a-do I bring you:

My First V5 Website

I will take you through step by step how I created my first site in V5, The Estate Agent website, which I recently wrote for a tutorial for Umbraco V4 for the UK magazine .NET.

In detail you will learn how to create Property Editors, replicate /Base AJAX REST calls to work with JSON data and converting static HTML templates you have sliced from Photoshop into Dynamic templates using Razor.

Coming from a front end developer background I want to show you how easy it is to go from static HTML comps to a fully functioning website at the end of the session. This session is all about the hands on demos and will include as few slides as possible so we can get to the meat and work through building the HTML5 responsive Estate Agent Website.

So be prepared for a fast paced session that will turn you all into awesome V5 site builders!

 

A Little About Me

warren-buckleyOK a quick little a bit about me and my background. (Note: I hate writing these things)
Firstly my background is as a front end developer who stumbled across Umbraco 5 years ago and instantly fell in love with the CMS as it didn't destroy my beautiful markup and last year I was lucky enough to be asked to join the very talented team at the Umbraco HQ.

At the HQ I help to organise CodeGarden, if you ware there last year you may have spotted me running around like a mad man, looking a bit stressed. In addition to CodeGarden I help to evangelise and make it easier for people to get started with Umbraco, be it by recording TV episodes for Umbraco.TV (which by the way is having a nip & tuck to make it better) or writing articles for magazines such as .NET. My main goal is to make it easier for everyone to get up and running with Umbraco.

 

So that's it, you know a little more about me and you hopefully I should have whet your appetite on attending my session and remember the earlier you buy your CodeGarden ticket the cheaper it is, so don't delay buy yours today.

Keep an eye on this blog as we post more confirmed sessions and other great info about CodeGarden as time goes on.
Warren & The Umbraco HQ

Thursday, March 01, 2012 by Per Ploug

We have just completed our first round of Level 1 courses for Umbraco 5, on 3 continents, certifying more than 50 Level 1 developers in just 2 days. Within the next 2 days, the same thing will have happened with a batch of Level 2 developers, getting the total number of new V5 certifications to over 100.

By the end of March (27th-28th) we have a special round of courses, taking place in Aarhus and Copenhagen, Denmark, exclusively for developers who already know and love Umbraco  4, but want to get a quick introduction to how you take the key concepts of Umbraco 4, and transition that over to Umbraco 5.

It's a 2 day course, which will upgrade a developers Level 1 and Level 2 certifications to Umbraco 5, in half the time (and half the cost), compared to a normal certification.

So the first day we will cover the material from Level 1, pointing out where Umbraco 5 is different, and where there has been enhanced functionality. This is especially around templating, razor, document types and macros.

On the second day, we will dive into the many new APIs you have for working with documents, media and members and explore how common code tasks from V4 is now done in V5. This will be based on version 5.1 which is due to be released in March as well. So this course will cover the very latest improvements in Umbraco 5.

View Copenhagen Course Details  -  View Aarhus Course Details

After this initial round of Upgrade courses, we have also planned courses in Belgium, Australia, United Kingdom and North America. Please check the training calendar for dates.

View Training Schedule

There are very limited seating on these courses, and for now, these are the only confirmed courses that will cover a Umbraco 4 to Umbraco 5 transition, so book a seat while you can.

The upgrade course assumes that attendees have plenty of experience with Umbraco 4, and have a Level 2 certification already.

Tuesday, February 28, 2012 by Morten Christensen

In our efforts to make developing Umbraco based sites and packages more painless we are releasing a collection of NuGet packages and Visual Studio templates for Umbraco 5. So if you are using Visual Studio to develop Umbraco based sites, your life just got a little easier ;)

NuGet Packages

I hope you already know about NuGet, but if you don't here is a short description "NuGet is a free, open source developer focused package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development", and I would encourage you to check out the project page on Codeplex.

We have created 11 NuGet packages that can be used for different purposes, which I will try to describe below

Umbraco.5.0.310.0.nupkg
Umbraco.Framework.5.0.310.0.nupkg
Umbraco.Framework.Persistence.5.0.310.0.nupkg
Umbraco.Framework.Security.5.0.310.0.nupkg
Umbraco.Hive.5.0.310.0.nupkg
Umbraco.Hive.Providers.IO.5.0.310.0.nupkg
Umbraco.Hive.Providers.Membership.5.0.310.0.nupkg

Umbraco.Cms.Web.Editors.5.0.310.0.nupkg
Umbraco.Cms.Web.ParameterEditors.5.0.310.0.nupkg
Umbraco.Cms.Web.PropertyEditors.5.0.310.0.nupkg
Umbraco.Cms.Web.Trees.5.0.310.0.nupkg

As you might have guessed the main package is Umbraco.5.0.310.0.nupkg, which is used to setup an Umbraco 5 MVC3 based site in Visual Studio. So to install it you simply go to the Package Manager Console and write:
"Install-Package Umbraco" and boom! you have an Umbraco solution ready to roll (to install the package you can also right click on references in your project and search for the package in the NuGet feed). After installing the package you just need to configure the project to use IIS Express (Visual Studio 2010 SP1 required) or setup a new site in IIS and you should be ready to go.

A majority of the other packages are dependencies to the main Umbraco NuGet package, but can also be used independently. Say you want to create a Hive provider you would simply type "Install-Package Umbraco.Hive" and all the dependencies needed to create a custom Hive provider will be added to your project. The last four packages listed above are intended for developers who want to create a custom Editor, ParameterEditor, PropertyEditor and/or Tree with corresponding naming.

We hope that you will find these packages useful in the development of Umbraco 5 based sites or packages. All feedback is welcome.

Visual Studio templates

In addition to the NuGet packages and to help getting started even easier we have also created a collection of extensions for Visual Studio 2010 in the form of project templates. You can find these templates by going to the Visual Studio Gallery or searching for them in the Online Gallery from within Visual Studio -> Go to the Tools menu, click Extension Manager and in the select the Online Gallery pane in the dialog. Search for Umbraco 5 and you should get these six results:

ExtensionManager

Umbraco 5 MVC3 Project Template - A project for creating an Umbraco 5 based ASP.NET MVC3 web application
Umbraco 5 Hive Provider - A project template for creating an advanced Hive provider with Entity, Revision and Schema Repositories
Umbraco 5 Simple Hive Provider - A project template for creating a simple Hive provider
Umbraco 5 Parameter Editor - A project template for creating a custom Parameter Editor
Umbraco 5 Property Editor - A project template for creating a custom Property Editor
Umbraco 5 Tree - A project template for creating a custom Tree

You can choose to install the templates that you would find usable be it one of them or all of them.
All of the project templates uses the NuGet packages for dependencies, so the Umbraco 5 MVC3 project template would give you pretty much the same result as installing the Umbraco NuGet package, but since its installed as an extension you will have it in the list of projects when you select New -> Project in Visual Studio and you would get a complete solution setup with a few clicks.
The rest of the templates contains a base structure for creating a simple or advanced Hive provider, Parameter- and Property Editor and finally a Tree with a Menu Item.

The two variations of a Hive provider contains the classes needed to get up and running, and with the dependencies and settings wired up to give an overview of how everything is tied together.
The ParameterEditor, PropertyEditor and Tree templates also contains the base classes for a simple version of an Editor or Tree, which should be easy to extend if needed.

We hope that you will find these project templates useful and that they'll help you get started with Umbraco 5.
Again, we would love to get your feedback on these templates. If you have suggestions for additional templates that you would like to see feel free to drop us a comment.

If you would like to bend any of these predefined templates to your needs you can easily create you own - fork the source on bitbucket: https://bitbucket.org/sitereactor/umbraco-5-templates-for-visual-studio/src

Finally, if like the templates we have created please give them some stars on the Visual Studio Gallery

Thursday, February 09, 2012 by Alex Norcliffe

imageNow that Umbraco 5.0 is out there (with about 5000 downloads - thanks everyone!), we've worked on a small side-project to help us push forward over the coming months.

Our issue tracker for Umbraco 5, which we launched in December, is proving to be a popular hub of information and we're using it to not only keep a record of what issues people have found and fixed, but also which ones are being worked on, and their target release version.

Since this data is all in one place, Matt, Warren and I decided to build a really simple aggregation of some of that data in a form that we hope is easier to scan-read than going through YouTrack directly.

We've put up an early version at http://progress.umbraco.org/ for you to take a look at.

image

It's organised by "version" and takes information from the "Due in build" field inside YouTrack, and presents the assigned issues categorised by "Not Started", "In Progress" and "Completed" with a quick progress bar to give you an idea.

Not every issue in YouTrack is yet assigned to a particular release, and of course some issues will be left until future releases in the spirit of getting releases out early and often, so they might not show up on this page - but it's a great excuse to make your voice heard directly in YouTrack in the comments and votes for items that are important to you.

Next steps

We'd like to be able to use this information to help people gauge when an item is slated for inclusion in an upcoming update (be that a minor bug-fixing release, or one that contains new features).

Another big source of potential is that it could progress into a great tool that helps the many folks out there that would love to get involved on the Core team and start issuing pull requests, but aren't sure which items need focus.

This is preparing the ground for us to be able to put together some documentation not only for Umbraco 5 itself, but also some guides for contributing code to the core - and other pages like this that help people know what needs focus and when.

It's not just the Core that's open source

We think it'd be pretty cool to get the code for this up on a repository somewhere, and if people want to issue pull requests to add features or add a bit of style to even our Progress page, then awesome. We just need to jump through a couple of TeamCity hoops first, and I'll plug the code repository when that's done by updating this post and shouting out on Twitter.

Enjoy!

Friday, February 03, 2012 by Niels Hartvig

Yesterday we got informed that there' was an "Open Redirect Vulnerability" issue in Umbraco 4. We fixed it this morning. While we don't agree with the security consultants that it's a major issue, we do our best to fix reported security issues as fast as possible and have full disclosure.

Is this issue relevant for you?

The issue means that someone could make your editors click a link (in an e-mail or on a 3rd party website) pointing to the back office of your site, but then change where the editor would be redirected afterwards if they login. This will require that you run Umbraco with the back office fully open and that it's an active editor that logins into the site. For instance:
http://yoursite.com/umbraco/?redir=http://myevilsite.com

Once your editor have authenticated, they'd be redirected to the evil site. No data is shared with that evil site, but it could add a fake Umbraco login page and try to fake your editor to submit their credentials again. That way they could then jump to your website and login. All this would require a number of ifs and ifs, but the risk is real and may be important enough for you to upgrade…

How to upgrade

In a hurry, you can go download the 4.7.1.478 nightly which contains the fix. If you're running 4.7.1.1, all you need to do is to overwrite the "/bin/umbraco.dll" file. If running older versions, please refer to the upgrade guide.

4.7.1.2 next week

We'll be releasing an official 4.7.1.2 early next week.

Umbraco 5

This issue is present in Umbraco 5 as well and will be fixed for 5.0.1.

Questions?

Feel free to submit questions in the comments.

Tuesday, January 31, 2012 by Alex Norcliffe

534529467_f0ebb68dbbToday is a pretty big milestone for the Umbraco 5 team. It's the end of January 2012, we've had seven progressively stable preview builds over the past months, and now it's time to put a stake in the ground.

After a lot of hard work, late nights, and invaluable help from the community testing our many preview builds, we've hit our first production milestone.

Umbraco 5.0 RTM is on CodePlex!

Please do grab a copy - take two, if you like - it's free after all!

Thanks to you

imageThis is a release build and includes all of the fixes from the RC3 which we put out there last Wednesday. Since that time, we've already had almost 1000 downloads, which has made us incredibly proud. From our testing and that of the reported issues, it's ready for you to build your next live website.

Features

This is called "version 5 of Umbraco", but it's important to remember the history of the v5 project. We always intended to respect the vibrant culture and history of the Umbraco CMS as it has gone so far, and make a product that was on a fresh & rewritten technology stack but enabling the same common goals.

Our target for "5-point-0" out of the box is the most commonly used features of 4.7. We have a lot of features in 5.0 that enable you to go into production for the vast majority of site builds, and we have taken an approach of getting the core features done first - and stable.

We are now going to be iterating quickly with new features as the months progress, so that we reach feature parity with 4.7 and move beyond that quickly. So, yes it's like a "1.0" in some senses, but it already has a tonne of features that we think make it a great CMS.

  • Design and produce templates quickly using the excellent Razor syntax
  • Access your content in those templates using an intuitive dynamic API for both querying and walking up and down your content structure
  • Tailor content types with a variety of customisable fields, meaning you can focus on your content structure without a hard link to its layout
  • Use multiple templates with pages so you can easily adjust to your site's needs, do A/B testing, cater for mobile handsets, or generate RSS feeds
  • Have document types that inherit from one or more other types, making it simple to organise common fields for things like SEO that are shared across all of your articles
  • Create, preview and publish content in a naturally organised way using folders that can automatically create your site navigation, if you like
  • Create, preview and publish media and other types of assets
  • Store those assets on your server or in the cloud
  • Use a rich set of permissions to tailor backoffice access for your editing team
  • Plug in your own existing data in a way that Umbraco natively understands, rather than the only option being to migrate everything under Umbraco's control
  • Plug in your own backoffice editors, dashboards, and custom trees
  • Expose the underlying MVC stack for mixing in your own application, controllers and views with the content-managed portion
  • Share common pieces of functionality like Macros with your team
  • Share your own data providers, common templates, handy helpers and more using NuGet packages
  • Have those packages dynamically add configuration to a user's website so that uninstalling rolls back configuration seamlessly

There are many more, but you didn't come here for a list of bullet points - here's that download link again!

Documentation & help

In the next few weeks we'll be hard at work making tutorials, documentation and answering questions on the Our forums. Warren has already got off to a great start with some example Macros for common scenarios.

Here's to a bright future

5.0 is a great foundation for you to build on now, but we aren't stopping here. In the coming months we'll be focussing on adding great support for backoffice editing of your own membership data, and add some great APIs for reading and writing data to Hive in your own controllers and packages. We'll also be adding a few exotic things such as distributed caching and the like - if you have a feature idea, feel free to add it to our issue tracker and appeal for votes!

Performance

You might have seen the post I put up earlier this month about our approach to performance tuning as we approached RTM, and I also mentioned it in a recent uNews-letter. If not, or at least to put it here for posterity, here's a few of those figures.

I've been using the same content within each build of v5, and the same load script on my own development machine for each test run. It basically uses all 4 cores on my machine to both generate and serve the load from my local IIS.

Database & Build

Total time for 50 requests

Equivalent requests per second

SqlCe4    
RC1 44.514s 1.12
RC2 29.902s 1.67
Mid-Jan 18.839s 2.65
RC3 1.693s 29.53
RTM 0.228s 219.30
     
Sql Server 2008 R2    
RC1 25.487s 1.96
RC2 11.681s 4.28
Mid-Jan 5.665s 8.82
RC3 1.645s 30.39
RTM 0.134s 373.13

To put those final figures into context, I re-ran the test against RTM with 1000 requests instead, and obtained around 2900rps.

This seems a steady improvement followed by an astronomical leap, what could it be?

It's a technique commonly referred to as "micro-caching". By default, the base controller that serves Umbraco 5 RTM requests caches the page output for 1 second. This technique sits on top of the existing steady improvements in the codebase, and provides the icing on the cake to help if your websites get a high peak load. So it's a setting that you might not notice in daily use (unless you're hitting refresh .. a lot), but your server will thank you if you get a sudden influx of traffic.

You can of course tweak this if you prefer; the setting is in configuration, and we'll be enabling more settings and handy "set it and forget it" defaults like this as we add features in the future.

Happy downloading!

To those of you who have followed us along the way, and to those who have helped us code and test, a massive thank you. And to those who will be helping us in the future, too. Have fun with Umbraco 5, and please do let us know what you think.

Here's that download link one more time.

All the best

Team 5

Thursday, January 26, 2012 by Niels Hartvig

It's weird how something that seems to be perfect, can slowly turn into a monster. For me it often happens just as I dare to lean back in the chair, take a deep breath of satisfaction and pat my own back thinking, "nailed it". Maybe it's because you're exhausted, maybe because you get lazy or maybe it's because you start "choosing your battles". Prioritizing if you will. Maybe even maturing.

My number one pet - the Umbraco community - has certainly matured. What started out as a crazy dream by a selected few is now the daily life of thousands. And during the journey - which is seven years in a few weeks - we've all been doing a great job of adjusting. What seemed right in 2005 may not be that great in 2012!

Why all this rambling? Well, because it's time to make an adjustment of what I thought was an evergreen in the Umbraco community - the MVP program - our "Most Valued People". It was started in 2007 as a way to recognize the selected few who really made a difference. The crazy ones. It was easy then because there weren't more than a few to pick from and I knew what every one had done. Read every post, tried every package.

As time went on and things grew, I couldn't keep up. Who could? So in 2010 I moved the responsibility to nominate the MVPs to the collective intelligence of the community. Based on the 20 community members who had the most karma, the community voted and the top five were honored with the recognition of being an MVP. Over five years Casey, Doug, Jesper, Per, Thomas, Warren, Dirk, Morten, Paul, Tim, Lee, Richard, Darren, Matt, Sebastiaan and Jan wrote a little bit of Umbraco history as the Umbraco MVPs.

We've been blessed with this fantastic bunch of people who were crazy enough to believe in an unknown project like Umbraco, crazy enough to help because it came naturally to them and crazy enough to share their work for free because it felt right.

Because it felt right. Not because they searched for recognition. Not because they wanted a badge, an honor, an ego boost. But simply because it was the building blocks Umbraco is made of. And the MVPs that followed went in the footsteps of what became known as the Umbraco culture - we really became the friendly cms. These are our roots.

Our culture is fragile, yet it's our most important asset and what really sets us apart. Our culture is about helping and sharing because it's the most natural thing to do and because we can't help it. Not because we strive for recognition. Before that becomes the norm, I've decided to close the MVP program. It's not worth striving for. What is worth striving for - while much harder - is a community that helps each other despite not getting anything tangible in return.

So the MVPs of 2011 will be the last ones. There won't be any voting this year nor the years that follow. The MVP program is history and we'll only miss it because it never got devalued. Kudos to the MVPs who brought us here and created a culture that made recognition obsolete. What a community!

"The unselfish effort to bring cheer to others will be the beginning of a happier life for ourselves.", Helen Keller

Thursday, January 26, 2012 by Warren Buckley

Hi there, I wanted to tell you about my experiences of creating a package for the upcoming brand new version, version 5 of Umbraco. Which has been rewritten from the ground up to use ASP.NET MVC 3 and the Razor View Engine.

First, a quick bit about my background, just in case you don't already know me. My technical knowledge is more of a front-ender who loves to work with markup, CSS and JavaScript and implementing sites into Umbraco. When some of more technical guys at the Umbraco HQ such as Alex, Matt & Shannon who have been working hard building and architecting V5, talk to me about certain code. I have no clue what they are talking about and just politely smile and nod as if I understood everything they say, well sometimes I understand them :)

However I wanted to write this blog post and tell you how incredibly easy it is to build a custom property editor and put in a package for the rest of the community to use. If I can build a Property Editor as a package, then I am sure you can do too!

The Basics

Lets start off with some of the basics, such as a quick glossary of terms as in V5 a few terms have been changed:

Property Editor
A PropertyEditor is a new term in version 5 of Umbraco. In version 4 of Umbraco this was known as the render control for a DataType in Umbraco. So for example you could create multiple DataTypes in Umbraco that all use the Rich Text Editor render control or as it is now known as, PropertyEditor. So a DataType allows you to create variations of a PropertyEditor by changing the settings for that PropertyEditor.

Pre Values
This may be a new term to you, but Pre Values are the default settings and configurations that allow you to configure a PropertyEditor.

Plugin
A plugin is a single item that extends Umbraco. For example each one of these would be a separate plugin:

  • PropertyEditor
  • Tree
  • Context Menu Items

There are more plugin types available, but I won't cover that here in this post. I recommend you take a look through the list of resources at the bottom of the post to know what is possible.

Package
The term for a package has not really changed, but you may package up one or more plugins to create your package.

What Did I Make?

For my first package I decided to build a property editor that I could use in a new simple starter website kit I am attempting to make. I decided to build an RGBA colour picker that allows a content editor to save a colour to change in the front end of the website.

Below you can see the initial idea sketch I had for creating a very simple property editor, which involves four jQuery UI sliders that allow the user to control the individual values that make up a RGBA colour.

rgba-picker-sketch

When I was sketching the property editor out, I thought it would be a good idea to put in some safe guards for the property editor, as not all browsers support RGBA I decided it would be a good idea to have two fallbacks of RGB and then a Hexadecimal colour such as #FFF000

Before I even started writing any code specific to Umbraco. I wanted to create a static HTML page along with the JavaScript I needed to write in order to see how easy or hard it was to achieve my idea. I created my prototype fairly quickly and was happy for me to try and attempt this as a PropertyEditor.

rgba-prototype

And finally below is the end result of the property editor inside an Umbraco 5 install.

Disclaimer: The video above is using an old version of Umbraco 5 and does not reflect the speed of V5 RC3 and newer

How to Create a PropertyEditor

First things first you will need Visual Studio installed. If you don't have Visual Studio installed, you can download a simpler free version of Visual Studio called: Visual Web Developer 2010 Express.

Before we start doing any coding, if you are new to ASP.NET MVC then I highly recommend you learn the fundamentals as this will help you to understand a lot better what is going on. However with that said it is not required that you know ASP.NET MVC to work with Umbraco V5.

One video series I can highly recommend is this series from PluralSight - Introduction to ASP.NET MVC3  You can watch the entire series for free, as they have a 10 day trial but I must admit it converted me into a paid subscriber.

Now that we have got a basic understanding of MVC, lets get to work...
Firstly download a copy of the source code of my RGBA PropertyEditor from the Umbraco5Contrib project on CodePlex, as we will need this to copy some files and for you to use a guide.

  • Create a new project in Visual Studio of the project type Class Library using C#
  • Name your project RGBA.Umbraco.PropertyEditor
  • Create a folder called Resources This is where we will put our CSS and JavaScript needed for our RGBA PropertyEditor. Copy the JS, CSS and PNG from the source on CodePlex into this folder.
  • Next create a folder called Views This is where will store the Razor View file for our PropertyEditor, which allows us to write our HTML markup for. Copy the RGBAPickerEditor.cshtml file into this folder.
  • Next at the root of the project create three new class files called and it is important you keep to naming conventions here as this helps to wire everything up in MVC automatically.
    • RGBAPickerEditor.cs
    • RGBAPickerEditorModel.cs
    • RGBAPickerPreValueModel.cs

Before we continue I need to explain to you what Embedded Resources are. An embedded resource allows you to embed a file, such as a JavaScript file or a CSS file inside the binary DLL for the class project. So why this is useful for our plugin development is that we only have to deploy one DLL for our plugin to work as we can embedded any other items into that file.

The files that we need to have as embedded resources are:

  • Resources/RGBAPicker.css
  • Resources/RGBAPicker.js
  • Resources/transparent-grid.png
  • Views/RGBAPickerEditor.cshtml

To embed a resource you need to select the file from the Solution Explorer window (normally on the right hand side of the Visual Studio application) and from the properties window below find the row labelled Build Action and choose the option labelled Embedded Resource

embedded-resource

Now when you build your project all those items will be available inside the DLL.

Next you will need to reference the Umbraco V5 DLLs for your project, you can retrieve these from the source code of the project if needed.

Rather than explain what code you need to type in, let's paste in the example code from the source code of the RGBA Picker project we downloaded from CodePlex and then we can look at parts of the files below to dissect them and understand what is going on.

Note: That some of the snippets below have been shortened to save space in this post, I recommend you refer to the source code for the original files.

RGBAPickerEditor.cs
At the top of this file you can see we are saying that our RGBA property editor needs to use the files from the Resources folder. It's important to note this is the full namespace of the file. So the name of our project followed by the resources folder then the filename. The extra parameter for the CSS file of PerformSubstitution allows us to use a similar web resource url for a background image  of a DOM element.

Next you will also notice above the class is a PropertyEditor attribute, which we use to say this class is a PropertyEditor and then we pass in some parameters.

The first is a unique GUID string which is the ID of our package, make sure this is unique as if you were to copy this ID and someone else developed a plugin with the same GUID there would be a conflict. To create your own GUID you can either use the tools inside Visual Studio or simply visit this website - http://createguid.com

The second parameter is the alias of the property editor and the third parameter is the friendly name of the property editor, that will displayed in the dropdown list when creating a new data type.


//Using statements go here - see source code from original on Codeplex

[assembly: WebResource("RGBA.Umbraco.PropertyEditor.Resources.RGBAPicker.js", "application/x-javascript")]
[assembly: WebResource("RGBA.Umbraco.PropertyEditor.Resources.RGBAPicker.css", "text/css", PerformSubstitution = true)]
[assembly: WebResource("RGBA.Umbraco.PropertyEditor.Resources.transparent-grid.png", "image/png")]
 
namespace RGBA.Umbraco.PropertyEditor
{
    [PropertyEditor("04B0F923-E780-42DA-869E-32C118E12364", "RGBA.Umbraco.PropertyEditor", "RGBA Picker")]
    public class RGBAPickerEditor : PropertyEditor<RGBAPickerEditorModel, RGBAPickerPreValueModel>
    {
        public override RGBAPickerEditorModel CreateEditorModel(RGBAPickerPreValueModel preValues)
        {
            return new RGBAPickerEditorModel(preValues);
        }
 
        public override RGBAPickerPreValueModel CreatePreValueEditorModel()
        {
            return new RGBAPickerPreValueModel();
        }
    }
}

RGBAPickerEditorModel.cs
This class file is where we define the properties of our model. In this case the values we want to store when a content editor uses our property editor and that the same values can be used to be output them into our templates. Here you can see I have created seven properties to store the values

  • Red
  • Green
  • Blue
  • Alpha
  • Hex
  • RGB
  • RGBA

If you notice I am using ASP.NET MVC Data Annotations to allow me to put validation on these fields very simply and very quickly. Here you can see I use the required and range annotations. It's literally that simple to do validation in Umbraco with MVC.

Inside the RGBAPropertyEditorModel stub you can see that we set the default values for the property editor when no values have yet been saved as the prevalues from the configuration of the property editor.

Finally the GetSerializedValue stub allows me to concatenate the values from Red, Green, Blue and Alpha to populate the values for RGB and RGBA when the user saves the content node.

Also on the class you can see we have embedded the view which is the HTML output for our property editor, which will contain our sliders etc...


//Using statements go here - see source code from original on Codeplex
 
namespace RGBA.Umbraco.PropertyEditor
{
    [EmbeddedView("RGBA.Umbraco.PropertyEditor.Views.RGBAPickerEditor.cshtml", "RGBA.Umbraco.PropertyEditor")]
    public class RGBAPickerEditorModel : EditorModel<RGBAPickerPreValueModel>
    {
        public RGBAPickerEditorModel(RGBAPickerPreValueModel preValues) : base(preValues)
        {
            //Use prevalues as the default values until it's saved
            //Tip from Shannon's CG11 Plugin talk...
            Red     = preValues.initRed;
            Green   = preValues.initGreen;
            Blue    = preValues.initBlue;
            Alpha   = preValues.initAlpha;
        }
 
        [Range(0, 255, ErrorMessage = "Please select the Red value of 0 - 255")]
        [Required]
        [DisplayName("Red")]
        public int Red { get; set; }
 
        [Range(0, 255, ErrorMessage = "Please select the Red value of 0 - 255")]
        [Required]
        [DisplayName("Green")]
        public int Green { get; set; }
 
        [Range(0, 255, ErrorMessage = "Please select the Red value of 0 - 255")]
        [Required]
        [DisplayName("Blue")]
        public int Blue { get; set; }
 
        [Range(0, 100, ErrorMessage = "Please select the Alpha % of 0 - 100")]
        [Required]
        [DisplayName("Alpha")]
        public int Alpha { get; set; }
 
        [HiddenInput]
        public string Hex { get; set; }
 
        [HiddenInput(DisplayValue = false)]
        public string RGB { get; set; }
 
        [HiddenInput(DisplayValue = false)]
        public string RGBA { get; set; }
 
 
        public override IDictionary<string, object> GetSerializedValue()
        {
            //RGB
            RGB = string.Concat(Red, ",", Green, ",", Blue);
 
            //RGBA
            //Convert alpha to decimal
            var AlphaDecimal = Convert.ToDecimal(Alpha) / 100;
            RGBA = string.Concat(Red, ",", Green, ",", Blue, ",", AlphaDecimal);
            
            return base.GetSerializedValue();
        }
    }
}

RGBAPreValueModel.cs
This class file stores the PreValues properties, so these will be the items that you will be able to configure for your property editor, along with validation again.

A new annotion you can see is the AllowDocumentTypePropertyOverride which is very useful as this allows us to say this prevalue item can be configured on the data type but also when you add the data type to a document type, you are able to override the values used in the prevalues and change them. This stops you from creating a duplicate data type to only change one small prevalue.


//Using statements go here - see source code from original on Codeplex
 
namespace RGBA.Umbraco.PropertyEditor
{
    public class RGBAPickerPreValueModel : PreValueModel
    {
        [AllowDocumentTypePropertyOverride]
        [Range(0,255, ErrorMessage = "Please select the Red value of 0 - 255")]
        [Required]
        [DisplayName("Red")]
        public int initRed { get; set; }
 
        [AllowDocumentTypePropertyOverride]
        [Range(0, 255, ErrorMessage = "Please select the Red value of 0 - 255")]
        [Required]
        [DisplayName("Green")]
        public int initGreen { get; set; }
 
        [AllowDocumentTypePropertyOverride]
        [Range(0, 255, ErrorMessage = "Please select the Red value of 0 - 255")]
        [Required]
        [DisplayName("Blue")]
        public int initBlue { get; set; }
 
        [AllowDocumentTypePropertyOverride]
        [Range(0, 100, ErrorMessage = "Please select the Alpha % of 0 - 100")]
        [Required]
        [DisplayName("Alpha")]
        public int initAlpha { get; set; }
    }
}

Views/RGBAPickerEditor.cshtml
As you can see below the Razor view is heavily commented to explain what it is doing, but this is the HTML markup that will be generated for each RGBA Picker on a content node.


@inherits WebViewPage<RGBA.Umbraco.PropertyEditor.RGBAPickerEditorModel>

//Using statements go here - see source code from original on Codeplex
 
@{
    //Create a unique GUID so that this property has a unique ID for the <div>
    var uniqueID = Guid.NewGuid().ToString();
    var pickerID = "rgba-" + uniqueID; 
}
 
<script type="text/javascript">
    $(document).ready(function () {
 
        //Call the plugin with our options
        //Pass in the HTML ID's of the hidden input boxes
        //So our JS can update these boxes with the new values to save
        $('#@pickerID').rgbaPicker({
            redID:      '#@Html.IdFor(x => Model.Red)',
            blueID:     '#@Html.IdFor(x => Model.Blue)',
            greenID:    '#@Html.IdFor(x => Model.Green)',
            alphaID:    '#@Html.IdFor(x => Model.Alpha)',
            hexID:      '#@Html.IdFor(x => Model.Hex)'
        });
    });
</script>
 
 
@{
    //Here we need to say we want to use the CSS & JS file in our view
    Html
    .RequiresJsResource(typeof(RGBAPickerEditor), "RGBA.Umbraco.PropertyEditor.Resources.RGBAPicker.js")
    .RequiresCssResource(typeof(RGBAPickerEditor), "RGBA.Umbraco.PropertyEditor.Resources.RGBAPicker.css");
}
 
 
<!-- We give this div the unique pickerID -->
<div id="@pickerID" class="rgbaPicker">
    <div class="sliders">
        <div class="item">
            <!-- CSS classes used to easily target in JS to update -->
            <label>Red: <span class="redDisplay"></span></label>
            <div class="redSlider"></div>
            <!-- 
            Hidden textbox for the Red value we want to save.
            The value gets updated by the JS
             -->
            @Html.HiddenFor(x => Model.Red)
        </div>
 
        <div class="item">
            <!-- CSS classes used to easily target in JS to update -->
            <label>Green: <span class="greenDisplay"></span></label>
            <div class="greenSlider"></div>
            <!-- 
            Hidden textbox for the Green value we want to save.
            The value gets updated by the JS
             -->
            @Html.HiddenFor(x => Model.Green)
        </div>
 
        <div class="item">
            <!-- CSS classes used to easily target in JS to update -->
            <label>Blue: <span class="blueDisplay"></span></label>
            <div class="blueSlider"></div>
            <!-- 
            Hidden textbox for the Blue value we want to save.
            The value gets updated by the JS
             -->
            @Html.HiddenFor(x => Model.Blue)
        </div>
 
        <div class="item">
            <!-- CSS classes used to easily target in JS to update -->
            <label>Alpha: <span class="alphaDisplay"></span>%</label>
            <div class="alphaSlider"></div>
            <!-- 
            Hidden textbox for the Alpha value we want to save.
            The value gets updated by the JS
             -->
            @Html.HiddenFor(x => Model.Alpha)
        </div>
        
        <div>
            <!-- Disabled input for Hex # colour -->
            @Html.LabelFor(x => Model.Hex)
            @Html.TextBoxFor(x => Model.Hex, new { @class = "hex",  @readonly = "readonly" })
        </div>
    </div>
 
    <!-- Colour is previewed here -->
    <div class="livePreview"><span></span></div>
</div>

Resources/RGBAPicker.js
I won't copy and paste the source for this file here in the post, but if you take a look at the source code you will be able to figure out easily what is going on, as the code is heavily commented.

But in a nutshell the Javascript is doing the following, wiring up the jQuery UI slider divs and updating the value in the hidden textboxes and labels. In addition when the slider is moved the live preview <div> is getting updated to preview the colour along with a JS function being calculated to generate the hexadecimal colour as well. As long as the values in the hidden textboxes are updated with our new values then when the user presses save the values are saved back to Umbraco automatically. I have not had to worry about writing complex code to save the values back to the database, all of this hard work is done for me magically. Those V5 devs are a clever bunch, aren't they!

Now that we have all the parts in place inside our class project we can build our project and have it compile to a single DLL, as we are using embedded resources.

To test your property editor I was copying the DLL and placing it inside the bin folder of my Umbraco V5 website. Then I was able to go to the developer section and create a new data type with my RGBA Picker property editor and test it out on a document type.

Outputting the Values

So now that we have our property editor inside Umbraco and setup on a content type and tested out our property editor, we will want to output those values into a template. I liked the idea of overriding elements in my main CSS file to allow me to change colour of certain elements.

So in my template I have the following code that outputs the values from a property with the alias of sidebarColour


<style type="text/css">
    /* Overrides */
    aside 
    {
       /* Safe fallbacks to RGB then fallback to solid Hex */
        background-color: @DynamicModel.sidebarColour.Hex;
        background-color: rgb(@DynamicModel.sidebarColour.RGB);
        background-color: rgba(@DynamicModel.sidebarColour.RGBA);
    }
</style>

Once you are happy with the results, it's time to package it up so you can share it with the community and just generally re-use a component for other sites you will build with Umbraco.

How to Create the Package

Packages in Umbraco use a package format that is fairly new to ASP.NET which is called Nuget. But to create our property editor package for Umbraco, you will need to download the Nuget GUI tool.

Once you have it installed, open the program and choose the create a new package option. Next we need to edit the metadata for our package. You can do this by finding the option Edit Package Metadata in the application menu. Here you will need to supply a unique ID for the package, but for best practises I would recommend you use the same alias as you used for the property editor in RGBAPickerEditor.cs. However if the package contained more than one plugins this won't apply. Just choose a sensible name that would be unique, such as CompanyName.PluginName

Before we add our DLL to our package, we need to make one small modification to the project. If you open the file AssemblyInfo.cs found under the Properties folder. We need to add one line of code to the file along with adding a using statement. What this does, is let Umbraco know that this DLL contains plugins that need to be installed. If we don't do this Umbraco won't pick up our DLL, as when a package is installed the files do not get copied to the bin folder but instead get installed to /App_Plugins/Packages/PackageID


using Umbraco.Cms.Web;
[assembly: AssemblyContainsPlugins]

After adding in this change you will need to rebuild your project to ensure this change is made to the DLL.

The final step for creating our package, is to add the single DLL for our property editor that needs to be installed. If you drag the DLL into the middle column of the Nuget Package tool. You will be prompted with a dialog box. Make sure you say yes to add it to the lib folder.

nuget-dialog

Once your done, your nuget package should look something like below.

rgba-package-meta

Save the package to a convenient location and it's time to test out your package. I would recommend you test your package in a clean install of Umbraco 5, as if you use the same install as for your previous test. You will need to delete the property of the document type along with the data type and then finally remove the DLL from the Bin folder otherwise it will cause a conflict.

Volia one property editor package, now you can install it into an Umbraco 5 website to test out your work.

Resources

Here are some useful resources that I recommend you take a look through:

Shannon Deminick's Blog Post Series on Plugins
http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-1.aspx
http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-2-Routing.aspx
http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-3-Trees.aspx
http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-4-Editors.aspx
http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-5-Surface-Controllers.aspx

Shannon Deminick's CodeGarden 11 Session on Plugins Video
http://codegarden11.com/sessions/day-1/slot-two/get-plugged-in-to-umbraco-jupiter.aspx

The Umbraco V5 Contrib Project
http://umbraco5contrib.codeplex.com

Work in Progress: Estate Agent Starter Website
https://bitbucket.org/warrenbuckley/estate-agents-starter-site

The End Result

So what have we covered? Well I have shown you from initial sketch all the way upto a working PropertyEditor package for Umbraco 5 and how easy it is to do. Remember if I can do it then certainly you clever lot can!

You can download the RGBA Property Editor from our.umbraco.org along with another property editor I made which was the Bing Maps property editor.

http://our.umbraco.org/projects/backoffice-extensions/rgba-property-editor
http://our.umbraco.org/projects/backoffice-extensions/bing-maps-property-editor

Got any questions, just leave a comment and I will get back to you.

Cheers,
Warren - The friendly front end dev!

Monday, January 23, 2012 by Morten Christensen

The idea with this post is to give a basic understanding of the persistence model in Umbraco v5 with a primary focus on the objects, which I expect are the ones you as an Umbraco developer will need to be familiar with. This post isn't a full blown deep dive into persistence in Umbraco v5, but it will  help you understand the inner workings of dealing with persistence.
Please note that this is primarily intended for developers, who wants to familiarize themselves with the low level API in v5. A higher level API is in the works, which should make it simple for all types of developers (frontend, backend etc.) doing tasks like creating/updating/deleting a content item, querying and publishing.

In Umbraco v4 there were a lot of different concepts like a Document, a Node, a CMSNode and Media.  When dealing with the API  you would use Document for programmatically creating a content item, but after the item was published you would treat it as a Node. So basically you would use different approaches for dealing with data depending on the type of item (i.e., content, media, document type, etc.) you were working with in the Umbraco backoffice. In v5 its all about the TypedEntity object. All the different types of items in the Umbraco backoffice are based on the TypedEntity object, which makes the API much simpler to work with.

Lets dive a little deeper into the TypedEntity object and explore some of the related objects, which you need to know about.
Basically the TypedEntity is the object you want to store in your persisted storage and what you request when you want to retrieve data and display it on your site or in the backoffice.
A TypedEntity consists of an EntitySchema, a TypedAttributeCollection, a list of AttributeGroup objects and a RelationProxyCollection.
The EntitySchema is used to describe the data that you want your TypedEntity to store - hence the word schema.
The TypedAttributeCollection is, as the name implies, a collection of TypedAttribute objects. A TypedAttribute contains the actual value(s), which you want your TypedEntity to store.
An AttributeGroup is a group to which certain types of attributes belong. You can think of a 'group of attributes' as being similar to a 'tab with properties'. The groups which are available for this TypedEntity is based on the AttributeDefinitions assigned to the EntitySchema.
The RelationProxyCollection is an enumerable sequence of RelationProxy objects, which I won't go into details about. For now you just need to know that it contains proxy classes for Relations.

So now we know a little bit about what the TypedEntity looks like. The EntitySchema is also fairly important to learn about as it contains the schema for our TypedEntity, so before putting all of these objects into context I'll outline the EntitySchema object.
An EntitySchema consists of a SchemaType, AttributeTypes, AttributeDefinitions, AttributeGroups, XmlConfiguration and a RelationProxyCollection.
SchemaType is simply a string which represents which type of schema this EntitySchema is. As an example this could be "file", "system", "content", "user" etc.
AttributeTypes is a collection of AttributeType objects, which describes the type of attribute we are dealing with. So this is the schema for our TypedAttribute, which we use to describe how an attribute is stored.
AttributeDefinitions is a collection of AttributeDefinition objects, which define each attribute that is added to a schema. An AttributeDefinition stores an Alias, Name, AttributeType and AttributeGroup.
The AttributeGroups collection on the EntitySchema is Get-only, which returns an EntityCollection with all the groups defined in the AttributeDefinitions.
XmlConfiguration is a XDocument which is used to store the selected icon / thumbnail and description for a document type.
The RelationProxyCollection is similar to that found on the TypedEntity except here we find proxies for the EntitySchema's relations.

Lets try to put the above into the context of a File object, which we already have in the source of Umbraco v5. The File object is a strongly typed object based on TypedEntity with its own EntitySchema (FileSchema), which is used to describe the properties on our File object.

This is what the FileSchema object looks like:

namespace Umbraco.Framework.Persistence.Model.IO
{
    public class FileSchema : EntitySchema  {
        public FileSchema()
        {
            SchemaType = FixedSchemaTypes.File;
            AttributeDefinitions.Add(new AttributeDefinition  {
                Alias = "name",
                Name = "Name",
                AttributeType = AttributeTypeRegistry.Current.GetAttributeType(StringAttributeType.AliasValue),
                AttributeGroup = FixedGroupDefinitions.GeneralGroup
            });

            AttributeDefinitions.Add(new AttributeDefinition  {
                Alias = "rootedPath",
                Name = "RootedPath",
                AttributeType = AttributeTypeRegistry.Current.GetAttributeType(StringAttributeType.AliasValue),
                AttributeGroup = FixedGroupDefinitions.GeneralGroup
            });

            AttributeDefinitions.Add(new AttributeDefinition  {
                Alias = "rootRelativePath",
                Name = "Root Relative Path",
                AttributeType = AttributeTypeRegistry.Current.GetAttributeType(StringAttributeType.AliasValue),
                AttributeGroup = FixedGroupDefinitions.GeneralGroup
            });

            AttributeDefinitions.Add(new AttributeDefinition  {
                Alias = "publicUrl",
                Name = "Public URL",
                AttributeType = AttributeTypeRegistry.Current.GetAttributeType(StringAttributeType.AliasValue),
                AttributeGroup = FixedGroupDefinitions.GeneralGroup
            });

            AttributeDefinitions.Add(new AttributeDefinition  {
                Alias = "isContainer",
                Name = "Is Container",
                AttributeType = AttributeTypeRegistry.Current.GetAttributeType(IntegerAttributeType.AliasValue),
                AttributeGroup = FixedGroupDefinitions.GeneralGroup
            });

            AttributeDefinitions.Add(new AttributeDefinition  {
                Alias = "contentBytes",
                Name = "Content Bytes",
                AttributeType = new BytesAttributeType(),
                AttributeGroup = FixedGroupDefinitions.GeneralGroup
            });
        }
    }
}


The schema has five AttributeDefinitions, which corresponds to the properties on the File object, which is shown below.
Each definition is put in the GeneralGroup AttributeGroup and assigned a Name and Alias, which is used to put values in the TypedAttributeCollection of the TypedEntity. Each AttributeType in the AttributeDefinitions are strings, so the standard StringAttributeType is used.
And this is what the File object looks like:

namespace Umbraco.Framework.Persistence.Model.IO
{
    public class File : TypedEntity  {
        public File()
        {
            this.SetupFromSchema<FileSchema>();
            IsContainer = false;
        }

        public File(TypedEntity fromEntity)
        {
            this.SetupFromEntity(fromEntity);

        }

        public File(HiveId id)
            : this()
        {
            Id = id;
        }

        public string Name
        {
            get { return (string)Attributes["name"].DynamicValue; }
            set  {                
                if (!RootedPath.IsNullOrWhiteSpace() && Path.GetFileName(RootedPath) != value)
                {
  var rootLocation = RootedPath.Substring(0, RootedPath.LastIndexOf(Name));
                    Attributes["rootedPath"].DynamicValue = Path.Combine(rootLocation, value);
                }
                Attributes["name"].DynamicValue = value;
            }
        }

        public bool IsContainer
        {
            get { return (bool)Attributes["isContainer"].DynamicValue; }
            set { Attributes["isContainer"].DynamicValue = value; }
        }

        public string RootedPath
        {
            get { return (string)Attributes["rootedPath"].DynamicValue; }
            set  {
                Attributes["rootedPath"].DynamicValue = value;
  if (Name != Path.GetFileName(value))
                {
                    Attributes["name"].DynamicValue = Path.GetFileName(value);    
                }
            }
        }

        public string RootRelativePath
        {
            get { return (string)Attributes["rootRelativePath"].DynamicValue; }
            set { Attributes["rootRelativePath"].DynamicValue = value; }
        }

        public string PublicUrl
        {
            get { return (string)Attributes["publicUrl"].DynamicValue; }
            set { Attributes["publicUrl"].DynamicValue = value; }
        }

        public byte[] ContentBytes
        {
            get  {
                var content = (byte[])Attributes["contentBytes"].DynamicValue;
                if (content == null)
                {
                    if (LazyContentStream == null)
                        return new byte[0];  using (var streamValue = LazyContentStream.Value)
                    {
                        ContentBytes = content = streamValue.ReadAllBytes();
                    }
                }
                return content;
            }
            set  {
                if (IsContainer)
                    throw new InvalidOperationException(
                        string.Format(
                            "Entity '{0}' is a container and hence cannot have content assigned to it. To set content ensure that the IsContainer property is false.",
                            Id));

                Attributes["contentBytes"].DynamicValue = value;
            }
        }

  public Lazy<Stream> LazyContentStream { get; set; }
    }
}

As the code shows we have three options for constructing the File object. All of them use the FileSchema which has been defined for this type of entity.
The interesting part of the File is how we get and set the various properties. Notice that we are using the underlying TypedAttributeCollection to get and set the actual values of the properties. You might also want to note that because we are using dynamic we can add more than one value, which in turn has to correspond with the defined AttributeType.

This is how we save a File object using Unit of Work and Hive when an image is being uploaded in the backoffice:

private HiveId StoreFile(HttpPostedFileBase file)
{
    var hive = BackOfficeRequestContext.Application.Hive.GetWriter<IFileStore>(new Uri("storage://file-uploader"));

    var mediaId = Guid.NewGuid();   

    using (var uow = hive.Create())
    {
        var f = new File  {
            RootedPath = mediaId.ToString("N") + "/" + file.FileName
        };
        var stream = file.InputStream;
        if (stream.CanRead && stream.CanSeek)
        {
            stream.Seek(0, SeekOrigin.Begin);
            using (var mem = new MemoryStream())
            {
                stream.CopyTo(mem);
                f.ContentBytes = mem.ToArray();
            }
        }

        uow.Repositories.AddOrUpdate(f);
                
        uow.Complete();

        return f.Id;
    }
}


I hope you are getting the broader picture here, because with a schema defined we can store any object that derive from TypedEntity as the schema is telling Hive how the data should be stored and retrieved.

Summary description of the concepts/classes involved:
TypedEntity - Contains a key value collection of attributes, ea. a collection of TypedAttribute objects. The TypedEntity also contains the schema that defines it.
TypedAttribute - Contains the actual value(s) and conforms to an AttributeDefinition.
EntitySchema - Definition of a schema used by a TypedEntity.
AttributeDefinition - Definition of the attribute ea. Alias, Name, AttributeType and AttributeGroup.
AttributeGroup - The group which the attribute belongs to.
AttributeType -The type of the attribute, i.e. string, integer, bool, text.
- A side note: An AttributeType has a SerializationType, which implements IAttributeSerializationDefinition. This tells Hive the format the data is stored in (String, LongString, SmallInt, LargeInt, Decimal, Date, Guid, Boolean, ByteArray).

There are a lot of predefined AttributeType(s) in Umbraco v5, which you can re-use. They can be found in the Umbraco.Framework.Persistence project under the following folder \Model\Constants\AttributeTypes.

If you want to see more examples of defining your own AttributeType, AttributeDefinition and AttributeGroup I recommend that you take a look at the source code of the WordPress Hive provider, which Alex created for a presentation in Sweden last year: https://bitbucket.org/boxbinary/hive-wordpress-provider/src/bb3055fd06ad/Umbraco.Hive.Providers.Wordpress/Schema/Model

I will do a follow post about repositories in v5, which should give some insight into the various repositories we work with when we want to persist a TypedEntity, EntitySchema etc. in Umbraco v5.

Wednesday, January 11, 2012 by Alex Norcliffe

imageBefore Christmas, we put up RC 1 - our first build of the "last mile to 5.0" process, so to speak. That was just under three weeks ago, meaning about 1.5 weeks of "official" working time for many, but the community have already put in a brilliant effort and we've got a lot of useful issues resolved.

To get the latest fixes in the hands of people who might not be following the code repository or using nightlies, we thought we'd put up an RC 2.

There's a fairly long list of fixes / changes that were possible in time for the RC 2. The list is available on our new issue tracker, YouTrack, which so far is proving very popular; we've had a lot of really useful reports - please keep them coming. There's even a great pull request in there too, not bad for the first week in January!

You can download the build from the CodePlex page here.

Upgrading from RC 1:

  1. Backup your existing site (of course!) and for good measure, keep a copy of your Hive connection string config at /App_Data/Umbraco/HiveConfig/web.config
  2. Backup any other config files in /App_Data/Umbraco/Config to which you've made any changes (Hive, Trees, etc), as well as the root Web.config file
  3. Copy over the /Bin, /Areas and /App_Plugins/Core folders and the root Web.config file from the downloaded zip
  4. Restore the config files you backed up

If you have been developing packages or plugins, and you encounter any type-load issues, please flush your temporary ASP.NET files and let us know on the issue tracker.

We'll continue to work hard to get critical bugs and performance nailed for our first production release of Umbraco 5.0 in the next few weeks. Thanks again to all who are helping us get there!

Wednesday, January 04, 2012 by Alex Norcliffe

imageJust before Christmas we released the latest pre-production build of Umbraco 5 for testing, and so far we've had about 800 downloads and great feedback.

Great feedback is not necessarily "Guys, everything is awesome and works". While nice star-ratings are always lovely (thanks!), truly 'great' feedback is valuable info about what is broken: the reports of quirks, bugs and any user confusion that show us areas that we've missed and can fix in time for the first production-ready build.

And this is why we're really happy: it's been two weeks since we put that release out just before Christmas, and over the holiday period we've already had around 40 users register at our new v5 issue tracker and a great bunch of useful issues reported that we're already working hard to eradicate.

You have to notice a flaw in something in order to fix it, and we've been delighted to accept pull requests submitted over the holidays from dedicated folks that prove how awesome the Umbraco community is.

imageOne thing which rightly has cropped up, and I consider it a valid issue worth tracking just like anything else, is the speed of running a website on these pre-production v5 builds. If you've taken the builds for a spin, especially on a machine using a spindle-based hard drive and using SqlCe, you'll have noticed it's very slow.

I thought I'd put up a quick post reassuring you that with the testing builds so far, this is partly by design, and explain how it'll receive focus this month as we prep for a production-ready 5.0 at the end of Jan.

If you're not into the technical details, the primary point is that this month is our planned moment when we make v5 shiny, speedy and ready.

Make it work, then make it work good, then make it work fast

Basically, I can sum it up pretty quick: there's no caching in there yet. Job done, right? Blogpost over.

Well, that's actually just a small part of the story.

When putting out these pre-release builds, we've had to strike a balance between features and performance precisely to help the bug-reporting process. And so, the preview builds have run slow, but the bugs that have cropped up have been due to real code rather than caching, and can be reproduced - and fixed - much easier.

Imagine you're good with tools, and you're building a family car from a kit. You only have the engine fitted to the chassis and some wheels at the moment, and it goes OK but it's a bit slow already.

So, given you want the car to be fast when it's finished, do you spend weeks optimising the engine now, maybe replacing heavier suspension with the latest trendy lightweight component, even though your beloved creation doesn't yet have any doors? Or do you carry on, and take quantitative measurements later when you are approaching an understanding of the whole car and how it behaves when everything is fitted - and it's heavier?

Well, the automotive engineers amongst us will point out I know nothing about how to build a car :) But when it comes to software, it pays to wait. As I've mentioned before, premature optimisation is a big killer on complex projects. We could have piled hundreds of hours into shaving 5kg off the weight of the car's suspension, only to find out it's actually now top-heavy and rolls in corners. Likewise, a few days could have been spent optimising a v5 database query we thought would be crucial, but it turns out the query only gets run once a month. It pays dividends time and time again to wait until your architecture is at least 80% feature-complete before you can begin to gauge where to put your effort and resources into optimising it in daily use.

Making it production-ready

Starting this week, we've split effort into two tracks to take us to our first production release: resolving critical logged issues, and performance profiling. The below is basically my primary focus for the rest of this month:

Code profiling

Profilers are a fantastic weapon in the developer's armoury. They allow you to get quantitative data about the performance of individual portions of your application, without resorting to tons of trace logging and guesswork.

For .NET code, I like dotTrace from JetBrains, because it allows you to profile unit tests straight from Visual Studio so you can get at performance data for known, repeatable units of work.

Here, I've artificially slowed down a unit test and used the product's "Tracing" technique which gives accurate measurements of how long each of my .NET methods takes. This measuring slows down my application, but it does so uniformly, so as long as you deal in percentage improvements between tests, you're good to go. Below you can see this test exercises a chain of methods involved in finding an entity in Hive when given a route. Basically, one of the first things to happen when a request for a URL comes in:

image

The level of detail is fantastic for forensic investigations and finding those hotspots.

This is the type of testing I'm doing at the moment and for the rest of this month: looking at common methods, seeing where the bottlenecks are, and working on improving them. You can see here I've reduced the GetEntityByPath method to 10% of its original execution time, and I can measure the impact on the rest of the stack with dotTrace. If this method is used in many places (and it is), the benefits go across the board.

Code itself is not the only thing to blame: sometimes you have a lot of database queries, or they are poorly optimised. Since the default Hive provider in Umbraco 5 uses NHibernate, I can use the excellent NHProf from Hibernating Rhinos to get insight into exactly what queries resulted from a test:

image

The unit test I've been focussing on today does a lot of work all in one NHibernate "session", and that's really not a problem as I'm in a contrived testing scenario, but it's useful as I can repeat that same scenario and compare the results each time. The above SQL that is selected in the screenshot is 1 query returning 1 row taking <1ms. Prior to today, that same operation was 5 queries, 158 rows and 252ms.

It's a fairly well-worn path from here-on out. We have unit tests that we know represent the status quo of the build out there receiving feedback from the community, and we have a track that is busy working on those bugs already. Matt managed to fix almost 10 in his first day back, which is awesome.

In the meantime this month, we're working on improving the code itself so that we can make smarter optimisations.

My aim as always is 200ms response times for an average page, before adding the catch-all page-level output caching.

A quick note about caching

Code that works well rather than relying on caching is easier to maintain, easier to test, easier to predict, and easier to fix. But that's not to say caching doesn't have a place at all. There is very little caching in the codebase; it's something I prefer to add at the last stage, but it does still require attention. Caching which URL resolves to which piece of content, for example, requires us to cleverly invalidate the cache if any of the content's parents change. But we've put the hooks in place for this type of eventing and this is getting wired-up at the moment. And finally, output caching of common website pages will be enabled in configuration.

 

Core features for a 5-point-0 release are pretty much there, they primarily just need polishing and speeding-up. We'll be putting out another RC release containing fixes and the first half of the performance improvements next week, so you'll get a version that is more fun to play with. In the meantime, thanks again for all the testing and reporting that you are doing - it's absolutely brilliant so far. If you would like to help out, we always love pull requests, and if like me you get a weird nerdy kick out of code profiling please do get in touch!