New Sitecore Meetup in Cluj-Napoca, Romania

We hade a quite busy year, and we are gonna finish it with a new Sitecore Meetup in Cluj-Napoca, Romania

The meetup is in the evening of 22nd November 2018 and the the agenda is:

  • What’s new in Sitecore 9.1 – Sebastian Tecsi, Sitecore MVP
  • Sitecore xConnect & Marketing Automation – Dani Mocan, Sitecore MVP
  • Tips and Tricks in Commerce 9 – Vlad Iobagiu, Ex Sitecorean, Ex Sitecore MVP

You can RSVP and read more details in here.

See you there.

How to publish to delete items in Sitecore

Stelio made a post on how to handle the deletion of items across Sitecore databases. And I remembered that I wrote code for this situation in another way.

The way that I’ve approached this is to extend the Item Delete event so I can publish deleted item by publishing the parent item.

Basically, I detect the parent of the item that is currently deleted by an editor, and I publish that parent item on each target database that we have on our Sitecore installation.

The code, with comments for this here:

And the config changes needed:

Sitecore Symposium 2018 highlights

Hi there,

One month from Sitecore Symposium 2018 has passed already, and I said that I should write a 1 month highlights post. That also for the fact that I’ve traveled a bit in the past month, and had to catch up a bit with all the articles/post about the Symposium.

So this is yet another post about the Sitecore Symposium 2018, the conference that was held in Orlando, USA. This is my 4th Symposium that I participated, and in fact I have participated the first one too that was held in Copenhagen, Denmark in 2010.

The conference was a really great experience for me.

George has a post on his blog about Symposium 2018 roundup links in here.

Also Jeff, made a post where he gather session recordings and slides.

But in fact, in the meanwhile Sitecore published all sessions in here here, so if participated to the conference you have access to download them. To help, Bas made a script to download all presentations at once. And I made an adjustment so that the files are saved on the disk using the original filename, not an id. Script is here.

Here is a collection on blogs posts, articles, sessions, repos that I found in the past month about Sitecore Symposium 2018.

I’ve tried to group them a bit, so here you go.

Recap, articles about the conference itself:

Posts specifically about Sitecore 9.1 that was announced at the conference.

Sessions slides/articles, repos:

I know that are quite few articles, and I hope you find them interesting, at least some of them.

I will let you with this An amazing thing happened at Symposium.

I become Sitecore 9 certified at Sitecore MVP Summit 2018

Hi there,

Well, I was a bit stressed about this certification. I have not worked that much in Sitecore lately and I did not really prepared for this exam. I participated at Sitecore MVP Summit 2018 and up until the evening before the day the exam was scheduled I was not 100% that I really want to take the exam, but made my mind and in the morning at 8:00 I was present in the room to take the exam, even that I was bit tired.

After signing up at the location – took a bit to do it – the exam started. There were 50 questions, with a countdown of 1h and 30 minutes, but apparently the room was booked for something else at 09:00, so I had a bit more than 1 minute for each question. That went quite well and I’ve passed the exam and now I am a Sitecore® 9.0 Certified Platform Associate Developer.

A study guide for the exam can be found here: https://sitecore.freshdesk.com/support/solutions/articles/16000067853-sitecore-certified-platform-associate-developer-exam-study-guide-

Sitecore-cert-details.jpg

 

Do not change global.asax in Sitecore 9!

This is a rule of thumb in Sitecore 9: Do not change global.asax. There are other ways to run a piece of code at the start of the Sitecore 9.

Until now I have used 2 ways in Sitecore 9 to run a piece of code at the start of the solution. In similar manner you can do it in Sitecore 8 as well.

#1 Using Sitecore Owin middleware.

With release of Sitecore 9, Sitecore decided to embed a OWIN module and with that there are a couple of pipelines that can be used.

What’s OWIN Middleware?

It stands for Open Web Interface for .Net. It is a new standardized interface between web servers and applications. It stands as a middleware to be used in a pipeline to handle requests and associated responses. OWIN provides a decoupling layer that allows two frameworks with disparate object models to be used together.

Sitecore 9 has implemented the OWIN Pipeline directly into the core platform and with that we can integrate external identity provider logins and no only.

You can initialize the OWIN configuration like this:

And the code:

A good usage example is implemented in the module Sitecore SignalR.

Then Sitecore already implemented Federation Authentication in Sitecore 9 using OWIN middleware and you can extend it for your needs. Bas wrote first article on how to Enable federated authentication and configure Auth0 as an identity provider in Sitecore 9.0.

Also, you can write your own implementation using OWIN, but will give you a proper example in my next article that is touching this topic and how to have custom authentication for your Sitecore Web Api.

In Sitecore 8 you can use module Sitecore-Owin to add OWIN support to your solution. Works quite well, as I have already used it to customize the Sitecore SignalR module.

#2 Using Initialize Pipeline in Sitecore.

This functionality was also available in Sitecore 8, in case you were not aware of that. This is used to start some functionality at Sitecore application start-up.

In a clean web application it possible to use global.asax, but Sitecore decided some time ago (not sure with what version exactly) to make globas.asax private. Instead you need to use the initialize pipeline. The initialize pipeline is started at the application start. Initialize pipeline is defined in Sitecore.config.
In order to use initialize pipeline it’s needed to created a new include config file with the new processor.

And the code:

Anders Laub  also has an article about this subject on this blog article Global.asax events and Sitecore pipelines.

One thing that this initialize pipeline can be used is to implement dependency injection into your solution One way to implement Dependency Injection for Sitecore Habitat.

Or you can with this functionality to register a Web Api Route using RouteTable from System.Web.Routing. Sitecore Habitat is using this functionality to register the routes like in this example:

Hope all this information is going to help you into your implementations.