Saturday 9 January 2021

Sitecore Interview Questions and Answers Part 2

 

1.      What is standard values in Sitecore?

Standard values were first introduced in Sitecore 5.3 to overcome some of the issues experienced with the predecessors of standard values – “Masters”. In Sitecore 6 masters was completely removed and the concept of standard values took over.

Standard values are a way of having default or fallback values for fields in Sitecore, meaning that when items are created, you can specify a field value that should be used by default. This does not only account for custom fields you build, but also standard fields in Sitecore such as presentations and insert options. This means that you can specify a value on the standard values, and when you create a new item which inherits from this template, it will by default use the values specified on the standard values.

2.      What is standard fields?

Sitecore provides few common fields for all items, these fields are called standard fields.

These fields can help you to:

·         Set icon of your Sitecore item

·         Check last item update status

·         Check the current status of item’s workflow

·         And many more…

3.      What is raw values?

Sitecore always stores field values as plain text in the appropriate Sitecore database (in the Value column of the Fields table).

In Sitecore, there are two ways of getting data out of a field – the raw value or the rendered value.

A field’s raw value is how the data is stored in the underlying database – for simple fields such as Single Line Text, there is no difference between the rendered and raw values; it’s just plain text.

This is not the case for more complex field types, such as General Link, Image, or Rich Text.

Take the raw value of a General Link field, for instance – if you enable raw values in the Content Editor (by clicking the View tab and ticking Raw values) and look at an item with a General Link field, you will see that the value stored in the database is custom XML:

<link linktype="internal" url="/Home/History/Old activities" target="" id="{CB2BC023-C9CF-4086-811E-0952ADFA5AF9}" />

4.      Which field contains item sort value?

Sortorder field under Appearance section contains item sort value. Decrease sort value to move up and increase sort value to move down item in tree.







5.      What is Layout in Sitecore?

Whenever user sends any request to Sitecore through a URL, Sitecore resolves that item by generating visual representation of that item. Layout provide the basic structure of this visual representation. Layout is container which contains different component of the page.

6.      What is difference between droplist and droplink field type?

By the time you reach to this question, you must be knowing that Sitecore always stores field values as plain text in the appropriate Sitecore database (in the Value column of the Fields table).

Sitecore has two different types of drop-down lookup fields that are available: Droplist and Droplink. Both of them function essentially the same way: they point to a Sitecore data item and list its children in a drop-down list for a content editor. This is a great tool because it allows you (as a data designer) to build a nice set of lookup values and not worry that editors will fat-finger these values.

But why are there the two, and what’s the difference between them?

Droplist data type only stores the string value of the item that was chosen by the content editor, while Droplink stores the GUID of the item that was chosen by content editor.





So you may be wondering – so what?

This will cause a problem when you want to read selected item’s field value. If you use droplist, you are not going to get selected item and will get only selected item’s string value. But if you use droplink, you can easily get selected item and then can read any field value of that selected item.

7.      What is pipeline?

A lot of things happens when you request a page in Sitecore which is handled by pipelines. Pipelines define a sequence of processor that implement different functions such as handling page requests, to uploading files and saving items through the UI. If you have a series of tasks, which need to be performed to accomplish a task, then a pipeline may be the way to go.

Each processor in a pipeline contains a method named Process() that accepts a single argument and returns void. This method should return immediately if the processing context is not relevant to the processor. A processor can abort the pipeline, preventing Sitecore from invoking subsequent processors.

Sitecore separates the pipelines into two groups: those defined within the /configuration/sitecore/pipelines and /configuration/sitecore/processors elements in the web.config file. In general, those defined within the /configuration/sitecore/processors define pipelines that operate for UI requests and can interact with the user. Those defined with the /configuration/sitecore/pipelines tend to define system processes.

8.      What is processor?

Each step in pipeline is called a ‘processor’. The sequence of processors within a pipeline is defined in web.config file. Each Processor contains a unique operation and all these steps together create a pipeline.

<pipelines /> define system process such as initialize Sitecore application, load content editor warning. <processors /> define UI process such as copy item, delete item, drag item and so on.

