18

I recently discovered Habitat and I really like the modular design and how it provides an end-to-end sort of pattern and process for organizing your Sitecore site, but the Habitat solution includes so many projects that I'm not sure where to start when creating a new site from scratch.

I did find the Sitecore.Demo.Group project which seemed like exactly what I was looking for, but this project seems to plug into an existing Habitat solution. Do people typically start with a complete Habitat solution and just add to it when creating a new site? Are there any examples out there that show how to start with a brand new solution and build up a site modeled after the Habitat solution?

23

Habitat is intended to inspire your solutions; you should never start with the Habitat solution and add to it when creating a new site. Habitat is not an accelerator, it is an example of the Helix principles outlined here: helix.sitecore.net.

When you create a new solution, you may want to refer to the Habitat solution for things like:

  • Solution structure (e.g., Foundation, Feature, and Project folders)
  • Project and module structure (e.g., make folders for each module and keep module code and unit tests together)
  • Build system (e.g., how to deploy code to webroot and stitch web.config transforms together)
  • Information architecture (e.g., where to put globally-shared content, site-specific content, and page-specific content)

Pick and choose the things you like, let Habitat inspire your solution, but do not build sites on top of it.

| improve this answer | |
8

As mention in @Anicho's comment, you should start by looking at helix.sitecore.net to get you started with understanding the modular architecture pattern and principles that Habitat was built around.

The Helix documentation will link you to the various OOD and SOLID principles on which the structure is based. Be sure to read them, as you will not be able to develop a strong modular architecture without this knowledge.

The Helix documentation will suggest ways to name your projects/solutions and organize your data.

The next consideration is how you will merge all of the assets, configurations, views, etc. from your various projects into the website target folder. Habitat does this with gulp, where-as my architecture does it with pure powershell.

Past that point, the sky is the limit! Good luck, and ask questions when you are unsure of something. A house is only as good as its foundation!

| improve this answer | |

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.