Sitecore Habitat: Not a Development Accelerator
Dev: "Let's focus on a solid architecture platform for this Sitecore project."
PM: "We need to delivery quickly. That Habitat accelerator looks like a good starting point."
Dev: "Sure thing."
Sometimes it's a time crunch that leads to shortcuts, other times it's the wrong people on a project, but in my experience, leaning on Habitat as a "development accelerator" has come from a misunderstanding of Habitat's basic purpose.
What Is Habitat?
Habitat is a complete Visual Studio solution for a Sitecore implementation that demonstrates Helix design principles. It also includes build tasks, Sitecore item serialization via Unicorn, and many other tooling examples. It's open source and updated regularly on GitHub.
Habitat source on GitHub: https://github.com/Sitecore/Habitat
There is a live production example running online as well.
Live demo: http://habitat.sitecore.net
Finally, the GitHub repo offers a great wiki with "Getting Started" instructions that waste no time in getting you set up with Habitat.
Understand Your Goals
With so much help, great architecture, and quick setup, why wouldn't we want to start new Sitecore projects with Habitat as a foundation?
Habitat's main goal is to demonstrate Helix concepts - it's a learning tool - and it does this at the simplest levels possible for learning purposes. You can easily correlate Helix documentation to code samples in Habitat.
Because Habitat is just one example implementation of Helix concepts, it's likely that your architecture needs are different. Your site probably has numerous integrations, customizations, and special requirements that would require a different starting point than Habitat provides.
Helix dictates that functionality should be broken into modules across layers with no direct dependencies between modules. Habitat does this quite literally by spreading modules across many VS Projects. This means the tooling required to build the Habitat solution is relatively complex (utilizing MSBuild, gulp, etc.). These scripts are not production-ready (and come with no implied warranty), so your existing build process is probably going to work better.
Getting the Most Out of Habitat
Here are a few tips for getting the most out of Habitat as a learning tool:
- Read Helix. Study Habitat.
- Install Habitat and get good at it. Set it up, tinker with it, break it, then rinse and repeat.
- Borrow ideas from Habitat (such as the serialization patterns and naming conventions).
- Find things you don't like about Habitat and learn from those pain points. There's a lot to learn from knowing what doesn't work for a particular implementation.
Do you have questions, comments, or corrections for this post? Find me on Twitter: @BrandonMBruno