Skip to content
August 30, 2017 / kiranpatils

Sitecore Item Utility


Recently, We wanted to get few critical things done for one of our client before they Go-Live. We had a couple of weeks to get all those things done with minimal changes. [Normal scenario — Correct? ;)].

With that condition, We had to do bulk template change for 1000+ Media Items, as we added some functionality which was required in new template. We had following options:


They both are great solution for our challenge. Especially Sitecore Powershell. But If you see both need deployment/package install which has the lot of footprints and as I mentioned earlier, we wanted to have minimal changes before we Go-Live!

So, We thought we will build a simple aspx page [With CodeFile] So, It can be deployed without any App Pool Restart and once used tool can be deleted — Use and Throw. I’m sure you all must have built one/another tool like this. But once your Challenge was solved you struggled to find it. So, as I 🙂 That’s why I thought to blog this!


This is how it works:

You can download code from here and modify it as per your need and if you think it can help someone on this earth — Please share your great work!


Just a note : It is CodeBehind. But It should be CodeFile. So, it works without compiled DLL and No App Pool Recycle will be caused by this deployment

I hope this saves some of your time as it did for us. And you have time doing things which matters the most!

Happy Coding! 🙂

August 3, 2017 / kiranpatils

Integrating Cognitive Services to set ALT Tag during Image Upload


It is interesting – How this idea came up. Basically, was browsing Facebook page and while doing that – My Internet was slow and during image load process — I noticed an ALT Tag — Which had something like this and when Image got loaded. It had exactly same thing!


While this thing got stuck somewhere in mind. Came across following videos [Which I’m sure most of you as well]:

And that revoked the thought process. Especially — For those who are not as privileged as you and me to see the world. But through technology if it helps them visualize — That will help!

Then came across this link : [“Microsoft Cognitive Services let you build apps with powerful algorithms using just a few lines of code. They work across devices, keep improving, and are easy to set up. Try the Cognitive Services APIs for free.”] — This is really awesome – As For me impacting human lives and making it better using technology is the only thing which drives me in to this field. I’m sure for lot of you as well!

It provides the lot of services, which I recommend you to explore. But for this blog post, We only need : – You can try it out before you use it!

Tried few things and created simple Console application as per this doc :

And was impressed to see how it works — It just works! – My eyes lit up – And as you — I always think — How can I integrate this in Sitecore. And that’s how this blog post came in to this world!

Let’s see how — I have been able to integrate it with Sitecore!


You must have observed — Most of the site’s Media Library will have an empty ALT Tag. And it is not easy for someone to go and type such meaningful ALT Tag. Then I thought to use Cognitive Services to suggest us an ALT Tag and based on suggestion set that automatically in ALT Tag field. So, Content Authors/Editors, End users are happy – This is how it works:


As you do, I also did Quick search and tried to find is something similar already done. And found Mike’s blog : – Where he is extracting item name from path and setting it as an ALT Tag from getMediaCreatorOptions pipeline.

  1. I thought to alter his logic of getting ALT Tag instead of substring making an API call and setting it — Sounds easy, right? But my dear friend life is not as easy as it seems to be — After trying this out — I found that there is no way for me to access uploaded file or uploaded media stream 😦 — I tried to some options. But with no luck
  2. So, thought to try something else — And I tried item:created, item:saving, item:saved and in each of them I had the same problem. Was unable to get Media Stream
  3. It looks like when these events are getting called — It is creating particular media item and after that BLOB gets attached – I’m assuming this. Have asked Sitecore folks to clarify.
  4. Then finally, Thought to implement : uiUpload – Usually I avoid adding anything to ui* processors. As it will only be handled in UI scenarios and not programmatically scenarios. But I had no option and then I thought of YAGNI principle — I don’t need it now as this is my MVP [Minimum Viable Product]
  5. And here’s all the code you need for that — As I mentioned this is just kind of POC – Key and URL should come from Configuration, Code needs to be ironed out. Before it goes on production — And I will leave it up to you for brevity!

