Tips for New Sitecore Developers
Working with Sitecore can be challenging for developers that are new to the ecosystem. However, the kinds of projects you'll be able to work on in the future have a good chance of being interesting 🤔, challenging 😬, rewarding 🏅, and even 💎prestigious💎 by nature of the types of clients that use Sitecore (medium to large enterprises). Over the years I've had the privilege of working on massive websites for many recognizable brands and organizations.
Enjoy some of my favorite tips and tricks.
Content Editor Tips
Use Navigate -> Find links
Read the damn error messages (console log, sitecore log, event viewer, IIS logs, etc.)! Do your own searching before asking for help. Refine what the problem actually is.
The fastest way to locate backend code is to start with the frontend by using the browser dev tools and finding unique strings that identify certain areas
Concept of speed running — reduce the build and startup times with configs, PC optimizations, optimize compilations, view compilation vs not for speed, comment out major areas of the site that are not applicable such as headers, footers, etc. You can also use unit tests to speed up development time since you won't be waiting for Sitecore to warm up.
- Find ways to speed up your build cycles. Here's one approach.
Use master as your web DB so you don't need to publish.
When in doubt, start with a fresh install. Get really good at installing new instances of Sitecore. Compare and contrast vanilla settings / configs with your own.
Look at the config examples in App_Config/Include/Examples
Swallow the frog! Stop asking people for tips and how hard the test was. Carefully read the breakdown of testable subjects, do the preparation that Sitecore recommends, and let it rip. Sitecore partners get discounts on exams. Partners need certified developers to retain their partner status. Take advantage of this.
TODO: meme certificate
As a new Sitecore developer, you need to have a good understanding of templates, workflow, renderings, rendering parameters, etc. Getting a Sitecore developer certification is one of the best ways to learn.
Get really good at describing your issues with great detail so you can post them (or search for them) on Stack Exchange or in Sitecore Slack. I can't tell you how many times people in the community have saved my ass because I was able to adequately describe my issue. Point is, provide as much info as possible. Versions, logs, code samples, what you have already tried, which resources you have already read
Get really good at google searches - exact match keywords If you can't find results, either you're not looking for the right thing, or you are having an issue that's highly specific to your environment. It might be broken because of browser extensions, network restrictions, human error
Modify your view settings — not showing standard fields speeds up loading
Use the gutter
Keep backups of your App_Config, bin, and Views directories for quick restoration.
Use Sitecore search for item IDs / names - rebuild indexes and link databases
if you see an item that has no links to it, that doesn't mean it's not used -- check the code for references to the ID / Path / item name.
Sitecore Best Practices
- Never modify default Sitecore configs. Always use patch configs.
- Get familiar with the Helix recommended practices and conventions -- it will help you understand implementations and make you a better developer.
Analysis & Problem Solving
Assume that NOBODY knows what they want and that any analysis, designs, or requirements are only preliminary. It takes too long to do analysis and so most projects just start with a general direction. It's up to you to flag details and work through them with the clients.
RFM — seriously, read the docs before you dive in.
There are many ways to solve problems, especially in Sitecore. The most powerful feature of Sitecore is its ability to be customized.
Get good at coming to understand a codebase. Think of what you know and don't know as a tree. If you are looking at a leaf, follow the branch until you locate the trunk Learn the Hot-Path Internals Trace down Learn up
Use checklists as you're working through problems.I have some great examples in my Bulletproof Components post series.
TODO: add more?
- Always check for null values. Good Sitecore developers know how to code defensively.
- Work incrementally — don't make too many changes at once.
- Only refactor code if you 1) fully understand it, and 2) need to do so as part of the functionality that you're working on. I've seen many situations where me or someone else made an "improvement" to the code, only to find it cause many more issues in QA / upstream environments. Stay focused on the problem you're trying to solve.
Troubleshooting Sitecore Errors
Understand what is relevant in the logs and what is noise
If you see a lot of errors in the logs, that's a good indication that you should fix that ASAP before working
Always look in the logs first by searching for "ERROR " and "WARN " (note the space at the end).
If there are no logs at all, it's probably a web.config issue.
Programs & Tools
Set yourself up for success. Here are the tools I use:
- NotePad++ (for editing and searching directories for text)
- dotPeek (for decompiling)
- VS Code
- BeyondCompare (TODO: learn to use this for directories AND files)
- SIM (Sitecore xxx Manager)
- BROWSER EXTENSION?
Always launch all programs as an Administrator. Here's a way you can automate it so you never forget.
- Right click the program in the task bar
- Right click the application
- Click the
Run as administrator
Personal Growth & Mentorship
Get a mentor
Link to the MVP Mentorship Program
Start a blog — teaching others helps you learn
Join Sitecore partner agency for exposure to many different clients / projects
Visual Studio Tips
If you see a chunk of code that has 0 references, that may not be true as the reference may be specified in an item or a config
Turn on the setting to show you the current file you're viewing in the Solution Explorer
Keyboard shortcuts :
- CTRL + T (quickly navigate to files) CTRL + G (go to line) CTRL + F (find text) CTRL + M, CTRL + G (go to controller) CTRL + K, CTRL + T (view call hierarchy) CTRL + K, CTRL + D (reformat indents)
Solution —> Find All
Find all references Go to definition Go to implementation
Learn how to decompile code.
If you ever need to perform repetitive or analytical administrative tasks, Sitecore PowerShell Extensions (SPE) will help you automate it and do it faster. SPE is very powerful, and having a good understanding of it will set you apart from other SC devs.
Sitecore Admin Tools
Get familiar with the tools located on the Launchpad screen and in
- Rebuild link databases
- Scan the database for broken links