07 May 2013

Sitecore Interview Questions Part -2

Hi,

Last time i started the series of Interview Questions for Sitecore, first article in this series which covers known questions available on internet, my next article is based on my own experience during the interviews. so tried to cover as many questions possible. Let's continue the list of interview questions for Sitecore:-

What are the top 8 Concept  of the Sitecore ?
We have divided top 8 concept of Sitecore into two subset first is Data and second is presentation. Sitecore is based on MVP patterns and here we separate Data Concepts and Presentation concepts clearly which give advantage of Re-use and better control over the content. This way of programing is contradiction to traditional ASP.NET based programming.

Data Presentation
Data Base Layout
Data Template SubLayout
Fields Rendering
Item PlaceHolder
In following question we discussed the Data Part only.

What is Database in context of Sitecore?
Sitecore store its all content / information in relational database available in market. By default Sitecore comes with Microsoft SQL based data base in form of .mdf and .ldf files which you may attach with you MS-SQL Instance. Sitecore also supports Oracle, MySQL, IBM DB2.
By default Sitecore have three database Core, Master and Web. Each have its own purpose and role to play.

What is Data Template / Template? Why we need to create Data template ?
Data Template in Sitecore have two purpose, first is they define the Data Structure for an Item. Second they also define how data is going to be edited and shown to business users in Sitecore Shell / Sitecore Content editor.
To do comparative study Data Template in Sitecore are similar to SQL Table in traditional programming world of programming where we create SQL Table Structure to store information. So it also means that as many information(Business Entities) we need to store we generally create those many SQL tables in traditional world. So same logic applies in case of Sitecore where we need to create those many data templates as many information we want to store and use in Sitecore.
Generally in Sitecore we don't create SQL Tables.

What is Fields ?
Fields are equivalent to the Columns\Tuples we create in SQL tables in traditional programming world. So collection of Fields are called Data Templates. Field is the smallest entity which define type of single value stored within the data template.

What is Field Types ?
When we create / add fields in the Data Template then we need to select the field type which basically define the type of value going to store in that particular field. In case of Sitecore we don't primitive data types like var char, int, float etc., But here we have field type like 'Single Line TextBox', 'Rich Text Box', 'Image', 'DropDownList' etc.,
As you notice these field types not only define what kind of data is allowed in field but how that field is going to render on the content editor.

Can you have custom field types ?
For most of the general requirement Sitecore has already provided enough field types. Still you for your own custom requirement you may create your own field types also.

What are the types of Data Template is available ?
Sitecore users create items using one of three template types: data templates, branch
templates, and command templates.
Data Templates form the framework around which items are built. They define fields used to control how data is entered and can inherit from other templates to enable reuse.
Branch templates—allow you to create a set of items rather than a single item at a time.
Command Templates—allow you to insert of items according to logic rather than predefined structures.

In Sitecore Multiple Inheritance of Data Template is possible, can you explain with example ?
A data template inherits the sections and fields defined on its base templates. You can see the base templates associated with a data template in the Inheritance tab in the Template Manager or Content Editor.
A data template can be based on any number of data templates, not just one. Occasionally more than one inherited template will contain the same field or field section. In this case, the UI will merge these fields or field sections to prevent duplication.

What is Standard Values in Sitecore ?
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.
To read more about standard Value or why masters are discontinued from Sitecore 6.0 onward please read this great article by Jens Mikkelsen 
I personally recommend to go through his complete blog as that is my one of the corner for reading about Sitecore.

How Data / means Items or other information related to it is exposed by Sitecore to you as Developer?
Sitecore use good things from two different world of Data Sources. Sitecore end of the day store all its information in relational world which is MS-SQL, oracle etc., But at time of exposing the same data it exposes and represent in Sitecore Shell as Hierarchical Data Source. Because of this Developer can use XSL to render the same data or use other XML based technology to navigate the data. Developer can also use the .net based InMemory Object collection of Data which is based on generics in .NET, which you may write normal foreach loop also or modern Linq to get you data.
 
To Read and able to answer all possible questions related to Data Template or in other words Data Definition you need to go through online PDF from Sitecore itself.

That's it for this post, please let me know if something i missed or written wrong, i will be grateful for your feedback and comment.
In next post we will talk about Presentation based interview questions.