Let’s do our bit to make world better than we found it – Happy Coding! 🙂

UPDATE 1 : Thanks Kamruz

After posting this — Kamruz mentioned something similar folks from Community has already done. It looks like I need to sharpen my Google Search Skills – It would have save sometime. But on a +ve side, I have been able to learn and share

May 30, 2017 / kiranpatils

The Sitecore Basics Test : Symptoms of failing Sitecore Project

I have been fortunate enough to work on Sitecore projects since last 8 years of my overall 10 year’s experience. Throughout 10 years – I have  successful/unsuccessful projects.

I thought to prepare a list which helps you to identify [If you want to ;)] whether your Software project is failing or not and I like this article a lot — – Great test!

Recently I was reading Peopleware — It has the first chapter “Somewhere Today, a Project Is Failing“. – They did research on 500 projects — which they measured on project size, cost, defects, acceleration factors, and success or failure in meeting. Stats are as below:

  • 15 % : Canceled or “postponed” or they delivered products that were never used
  • 25% : For bigger projects, the odds are even worse, they lasted 25 work-years or more failed to complete

In earlier surveys, they discarded these failed data points and analyzed the others. Since 1979, they have been contacting folks who left from projects to find out what went wrong, Most part of the projects they studied, there was not a single technological issue to explain the failure.

I thought to compile similar set of list for Sitecore projects – Because while I’m writing and you are reading – Somewhere Today, a Sitecore Project Is failing.

Before we start would like to mention few things:

  1. Joel’s list is the base class for this list — Because Points which Joel has mentioned applies to any kind of project
  2. Will derive from Joel’s list and jot down my observations specific to Sitecore – It might fit or might not fit for your organization — Please use your own judgement [Listen your team’s views – Analyze – Conclude]. Before you derive something. If you have more better steps — please share

I’m excited to share what I learnt in 8 years, which you might learn in 8 minutes – That’s why I’m born – Born to share – Here we go:

Just a note : These symptoms applies to all kind of projects — Product/New Project/Enhancement and Support Project

  • Tough to onboard new Developer : If on boarding new developer is taking weeks or people say – No, we can’t onboard new developer new Developer in crunch time without logical reasons and gives you a reason that on boarding will take time from project developers or will take weeks. Then this is a sign of failing Sitecore project. This means everything is unmanaged. No one has documented on boarding steps [They are insecure?!] or current developers configured their Development environment anyhow and now they don’t recall what they did. My rule of thumb is — In 4-6 hours [Vary based on project’s external dependencies e.g. Commerce, SOLR, etc] and a document should be more than enough to onboard new developer. If your teams says No — Take a step back, listen their reasons. And analyze it.
  • Sitecore Developers don’t know what they are doing : During demo/in meeting, when you ask in-depth “Why” [Is this the best way to do this in Sitecore? Is there a simplified way to do this?] questions and Sitecore Developers can’t explain you in simplified manner — Something is not right. It’s time to get right partner/developer onboard!

  • Huge Estimates : When you see huge estimates for simple set of tasks, It means that things are not rightly architected If project is new then it’s fine. As building robust framework takes time. But if it is taking longer for later sprints or for support and enhancement – Then you need to talk to your team. Again, It might be a case lead Developer has left and new Developers are trying to understand and implement solution – This is fine to have situation – And each project has a bit of learning curve, As there were no defined Sitecore project architecture standards — It was different company by company or in some cases project by project. And that’s why Sitecore and Sitecore community is excited to learn and implement Helix You should come out of cave, If you don’t know about Helix and read about it!



