Book Image

Sitecore Cookbook for Developers

By : Yogesh Patel
Book Image

Sitecore Cookbook for Developers

By: Yogesh Patel

Overview of this book

This book will get you started on building rich websites, and customizing user interfaces by creating content management applications quickly. It will give you an insight into web designs and how to customize the Sitecore architecture as per your website's requirements using best practices. Packed with over 70 recipes to help you achieve and solve real-world common tasks, requirements, and the problems of content management, content delivery, and publishing instance environments. It also presents recipes on Sitecore’s backend processes of customizing pipelines, creating custom event handler and media handler, setting hooks and more. Other topics covered include creating a workflow action, publishing sublayouts and media files, securing your environment by customizing user profiles and access rights, boosting search capabilities, optimising performance, scalability and high-availability of Sitecore instances and much more. By the end of this book, you will have be able to add virtually limitless features to your websites by developing and deploying Sitecore efficiently.
Table of Contents (20 chapters)
Sitecore Cookbook for Developers
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Useful tools for Sitecore developers


This section describes different tools available for Sitecore developers, useful from installation to deployment.

Sitecore Instance Manager

Sitecore Instance Manager (SIM) is an open source tool to manage your Sitecore instances locally. It's the best-suited tool to manage Sitecore instances while working on multiple Sitecore projects. It provides the following features:

  • Installing, locating, backing up, restoring, reinstalling, or deleting Sitecore products

  • Installing Sitecore modules and packages and exporting and importing Sitecore websites

  • Opening websites in the browser, opening Visual Studio projects, checking log files, stopping/starting application pools, and editing the host file

  • Providing an API and plugin engine so that you can extend it for any of your needs

You can download it from https://goo.gl/VG71PV.

Sitecore Rocks

Sitecore Rocks is a Visual Studio plugin and also available as a standalone application. It is aimed to be useful for developers for developing purposes in local environments. It helps content editing in all Sitecore databases, administrating different tasks, and so on without logging into the Sitecore client. You just need to configure your Sitecore instance once, which requires a data provider – Hard Rock Web Service (which it will install automatically), host, credentials, and location details.

It also provides different Visual Studio templates to create the Sitecore Rocks plugin and server components. It also helps developers in creating classes for commands, processors, rules, renderers, and so on from their predefined templates.

You can install this plugin from Visual Studio extensions or download it from http://goo.gl/pk2rzW.

Reflecting on Sitecore

There are many decompiling tools available to decompile or dissemble Sitecore and other .NET assemblies, such as Red Gate Reflector, ILSpy, dotPeek, and others. Dissembling becomes very useful to get the source code compiled into assembly files. Sitecore provides a vast architecture. Being an advanced developer, customizing or extending user interfaces or backend architecture needs a clear understanding of Sitecore APIs; for this, decompilers can be the best friend of developers. You can read more about reflecting on Sitecore at https://goo.gl/L9ZHKM.

Source control for Sitecore databases

Team Development for Sitecore (TDS) reduces your deployment time by allowing you to leverage a continuous integration or automated deployment strategy. It allows you to leverage source control, which means that all of the constant changes made during a usual project merge seamlessly. It also allows you to create an environment in which you can easily and quickly move code from your local environment all the way through your development workflow. It secures your changes among your team and throughout time by making sure that your work is properly controlled and maintained in source control. You can read more at https://www.teamdevelopmentforsitecore.com/.

Unicorn is an open source utility, designed to simplify the deployment of Sitecore items across environments automatically. It's a robust tool for developers working on dedicated Sitecore databases who want to version-control their item changes for backup, moving to other databases, deployments, and so on. You can read more about this at https://github.com/kamsar/Unicorn.

The Sitecore database comparer tool

Razl allows developers to have a complete side-by-side comparison between two Sitecore databases. You can compare Sitecore databases quickly, easily, and in an organized fashion. Razl allows you to find that one missing template, move it to the correct database, and not have to spend hours looking for what's wrong. You can read more at http://www.razl.net/.

Glass.Mapper

Glass.Mapper is a fully featured object-relational mapping (ORM) framework that's useful to improve your Sitecore development. It provides easier ways to read and write to fields, create parent-child and link relationships, search in Sitecore, perform ad hoc queries, map to and from standard and customized .NET types directly, map to both your custom interfaces and classes, and much more. It supports both MVC and Web Forms. It helps you stay away from repetitive code, but it comes with a limitation: it can affect performance if compared to native Sitecore APIs. You can read more at http://www.glass.lu/.

Continuous integration and deployment

Automated build and automated deployment play a vital role while working on multiple projects and giving quick deliveries. Apart from TDS, you have plenty of software available in the market; you can choose the best based on your project requirements:

  • Version control: Git, Apache Subversion (SVN), and Team Foundation Server (TFS)

  • Build server: TeamCity, Octopus Deploy, Jenkins, Bamboo, and CruiseControl.NET (CCNet)

  • Deployment server: TeamCity, Octopus Deploy, and Jenkins

Other products and modules

Apart from Sitecore Experience Platform (XP), there are many products and modules provided by Sitecore to integrate Sitecore with third-party applications or automating marketers' jobs, which become very useful in winning customers. You can download these products and modules from https://dev.sitecore.net/Downloads.