Wednesday, December 27, 2017

Sitecore 9 - Long Live Forms

A new Experience Forms module has finally been released.

We are familiar with the Web Forms for Marketers (WFFM) module which is provided with previous Sitecore releases. The new Sitecore Forms module is not just an upgrade of the existing WFFM modules, but it is a completely new module designed and developed from the ground up. Sitecore announced at SUGCON EU 2016 that they were beginning work on a new module, which is a complete revamp ground up rebuild of the module.

The goal for the WFFM was to provide content authors the ability to create web forms for their site with little to no development effort involvement.  Though the WFFM was seemed to achieve these goals but the process itself was clumsy and the module seemed to be error prone at most times. Also when more advanced scenarios was the need of the hour, WFFM lacked ability and had to be dropped at most times.  The new Sitecore Forms module targets most of the shortcomings which plagued WFFM. The Forms  module provides a nice and clean user interface with drag and drop capability for creating forms.  The module has support for wizards to allow data capture over multiple pages in sequence (something that was never possible with WFFM).  And finally,  the forms module is included in the Sitecore install, which means that we no longer need to install it as an add-on module.

The good thing here is, that the existing WFFM module has also been updated to work with Sitecore 9.0. So it should make upgrades easier and also we do not have to rework all your existing forms, fields, save actions and other custom actions immediately. But expect support for WFFM to be dropped in a near future.


Monday, December 25, 2017

Sitecore 9 - Configuration files redesigned

With Sitecore 9, Sitecore has redesigned the way configuration files are loaded and managed.

In Sitecore 9, the first thing we will notice post setup is that the App_Config\Include folder has no configuration files.  Instead there's a new file in the App_Config folder called Layers.config.
Below is a snap from the file -

<layers>
  <layer name="Sitecore" includeFolder="/App_Config/Sitecore/">
    <loadOrder>
      <add path="CMS.Core" type="Folder" />
      <add path="AntiCSRFModule" type="Folder" />
      ...
      ...
      <add path="PathAnalyzer" type="Folder" />
    </loadOrder>
  </layer>
  <layer name="Modules" includeFolder="/App_Config/Modules/" />
  <layer name="Custom" includeFolder="/App_Config/Include/" />
  <layer name="Environment" includeFolder="/App_Config/Environment/" />
</layers>

From the above snippet it becomes rather clear that Sitecore is creating a layered structure for the different configuration files, and  also these  layers are loaded in a specific order.

To begin with Sitecore loads all of the "Core" configurations first, and all these are maintained in a separate folder.  Next, any third-party modules will be loaded in the "Modules" layer.  Thereafter, any custom configuration would be loaded from the current empty "Include" folder as part of the "Custom" layer.  And lastly, any environment specific configuration gets loaded as part of the "Environment" layer.

This approach makes it much easier to keep all the different out of the box Sitecore configuration files separate from the custom configurations.  Also, since each configuration layer has a specific folder for it, this makes tracking any update easier, as well as also helps in maintainability and troubleshooting the different layers.

In addition to the above mentioned layered approach, Sitecore has also introduced the concept of role-based configuration.

Note - This also marks the end of the era of creating folders with a prefix of "z"  :-P

Role Base Configuration:

Role-based configuration allows us to assign any specific server role to an individual configuration node.  For example, we can define some configuration settings specifically for say a Content Management, Content Delivery or a Processing server without having to go through the erroneous and painful steps of enabling or disabling the various configuration files on each of these specific servers.  Further, we can also define your own custom configuration roles and assign the configuration information to those roles.  This role-based approach provides a lot of flexibility, while also allowing for consistent, repeatable and automated deployments.

Sitecore has also provided a new admin page (/sitecore/admin/showconfiglayers.aspx) that allows us to view all the defined configuration layers, config files included with each layer, the different configuration roles that has been defined, and allows us to define new roles.  It also provides us with the ability to select a specific role and preview the resulting configuration that would be generated for that type of server role.  This allows us to essentially validate any environment-specific configuration in a single development environment without having to actually deploy our configuration to another server.

Friday, December 22, 2017

Sitecore 9 - Sitecore Installation Framework (SIF)

With the release of Sitecore 9 - Sitecore has also release a new framework "Sitecore Installation Framework (SIF)", this new framework revamps the way Sitecore installations are done.

The SIF framework is built on top of Windows PowerShell, which provides an automated approach towards installing and configuring the Sitecore instances.  The framework can set up the databases, search indexes, web sites as well as perform all of other Sitecore configuration updates needed for the installation to work (e.g. setup IIS application pool).

Any configuration/settings needed are controlled by JSON files that define the different variables and parameters that go into your specific installation (e.g. database names, usernames and passwords, file paths, etc.). The framework extends and enhances the capabilities for the user to incorporate/automate all the other different updates they need to perform post Sitecore installation to meet demands around any specific provision such as security hardening etc.

The new Installation frame has one quite evident drawback for all users. The installation process is not going to be as easy/user friendly as the out-going Sitecore installers (SIM or the Sitecore installation executable) used to be.

So, though SIF is going to provides Power and Flexibility for a consistent, secure and automated deployment, it will require a bit of hands-on towards defining the different variables and parameters that go into a specific installation.