You might have smart developers onboard on project. But past implementation has been super tightly coupled, One change can break N number of things or ruin someone’s evening plans or weekend 😦

  • Developer spends more time in figuring out “What” And “Why” then “How” : Your requirements are super vague. To work on feature A which is in reality 4 hours task. Developer spends 6 hours figuring out all material and still not clear what exactly needs to be done. As soon as he/she knows they are able to complete work in less than 4 hours. Other symptoms are – Team is more busy in meetings than being in zone – Scrum runs for hours and hours, Sprint planning runs for hours and hours, With whole project team. If you hearing <1 Man day task in next day scrum without any blocker — Then something is not right OR Your team is performing less than their capacity/velocity — Then you should talk to team!. Another sign is — If you ask two team members about Project schedule and you hear different answers — It’s time to talk. [Good read — About Watermelon Culture]
  • Developers don’t have good tools : From my point of view Sitecore Developers must need to have some good tools e.g. Reflector [My personal favorite], TDS Classic, Glass Mapper [If your team is still handy crafting models and not using code generation then they are investing their time in wrong things] etc.
  • Sitecore Items are not version controlled : This is the biggest sin from my point view. Your Sitecore items are as important as your code [In some cases more than code].  Can you imaging Software industry without version control? I know you tried that in college project[.zip of .zip, final .zip, .backup of .backup :)] — That doesn’t work – We are professionals. You are in to serious business — I like this chapter from 97 things every programmer should know book  :

“Professionals do not make a mess. They take pride in their workmanship. They keep their code clean, well structured, and easy to read. They follow agreed upon standards and best practices. They never, ever rush. Imagine that you are having an out-of-body experience watching a doctor perform open-heart surgery on you. This doctor has a deadline (in the literal sense). He must finish before the heart-lung bypass machine damages too many of your blood cells. How do you want him to behave? Do you want him to behave like the typical software developer, rushing and making a mess? Do you want him to say: “I’ll go back and fix this later?” Or do you want him to hold carefully to his disciplines, taking his time, confident that his approach is the best approach he can reasonably take. Do you want a mess, or professionalism? ”

Please read this :

“We have found TDS Classic easily affords an 8%-15% decrease in costs (time) to develop a Sitecore solution regardless of the size of the project. A 10% savings over 30 weeks for a 3 person team is 9 weeks of gained productivity. If the average team member salary is $75k per year this represents approximately $13k in savings.”

If you have budget constraints? Sitecore community folks have done lot of good things – Especially Kamsar‘s Unicorn

I love Sitecore items to be Version controlled because:

  • Developers can have their own Sitecore Database copy
  • Which is blessing when you have Developers who are connecting over VPN to your shared Database — VPN is still not the best solution our industry found
  • They can make Sitecore level changes without breaking anyone’s challenge
  • This is the first step for automatic deployment
  • Everyone is accountable
  • Easy to track, compare and revert!
  • Sitecore Configuration Patching is not used : This is also super important to have. Sitecore configuration patching helps you to keep your Sitecore configuration changes in control for development, deployment, troubleshooting and version upgrade. The day your configurations are out of your control — You are done!
  • Deployment makes your nervous : Obviously, when you say – Live/Production deployment people feel bit nervous. But each time it makes you super nervous and you have a lot of deployment failures/revert – This is sign of some loophole in system. It can be either process, wrong implementation, folks don’t know what they are doing, no/less code reviews, tightly coupled code, QA is not involved in project. Any Developer goes and deploys files in lower environment/in some cases production/live environment. No one takes a lead to take a lead on deployment failure. No one wants to retrospect. I have worked with a team, Where when you say production deployment. They start planning for party — Because they have full confidence on what they have done in their local machine/lower environments, is nothing but a master piece of professional and elegant work! If your deployment is still manual and runs for hours and hours [Think of Web farm with 20+ servers] then you need to stop development and start thinking to automate or semi automate your deployment process OR If you can’t automate please simplify the process. Discourage tame to make last-minute changes or change go live date.
  • No proper handshaking between teams : I always visualize Sitecore Development – Deployment is same as like Assembly line.  If one player/team is slow. It will slow down whole process. [Read The Goal book?]. It’s not because of technology. But no proper team environment. There are teams within teams. UI Developers should always be ahead of Backend developers and QA should be always ahead or aligned with backend developers. QA should be involved in process at right time. I always prefer to have BED and QA work parallelly – Developer writing code and QA writing test cases.

  • Site performs poor without caching :Sitecore being an enterprise level CMS provides state-of-the art Sitecore caching. But lot of bad implementation tries to hide behind Sitecore caching – I always prefer to do load testing without Sitecore caching. If you can meet your thresholds during this then you will be able to beat your competitors when you go live! Also, It’s always good to have time for performance testing and tuning (Another gold mine is your Sitecore log files – Great Sitecore Developers always prefer to check log files before they Go-Live for Project/Product/Sprint). If your team says – We don’t have time for performance tuning — It’s time to talk!
  • Content authors need a lot of hand holding or coming up with lot of questions : This means things are not simplified enough or Sitecore’s OOB features are not used e.g. Add Rendering, Placeholder settings, Data source etc.
  • All plans fail without Content Matrix Plan : If you are ensuring UI, Backend, QA, Servers, DevOps folks, Process everything is good. But in case if you missed to plan, Content management/entry for your huge site — Then your project will get delayed. Because content management is also a critical task. If you have a new site and there is a lot of content your content team should start adding content as soon as they can