9.      Under which pipeline Sitecore context gets defined?

<httpRequestBegin> under configuration/sitecore/pipelines in web.config pipeline defines Sitecore context.

10.  How many processors are there under <httpRequestBegin> pipeline?

By default there are 19 processors under <httpRequestBegin> pipeline but it may vary based on different modules you have installed in Sitecore.

For example: If you have installed Sitecore DMS then you will find 21 processors under <httpRequestBegin> pipeline.

Sitecore Interview Questions and Answers Part 1

 

1.      What is Sitecore?

Sitecore is very flexible Content Management System (CMS). It is one of the leading enterprise-level content management systems (CMS) using which you can create enterprise website and intranet portal website.

Sitecore was found in 2001 and it is built on Microsoft .NET platform. Sitecore also allows deployment via Microsoft Azure.

2.      Why should you use Sitecore?

Here are the top features of Sitecore CMS that separates it from other CMS:

·         It provides out-of-the-box flexibility and is highly customizable

With Sitecore you can create multi-language site with little effort

·         Provide personalized user experience and content variation features

·         E-commerce Services

·         It has out-of-the-box engagement automation and engagement analytics

·         Email Campaign Manager

·         Integration with Cutting Edge Technology

·         Highly Scalable

·         Improved Search Engine Optimization

·         User based and Role based Security

·         Over 350 free Sitecore Module available to use

·         Growing community

3.      What is core database?

This core database has two purposes:

·         The core database contains all Sitecore settings. It contains definitions for the Sitecore user interface (Content Editor, Page Editor, etc.). This is where you can add context menu option to the Content Editor or a new ribbon button to the Page Editor.

·         It contains the ASP.NET membership tables that drive authentication and security.

4.      What is master database?

The master database is the authoring database - it contains all versions of content. Whenever a new piece of content is created, edited or deleted it is stored here. This is the database that content authors interact with, and is the default database used by the Sitecore Content Editor.

5.      What is web database?

The web database contains the live content of the website. When a content editor publishes some content then it is copied from the master database to the web database. It is subset of the master database and optimized for size and speed.

6.      What is Item in Sitecore?

An item is a record in database. Items are basic building block of a Sitecore Site. An item may represent any kind of information, e.g. a piece of content, a media file, a layout etc. Items always have a name and ID that uniquely identifies the item within the database. Items have a template that defines which fields the item contains. An item represent a single version of piece of content is a single language.

An item can be retrieved from a database using Items.

7.      What is Template in Sitecore?

Sitecore uses data templates to define structures of item. Templates contain fields to represent individual elements. Each data template field has a type, such as Text, Image, Checkbox and various other field types.

8.      What is publishing?

By this time you are now aware with the fact that whenever you add, edit and delete any item in Sitecore, it will be stored in master database. Now in order to move this change to live website, you need to use publishing. Publishing is a process which will help you to copy updated items from master database to web database.

9.      Which are different types of publishing?

·         Republish

As name implies, it will publish every item no matter whether it is changed or not. It is intended to be used when you are publishing a new site first time. This is most time consuming publishing method as it blindly publish all items.

·         Smart Publish

This method works smartly by comparing each item in the master database with the item in web database. Sitecore maintains revision number for each item which gets changed whenever the item gets updated. By comparing this revision number with web database, it will create a list of updated items changes and will publish only those items changes. Even though this method is comparing each item, it is much faster than republish method.

·         Incremental Publish

Every time an item is changed, it is added to the publishing queue. This applies both to changes made through the Sitecore user interface and changes made programmatically. Doing an incremental publish will only publish the items in the publishing queue. Therefore only items that has been changed will be published and Sitecore does not have to do any comparisons to figure out which items has been changed. This way of publishing is therefore by far the fastest. Republish and smart publish do not use the publishing queue.

10.  What is versioning in Sitecore?

In Sitecore content authors have the ability to make a piece of content version able. Each version of an item begins as a replica of the original or of another version and are all stored in Sitecore. Previous versions operate individually and can be published as the active version of a content item instead of the most recent version. At any time an active version can be rolled-back to a previous version and vice versa.