0 Comments

First of all, I would like to thank Gruden for sending me to the Sitecore Helix workshop. It’s a two days workshop, which delivers in-depth knowledge of the principles, conventions and guidelines governing solution architecture, recommended development practices, DevOps strategies and more.

 

If you are also interested in this course, you can find more details here.

 

James Hirka, Solutions Architect from Sitecore, is the presenter. I’m not going to cover all the course material here, but instead highlight some important concepts that are covered within the course.

image

 

I would like to start by proving some background about what is Helix.

  • Helix is a an official guideline, recommending a modular build for Sitecore solutions
  • Habitat is an example implementation of Sitecore, using the Helix principles.

Habitat is a great starting point of learning Helix.  You can find the Habitat solution on GitHub.

 

Sitecore Helix was derived from the concept of components in a component-based architecture; this was originally described in the book “Agile Software Development by Robert C.Martin”.  The word component refers to a module in Helix, this is really all the files, views, renderings, configuration etc. that make up a component (or module). 

 

How we define a module/component? There are two major principles:

Cohesion Principles – Granularity

The principles of component cohesion is for deciding how to partition classed into components

  • REP (The reuse/release equivalence principle)
    The granule of reuse is the granule of release

 

  • CRP(The common reuse principle)
    The classes in a component are reused together. If you reuse on of the classes in a component, you reuse them all.

 

  • CCP(The common closure principle)
    The classes in a component should be closed together against the same kinds of changes. A change that affects a component affects all the classes in that component and no other components.

and Coupling principles – Stability

The principles of component coupling is for defining the relationships between components.

  • ADP (Acyclic Dependencies principle)
    Allow no cycles in the component dependency graph.

 

  • SDP (Stable Dependencies principle)
    Dependant in the direction of stability

 

  • SAP (Stable-Abstraction principle)
    A component should be as abstract as it is stable.

Favour composition over inheritance

  • Avoid multipurpose fat interfaces
  • Think of interfaces as roles
  • Implement just the minimum interface to ensure that you only depend upon what is required
  • Only expose what is required by a specific client

 

Practice makes perfect

I hope I didn’t put you to sleep with this very technical topic, and the principles it covered, however if you would like to work through some excises and get familiar with the Helix principles, you can find some here.   

 

Recommended Readings

Apart from the Sitecore Helix official documentation, there are some good books listed below:

[1] https://www.amazon.com/Agile-Principles-Patterns-Practices-C/dp/0131857258

[2] https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882

[3] https://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215

0 Comments

image

The new version (5.6.0.12) of TDS has been released in March for supporting VS 2017, which is exciting news for Sitecore developers. However,  if you installed TDS version 5.6.0.12, you may receive an error message, some thing like “cannot modify an evaluated object originating in an imported file”. If you see this, it is likely because you have modified some of the TDS project properties, within the properties window.

I’ve raised this issue with the TDS support team and they have quickly turned around an update that resolves this issue, version 5.6.0.13. You can download this here.

3 Comments

Mozilla Firefox 52 ended support for Silverlight

image

Is it matter? Yes, as we all known that Sitecore App Center was built on top of Silverlight. Since Version 42.0 Google Chrome has already stopped the support for Silverlight ( Find more Details).  However, you can still use Silverlight in Mozilla Firefox with Silverlight PlugIn. If you open your Sitecore App Centernow in Firefox, you see that the Install Microsoft Silverlight badge is displayed. When you reinstall Silverlight, the issure still occurs (See screenshot below). This is because Mozilla has ended of all NPAPI plugins except for Flash in March 2017, when Firefox version 52 is released. See this article for details. 

image

Don’t Panic!

Firefox Extended Support Release (ERS) will continue support these plugin until early 2018. Let’s pray Sitecore is ready for this transition to happen. To download the ERS click here

image

After you installed, Sitecore App Center is back.

image

0 Comments

Continues Integration with TeamCity and Octopus Deploy

image