Found helpful? I repeat, this is not a fully comprehensive list. I’m sure you will have your learnings which you should share with us — So, you will be able to save that failing project.

Happy Sitecoring! 🙂

March 9, 2017 / kiranpatils

Helix, 8.2 DI and An error occurred when trying to create a controller of type ‘ScBasics.Feature.Nav.NavController’. Make sure that the controller has a parameterless public constructor


The best part of our lives is, Whatever/However experience you are you will face one exception/error which challenges your experience. And that’s what happened with me recently. And I am sure you agree — That’s when your basics come to rescue — Same was the case in my case.

We were deploying Helix based solution which was working like a charm in local. [In case you haven’t heard of Helix/Habitat yet – Which I don’t expect to be the case. But If heard and not explored/clear on it. Then this post might help you]

But as you know “life is not as easy as it seems to be” When we deployed it on Dev/QA environment. We met following error:

Sitecore.Mvc.Diagnostics.ControllerCreationException was unhandled by user code
  Message=Could not create controller: ‘Navigation’.
The item being rendered is: ‘/sitecore/content/SCBasics/Home’.
The context item is: ‘/sitecore/content/SCBasics/Home’.
The current route url is: ‘{*pathInfo}’. This is the default Sitecore route which is set up in the ‘InitializeRoutes’ processor of the ‘initialize’ pipeline.
       at Sitecore.Mvc.Controllers.SitecoreControllerFactory.CreateController(RequestContext requestContext, String controllerName)
       at Sitecore.Mvc.Controllers.ControllerRunner.GetController()
       at Sitecore.Mvc.Controllers.ControllerRunner.Execute()
       at Sitecore.Mvc.Presentation.ControllerRenderer.Render(TextWriter writer)
       at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)
       at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args)
       at (Object , Object[] )
       at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
       at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
       at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
       at Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.PerformRendering.Render(String placeholderName, TextWriter writer, RenderPlaceholderArgs args)
       at (Object , Object[] )
       at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
       at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
       at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
       at Sitecore.Mvc.Helpers.SitecoreHelper.Placeholder(String placeholderName)
       at ASP._Page_Views_Website_Layouts_Default_cshtml.Execute() in c:\…..\Website\Views\Website\Layouts\Default.cshtml:line 38
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
       at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
       at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
       at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)
       Message=An error occurred when trying to create a controller of type ‘SCBasics.Feature.Navigation.Controllers.NavigationController’. Make sure that the controller has a parameterless public constructor.
            at System.Web.Mvc.DefaultControllerFactory.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType)
            at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName)
            at Sitecore.Mvc.Controllers.SitecoreControllerFactory.CreateController(RequestContext requestContext, String controllerName)
            Message=Context is null
                 at Glass.Mapper.AbstractService..ctor(Context glassContext) in c:\TeamCity\buildAgent\work\8567e2ba106d3992\Source\Glass.Mapper\AbstractService.cs:line 103
                 at lambda_method(Closure , ServiceProvider )
                 at Sitecore.Mvc.Controllers.SitecoreDependencyResolver.GetService(Type serviceType)
                 at System.Web.Mvc.DefaultControllerFactory.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType)

