DD4T on tour – Our first developer training

Last week saw the premiere of Trivident’s new 2-day DD4T developer training.  I traveled to the United Kingdom to deliver it to a group of very knowledgeable ASP.NET MVC developers with little or no Tridion skills.

Once again it was proven that DD4T successfully closes the gap between the world of Tridion and the world of web application developers. By the end of day 2, they were already quite productive. So much so, in fact, that I ran out of material and had to improvise a bit.

The training environment was based on Tridion 2013 SP1 and ASP.NET MVC 5. For me the first time to try that combination, but it ran smoothly right away.

We hope to be delivering this training more often.

Debugging DD4T with IIS Express

I’ve always thought the only way to debug a DD4T application is to run it on IIS. This is annoying, because the default option that Visual Studio offers is IIS Express or the local development server. So every time I set up a new DD4T project, I created a site in IIS, and changed the project properties accordingly. I must have wasted hours of my life doing this!

The reason why I went through all that trouble, is that it was the only way to run with Tridion’s 64-bit DLLs. Or SO I THOUGHT!

Turns out I have been wrong all along. You can run IIS Express in 64-bit mode by simply changing one registry setting.

  • Open regedit and navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\WebProjects
  • Modify or create theREG_DWORD value named “Use64BitIISExpress”
  • Change the value to 1

Now you can run your DD4T applications on your IIS Express, which is the default for Visual Studio 2013. Saves a lot of hassle.

Thanks a lot to Robert Bernstein (http://blogs.msdn.com/b/rob/archive/2013/11/14/debugging-vs2013-websites-using-64-bit-iis-express.aspx).

 

ASP.NET MVC 5 support for DD4T

It has been around for a while, but since today the ASP.NET MVC 5 version of DD4T is available through NuGet. The name of the package is DD4T-MVC5.

All you need to do is create an MVC 5 application. This is easy with Visual Studio 2013, but is also possible with Visual Studio 2012.

Once you have created the web application, go to the package manager (Tools\Nuget Package Manager\Package Manager Console) and type:

Install-Package DD4T-MVC5

That’s it. Happy coding.

SDL Tridion User Group Benelux meeting at Trivident

With over 40 persons attending, the SDL Tridion User Group Benelux meeting at Trivident in Amsterdam was a huge success. Speakers from SDL and Trivident presented on the roadmap for DD4T, SDL Tridion 2015, SDL Media Manager and the recently released Tridion reference implementation.

Available for download is the presentation by Trivident’s Quirijn Slings on the roadmap for the popular DD4T framework, including the features and planning for release 2.0 of DD4T.

DD4T Roadmap (Quirijn Slings, PDF, approx. 400 KB)

Will Price talked about the SDL Tridion Reference Implementation:

Tridion Reference Implementation (Prezi, opens in new window)

Permission to publish

Tridion’s authorization model makes a useful distinction between what you are allowed to do (called ‘rights’) and where you are allowed to do it (‘permissions’). Let’s take a simple example, or rather two: John and Jane.

John works in public relations and handles the press area of the web site. Jane is a member of the web content management team. She is responsible for the rest of the site.

The authorization is set up so that John can create content and pages in his own section. He is also able to publish pages. He has no access to the rest of the site, except for read-only access to the root structure group and building blocks folders, because otherwise he wouldn’t be able to navigate to his own section.

Jane does not have access to the press area at all, but she can create content and pages in the rest of the site.

John and Jane have the same rights, but very different permissions.

This is a fairly typical situation, and it first glance it looks like there is no problem at all. John can do his thing inside the press area, but is unable to mess up the rest of the site because he has at most read-only access there. He couldn’t wreak havoc even if he wanted to, could he?

————————————————————————————————————

Well, yes he could. There is one thing John could do which would make Jane (and the rest of her team) very unhappy: he could unpublish the home page! This is the result of a small flaw in Tridion’s authorization model: publishing in Tridion is a right, while it should have been a permission!

There is no easy way around this, really. Someone with publishing rights, can exercise this right wherever he/she has read permission. We can revoke his publishing rights, of course, but since publishing is John’s job that is not really a solution. We cannot revoke his read permissions on the root structure group either, since that would block his access to his own ‘Press’ area, which lives inside the root structure group.

There are some work-arounds, none of them very good in my mind:

1. Set up workflow for Press content and let an automated activity publish the page.
This works, but it introduces workflow, which is like shooting with a bazooka at a mosquito.

2. Set up a separate publication for Press. This works because rights can be limited to certain publications (not structure groups). But again, it is a high-impact fix for a relatively simple problem.

I am busy working out a more elegant solution, but since this is such a common situation, I’m sure it exists already, somewhere out there. Tips anyone?