4

I am new with the Sitecore and Helix as well. I'm studying the Helix and its example - Habitat. I think it's missing the example of Feature get references from other Features.

Regarding the Feature-to-Feature, I found the series of blogs which explained most of the cases of the dependency among modules which are same layer

https://blog.coates.dk/2017/04/18/sitecore-helix-modules-that-need-to-reference-another-module-in-the-same-layer-part-1/

We can find part 2 and 3 in that blog.

So i'm looking for an example for the scenario

  • Feature.Blogs has Feature.Person as an author
  • The ability to show the list of blogs within the author (Feature.Person.Templates.Person.Name)
  • The ability to show the Author within the total of their blogs, some kind of Facet

I appreciate your resources/examples.

Thanks.

9

That blog post from Alan covers the scenarios nicely. The problem is that you are looking for Feature to Feature dependencies and if you follow Helix guidelines, that is expressly forbidden:

A strict awareness of dependencies within the Feature layer is very important. One Feature module must never depend on another Feature module

ref: Helix Feature Layer

So lets look at your scenario:

  • Feature.Blogs has Feature.Person as an author
  • The ability to show the list of blogs within the author (Feature.Person.Templates.Person.Name)
  • The ability to show the Author within the total of their blogs, some kind of Facet

First problem, the Feature.Blogs module needs to display an author, and you have added the author data to Feature.Person - so here is where you might consider either adding a Foundation.Person module, that allows a Person to be used by multiple features. This could be done via an abstraction of Person into the foundation module, with the implementation still in the Feature.Person module, or by just moving the relevant models and services to the Foundation module.

The next 2 problems are also solved by creating a Foundation.Person module, this would allow interaction with the Person part of the module from the Feature.Blogs module.

Note that this doesn't remove the Feature.Person module, you would still have that Feature module to provide specific implementations of the Person business unit, e.g. Login, Sign Up, Account Profile.

  • Thanks @Richard Seal for you recommendation. I'm following the principle of Helix that the module in Feature layer must not depend other modules. So that's why I'm looking for the way to solve this case. – Kim Aug 30 '17 at 6:44
  • 2
    I also think about the same solution as your while I'm reading the blog from Alan. So, if the feature's module might be referenced from another, it should be had an abstraction in Foundation layer. Is that correct? – Kim Aug 30 '17 at 6:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.