You might say that’s easy “controller has a parameterless public constructor.” – Just add this and it should work 🙂 But same code works in local, and second thing is we are using Sitecore 8.2 DI for controllers. And in that case, it is not required to have parameter less public constructor. And if it is same error for you, it means that, your DI is not working.

You are also facing same error? Then this post might help you!


So, as every developer on this earth does, We also did a quick Google search and found following links, which were helpful:

  1. – dnstommy’s reply gave us a hint that our DI is not working
  2. Apart from this there were no any good results on web. So, now it was time to look back in code and see how things laid down and figuring out what’s going on

Troubleshooting process:

public static class ServiceCollectionExtensions
    public static void AddMvcControllersInCurrentAssembly(this IServiceCollection serviceCollection)
      AddMvcControllers(serviceCollection, Assembly.GetCallingAssembly());
// Removed for simplicity
 public static void AddMvcControllers(this IServiceCollection serviceCollection, params Assembly[] assemblies)
      var controllers = GetTypesImplementing<IController>(assemblies)
        .Where(controller => controller.Name.EndsWith("Controller", StringComparison.Ordinal));

      foreach (var controller in controllers)
// Removed for simplicity
  • Looking at code, it makes sense. But it works in local. But not when deployed. So, after troubleshooting a bit. Thought to log what we get in calling assembly — We also faced challenge here. Sitecore logging will not work at this layer. So, we had to use plain old StreamWriter [You remember, I told. Basics!?]
  • The log results were something like this:
    • In local : In Calling assembly we were getting Feature assemblies
    • In QA/Dev : In Calling assembly we were getting Sitecore.Kernel
  • It was clear, Assembly.GetCallingAssembly() was misbehaving
  • Quick Google search reveled the mystery, GetCallingAssembly works different in Debug and Release mode
  • In local we are using Debug mode and on QA/Dev – We are using Release mode
  • Root cause “The JIT compiler moves code around to optimize for performance. Small methods (up to about 56 Byte IL-Code if I remember it right) can be inlined where the method call was before. But the compiler does this only in release, not in debug mode. Also when attaching the debugger to our release build the JIT compiler stopped inlining to enable debugging and our bug was gone” : Source :
  • Last post had an approach — Adding [MethodImplAttribute(MethodImplOptions.NoInlining)] on method — Which somehow didn’t work for us
  • But then thought to look for some better options and we found it!
  • We added one more Service configurator in Foundation which has following code:
