I have seen some really great examples at how to build a website using Habitat. In many ways it contains a good percentage of features that I need.

Is this something that is production-ready and could be used as a base for my new website?

up vote 19 down vote accepted

A Resounding No

Think of Sitecore Habitat as the result of an assess and plan project phase where requirements and business objectives were already described for a ficticous client and developed.

While thats great for a demo site, as it goes, most requirements differ wildly per client. Using this as a starter kit, places unfounded requirements that maybe the client didn't want. So, now an assess and plan phase has to go through and unwire the ones that the client doesnt want, and then wire in the ones that weren't accounted for.

The time spent doing that comparative analysis, is generally greater and leads to bad practices because of having to undo something that someone already built. Or, as Dylan mentions in the comments, not done at all. Leaving behind bloat that will cause problems down the road.

How Should Habitat Be Used?

Instead, use Habitat as a model of a solution meant to provide a basis to help understand the principles of Helix. With a goal of creating something new that the client 100% intended to have with nothing else that they didn't.

An Analogy

Think of it like trying to write a childrens book but starting with a George R.R. Martin novel as a "starter kit". In theory, you're always going to want to have the Dragon Queen, but by the time you're done writing, most of your code is going to be dead.

#HabitatIsNotAStarterKit
  • 1
    Or what seems to be more common out there, that vendors that use it as a "StarterKit", never do the comparative analysis, and then your solution comes with alot of unnecessary bloat that has unknown consequences. – Dylan Young Nov 16 at 0:35
  • I'd say definitely mine the Foundation layer, and/or use something that's not as "feature-rich" as Habitat like github.com/muso31/Helixbase, which is more designed as a "starter kit" that's mainly Foundation with some examples on the Project/Feature level. – Ken McAndrew Nov 16 at 1:27
  • 2
    So you are saying there is a chance? – Chris Auer Nov 16 at 2:55
  • 1
    I kind of disagree that Helixbase is a starter kit. It contains "example" modules as mentioned in it's documentation. Been working on an Open Source Project: github.com/sitecoremaster/Helix-Starter-Kit that I consider more of a "Starter Kit", because you can initialize a base Sitecore Solution which contains only 3 projects (Serialization, ORM and DI) and nothing more. It also provides developer efficiencies to extend it. No extra bloat, which is by design. – Dylan Young Nov 16 at 23:49
  • But now you're getting into opinionated semantics of what constitutes a "starter kit" and what you consider "bloat". A single example of a feature, personally I would not consider that bloat, like saying a default example of Sitecore contains bloat due to the sample homepage. And the rest seem to be what the author considers best practice. – jammykam Nov 20 at 21:37

Every single answer you will receive will be a no, Habitat is not mean to be used as a starter kit. Unless of course your client wanted a website that was exactly like the Habitat (standard, legal or finance) websites. Even then, I wouldn't regard it as production ready.

Note that the readme file of the Habitat Repository clearly states it is not a starter kit:

Is Habitat a starter kit or template solution?

No. You should not clone this repository for the purposes of starting a new Sitecore project. There are other community solutions which can be used as a starter for Helix-based Sitecore implementations. Habitat is intended as a reference example of a Helix-based Sitecore implementation.

Habitat has always been regarded as an example solution that implements the Helix principles. It is not the only way to follow the Helix principles, but one example of how a solution could be structured, provide some conventions that could be follows, demonstrate how to define/enforce module boundaries and dependencies.

Should you use Habitat?

Yes, use it as a learning exercise. Read the Helix documentation, and see how the Habitat project tackles those aspects. But don't use it as a starter kit for an actual project for a client that ever makes it anywhere near production.

Unpopular opinion maybe, but don't feel shy to take code from the Habitat project. I'm not saying copy/paste the entire repository, but undoubtedly there may be features/projects in the project which solve a particular problem you are trying to solve and maybe it solves it in a neat way, maybe the way multisite or datasources projects is handled, or the way the navigation feature is tackled. More likely these would be the Foundation layer projects though.

The important part is to understand why those projects were created, what problem are they trying to solve and how they solve them following the Helix principles. Large parts of our codebase is probably already copy+paste, whether that's from a previous project or StackOverflow. They key is to never blindly copy+paste or follow an example, but to understand and then apply it yourself only if it solves the exact same problem you have.

But don't kid yourself that the code in Habitat is the ultimate solution to anything. It's an example site and as with all things in Sitecore, there are plenty of ways to solve the same problem, even whilst following the Helix principles.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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