Since 2016, Sitecore has been promoting Sitecore Helix and encouraging all partners, and developers to follow the framework. The purpose of Helix is to make the modules easier to code, test and maintain.  If you want to stay ahead of the curve, then you should start to implement Helix for your clients. Practice makes perfect. The article is going to explain how to setup the auto-deployment with TeamCity and Octopus with Sitecore Helix solution.  There are two versions of Helix solution, one is using Unicorn, and the other is using TDS.  Today, I’m going to focus on the TDS version.

Before  I start I’m going to assume you are already familiar with TeamCity and Octopus.  If not, please read the official document for TeamCity and Octopus deploy first.

You might already be using continues delivery with TeamCity and Octopus, as this is not a new concept, However there are some new requirements for deploying Helix projects.

  • Build Order

As mentioned in the Helix Solution ReadMe file, Serializationn, SitecoreExtension, Assets, Dictionary and Indexing modules need to be deployed first, and followed by Foundation modules and then Feature modules.

image

  • Configuration Transform per feature projects

Also, given the fact that Helix is utilizing XDT transforms, we are going to use XDT transforms for configuring Content Management Server (CM) and Content Delivery Server (CD).

image

In order to achieve the above requirements, I have modified the original solution to support Sitecore Helix, using the steps below:

Step one

Creating a Nuspec File, includes all transforms.

Example:

You might notice that the transform file has applied a naming convention i.e. web.config.Forms.STAGING-CD.transform.  STAGING-CDis the environment as defined within octopus. This gives us the capability and flexibility to process the configuration transform based on the target environment, something that is difficult to achieve within most of Sitecore solutions, especially when you have multi-instance architecture (i.e. CD/CM). For more information on how Octopus transform configure files, please refer to the official documentation.

image

Step Two

Reconfigure TeamCity Steps

  • Install NPM
  • Run Gulp
  • Restore NuGet Pakage
  • Build Solution
  • Generate Nuget Package

image

After a successful build, you will get the artefacts similar to the ones shown below:

image

Step Three

Push package to Octopus

To achieve this, you will need to install the Octopus OctoPack PlugIn within TeamCity, the official documentation can be found here. Once you have installed the plugIn you can create release step as shown in below:

image

Step Four

As explained above, we are going to utilize octopus to transform the settings for each environment.  Example:

image

Step Five

Deploy the TDS packages in order.

In order to achieve this we need to: 

  • Update the TDS package, so it follows a naming convention that applies a numeric prefix i.e. 01.Sitecore.Foundation.Serialization.Master.scitems.update.  This ensures that the TDS packages will be listed in order, and subsequently installed in order.
  • Created a PowerShell script to install the TDS packages in alphabetical order.

Here is the result:

image

The above steps are all that are required to successfully deploying Helix Solution using Octopus, using TeamCity with a little help from PowerShell.

I hope you found this article useful.

0 Comments

I would like to share the experience of joining Sitecore Hackthon 2017 competition.  It’s a global  24 hours competition organized by Askshay Sura and supported by Sitecore.  This year there are 92 teams from 26 countries being represented.  

Azadeh, Budi and I,  as a team,  attended the competition last weekend and we created a Sitecore ChatBot. If you like us, please give me a thumb

https://www.facebook.com/walle.yuan/posts/10213259608590954?pnref=story

clip_image001

A chatbot is a service, powered by rules and sometimes artificial intelligence, that you interact with via a chat interface. The service could be any number of things, ranging from functional to fun, and it could live in any major chat product (Facebook Messenger, Slack, Telegram, Text Messages, etc.)

clip_image002

  • What it can do for business?

clip_image003clip_image004clip_image005

  • So, What Sitecore ChatBot does?

We utilized the Azure Chatbot service and integrated with Sitecore, so as to make the response more focused and relevant to the business. Business can launch the business to different communication channels in a sec. 

clip_image006

  • Videos we created about the technologies we were using

Part1: https://www.youtube.com/watch?v=mPR0pk-usBY …
Part2: https://youtu.be/UJrzGhjfpTo