namespace SCBasics.Foundation.DependencyInjection.Services
    public class RegisterAllFeatureControllers : IServicesConfigurator
        public void Configure(IServiceCollection serviceCollection)
            /* We were facing issue in Release mode
               Which was not resolving  
  • Above code, uses an alternate method for adding MVC Controllers and best part of this approach is. You no need to register your controllers, which you added in feature project. This foundation project will automatically do it! [BTW, Nothing is automatic, we wrote one time code for it ;-)]

Happy Coding! 🙂

March 9, 2017 / kiranpatils

Quick Helix deployment approach


I have been looking at a why, how we can deploy Helix approached solution without adding lot of tools and complexities. After investing some quality time. Have been able to do it. Few tweaks are required to this process. So, it can be automated. But basic idea should get you going!


As you know each Foundation/Feature/Project – might have one web project Files which needs to be deployed to webroot. And TDS Items as well. Let’s look at each of them:

  1. Files : To deploy files, I prefered to use my old and gold – Web deploy! As you know for webdeploy and Visual studio publish for web project to work you need .pubxml and it holds few configurations. To centralize those configurations, here’s what we did:
    1. In Configuration folder created .targets file e.g. scbasics-pubsettings.targets
    2. Which contains publish related configurations  e.g. WebPublishMethod,MSDeployServiceURL etc.
    3. Each Web Project has its own .pubxml file which points to .targets file which we created earlier <Import Project=”..\..\..\..\..\..\Configuration\scbasics-publishsettings.targets” />
    4. So, using above approach, Configurations are centralized. So, in case if you have to change anything. You change it at one place rather than changing lot of places [depends on your feature/foundation/project count]
  2. TDS : We had access of Target server using HTTP. So, we just added required configuration in TdsGlobal.Config for that particular environment. And TDS is smart enough to take care of it! [QUICK UPDATE : 31-AUG-2017 – If you are using TDS Sync over HTTP. Then you can uncheck Build TDS Project for particular build configuration — It will save some time]

I have not been able to hook it with Teamcity and do automated deployment yet. But when I do it using .sln — I can foresee only one challenge — Build ordering – Because your project should be built at last and it should copy root’s Web.Config. But that can be resolved with some ways — Which I’ve left for you! 🙂 Or you know If I spend time on it, will share with you — I expect the same! 😉

One more Helix puzzle resolved!

Happy Deployment! 🙂

March 2, 2017 / kiranpatils

TDS error while generating update package


It was Friday evening and it was time to sign off for the day and go on long weekend trip. Just before that we had a task to send a deployment package. And suddenly my friend Vikram shouted — While generating TDS Update package, We are getting this error

TDS: The package builder failed. Please see build output log for more details

When I went to his desk and said – Oh that’s easy. Just look at output log and we should be done! But It’s real world life, which is not as easy as it seems. You are also facing same error? Searching for solution? Then this post is for you:


After trying few things we thought to do quick search and we found following great articles:


Both have listed good suggestions. But neither of it worked for us. But might work for you. So, please do it before you move on. What, you already tried and then landed on this post. Then please keep reading. We thought to look at Build log level. By default they are minimal after changing it to Diagnostic. And when we tried again, we were able to find root cause from build output window that one of the .item was corrupted. As such it was not mandatory to have it. So, we deleted it AND It worked!


Happy Weekend! 🙂

February 17, 2017 / kiranpatils

Sitecore Helix Basics


Hey Friends, I’m excited to share many of first post of 2017! So, far it has been great year and I know a lot of you are MVP now or MVP Again — Congratulations Very well deserved! – Please make sure you help someone else become one — Because sharing is caring — Nice story

Since last year we have been hearing a lot about Habitat and then Helix and lot of people appreciating what Habitat or Helix is. You also heard/read about it? But:

  • You are afraid of It? Because Habitat solution is huge and you get confused how to set it up. Because it involves a lot of tools to set up e.g. gulp etc. [This is good point to upgrade your web/technology knowledge. It is evolving a lot. All of us accept that FED Technology is seeing lot of huge changes, and .NET Core team is doing super awesome stuff. If you don’t upgrade your self, there are chances of you being dinosaur in this industry]
  • Confused between Habitat and Helix
  • You setup your Habitat solution. But when you opened it. You got overwhelmed?
  • In this process, you don’t know how to get started and what’s the starting path for you to embrace Sitecore Helix?

Then this post is for you — This post will do 95% job to help you getting started on Helix — What about other 5%? — Will share about it before end of this post. So, let’s Helix


Before we get further in technical details. Let’s try to understand what is the dictionary meaning of “Helix” – Wiki says “an object having a three-dimensional shape like that of a wire wound uniformly in a single layer around a cylinder or cone, as in a corkscrew or spiral staircase.”

Source : Wiki

It will be great to hear about naming directly from horse’s mouth some day.

Let’s get on point, How I got started on Helix? Exactly in same order:

Okay, Thank you for those resources. But can you please share your basics with me? So, I can get quickly started. Sure, here we go. I will share my learnings and understandings:

  • What is difference between Habitat vs Helix?
    • Helix :
      • Sitecore® Helix is a set of official guidelines and recommended practices for Sitecore Development.
      • Set of architecture conventions and guidelines that describe how to apply recommended technical design principles to a Sitecore project.
      • Secure implementations in a future proof way by architecting them as maintainable and extensible business centric modules
      • Development process recommendations to make it as easy as possible to build, test, extend, and maintain Sitecore implementations
    • Habitat :
      • Habitat is an example project that follows the Helix principles and recommended practices.
  • Why we need Helix?
    • Dependencies : If you look at dependencies, left side-show non helix project — Where any module is talking to any module — And as project becomes huge. No one makes small change with confidence — To make a one line change — Developer/QA/Stakeholders — Have to keep their fingers crossed. And still they have issues and because of it, they either have to miss dinner/lunch/outing with friends/baseball match/cricket match. But when things are done Helix way — right side. There are some standard ways – How each module talks to each other — And that gives everyone full confidence before making any change! — It is simple maths — Invest on strong foundation and take returns in a longer run! dependencies
    • Following diagram, clarifies that — As the project dependencies grow — lot of time spent on coupling rather than feature — and that increase time taken as well!why-helix
  • There are some logical layers defined, and you try to follow it – This image is very self explanatory. You just need to know three things – Foundation, Feature, Project – And each one of them should hold things which suits to their name:layers-basic
  • Benefit of using proposed layers — See this example – When you have multiple sites — They can have all foundational and featured things available! – Standard Sitecore Multisite way of doing things:layer-example
  • Helix also guides you how you need to structure your templates – Which are heart of any Sitecore projects : helix-template-inheritance
  • There are few Helix dependency rules you need to follow — You can break it. But then there is no point in using Helix:helix-rules
    • There is a strict reference hierarchy of module categories. Projects -> Features -> Foundations.
    • Project modules cannot reference other projects, but can reference any Features and Foundations.
    • Feature modules cannot reference any Project modules or other Feature modules. They can reference Foundations
    • Foundations can only reference other Foundations.
  • How to add advance things like GlassMapper, Sitecore 8.2 DI, Code Gen, TDS : Good question, We spend sometime and made it possible. This thread might help you get quick started [If not, give me a shout] :
  • If you think — There are a lot of Manual steps involved in adding a feature and foundation – Look at the great work done by Marc :
  • Akshay also did good stuff taking this forward for initial setup :

It seems a lot? I know, I realized after writing. But I wanted to share all our basics with you. Because when we had to start, we were literally struggling to get started. But now, we did it. Thought to share with you. So, it saves some of your time, which you can spend with your loved ones or for other important things!

In Summary,

  • Helix is not a rocket science, It is same Sitecore code. But how and where you write it — That is standardized by Sitecore — As Sitecore support team is also using same methodology. So, it is easy for them to help you troubleshoot
  • Just imagine, your company adopts Helix and all projects which your company does, does in Helix [Including your project :-)]. After sometime, any developer can jump from one project to another project – Project on boarding will be super easy — (S)he just need to know business domain. I have seen lot of project leads, don’t allow new developers on board even though they can support more developers in project — Because of project on boarding — Helix helps us all speak same language!
  • “Helix is like Maths, Once you get it. You enjoy it and would like to do it again and again”

I am sure you must be curious t o know what else 5% I need to do to get 100% knowledge on Sitecore Helix? It’s simple — Get your hands on it. Coding is like swimming. You have to dive in to swim/code!

It was fun to work along with Muktesh and Varun on Helix basics! Thanks to all folks who already wrote about it, which helped us to get it started sooner!

Good read:


Happy Sitecoring! 🙂

%d bloggers like this: