1

I'm currently working on a Sitecore 10 project using Helix. We currently trying to implement Helix as closely as possible.

We have two feature modules, Consultants and Hospitals. Consultants can work at various hospitals but our features don't know about the relationship. Any ideas how we can get the data out whilst following the principles?

1
  • I would ask the question - why do you have the 2 features? remember that a module is something that is feature as understood by business owners. So if Hospitals have Consultants, then maybe they should be in the same feature module? – Richard Seal Jan 12 at 13:50
0

In your case I would create a Foundation project called Hospital and make feature "Consultant" reference to it. Because in a future it could be possible that you need something else ( Cleaner, Nurse, Doctor) but it also need hospital data. Then you can easily reference again to Foundation Hospitals from the new feature project.

One thing to note is that if there is going to be more than one job like Consultant I would probably rename feature "Consultant" to more generic like "Worker" or something similar. Then inside that Worker feature you would have a information of different roles for workers like "Consultant, Cleaner, Nurse, Doctor".

0

Basically, if you see that one feature depends another, dependency need to be moved into the Foundation layer.

Also, it is not really required to move whole Consultants feature. You need to add a new Foundation project, which will have, for example, a templates and corresponding classes (or interfaces) for _Employee and _Hospital and a code, that will be responsible to retrieve or build Employees and Hospitals data. For example a service, which will return a Employee (an instance of _Employee) by ID, or a list of Employees by HospitalID or a hospital data itself.

Then, Consultants and Hospitals features can inherit and extend (if required) the _Employee, _Hospital and being responsible to display a Consultant data and use this Foundation module for get a base Employee data.

This all is abstract. The main idea to move the modules dependency on one level up.

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.