In my first two blogs, we have understood how to install Sitecore and we have created a very basic site in Sitecore. So moving further, in this blog we will understand very fundamentals concepts of Sitecore. Its general behavior of human, we first try to implement things first then try to learn.
So very first question come in our mind What is Sitecore?
According to Wikipedia, Sitecore is a customer experience management company that provides web content management and multichannel marketing automation software. Sorry wiki..didn’t get you properly. So in very simple words, Sitecore is a company, who owns the software with same name as Sitecore, which is used for building websites in very short times. But How?
Sitecore is software based on Content Management System. Another heavy word…But don’t worry it’s not that heavy as it looks. Content Management System is like, just focus on the content of your website. Main benefit of CMS is, you can manage or change content of your website from anywhere anytime, all you need is an internet connection.
What is benefit of Content Management System?
Let’s consider an example. You own an ecommerce website, and you want to focus on local audience. For region A you want to showcase product p1,p2,p3 and for region B you want to showcase product q1,q2,q3 at same time. So with the help of Sitecore CMS you can easily personalize your content depending on different geo location.
Lets dive in into Sitcore technical concepts. On a broader level any website can be divided into two main category.
- Content or Data
- Presentation or Display (Look and Feel)
Data concepts focus on how Sitecore store data and process them while Presentation concepts describe how Sitecore display data.
Whenever we install Sitecore, Sitecore creates following database
- Analytics: Stores data which are required for analytics purpose. (We will study about this in details in our upcoming blogs)
- Core: We can say this database is the heart of Sitecore. All the settings, configuration required in Sitecore is stored here. As we proceed further, we will see the detail of this database.
- Master: Most used database of Sitecore with content point of view. This database stores all the content whether published or unpublished. In other term we can say this is our practice sheet.
- Web: This database store latest version of the published content. We can say this is the final sheet.
Everything in Sitecore is Item. These item can be of different type like media item, content item, layout item etc. 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.
Generally the home item is the root item of website. Say Demo is the name of our instance then request for http://demo/ will point to home item of Sitecore. (We can manage this root item setting from web.config file)
Similarly request for http://demo/product/mobile/i5 is pointing to a item which is stored at location Home/Product/Mobile/I5
Template and Fields
If we relate with SQL, template is like a SQL table, and fields are like column of table. Template defines the structure of item in Sitecore. For e.g. If we are going to create a template for employee, then its filed would be Employee First Name, Employee Last Name, Address etc. After creation of a template, we create item which are made from some template. To understand with respect to OOPs concept, we can say template is like Class, Filed are like Properties, and items are objects of class.
A filed of a template can be of various types. But the mostly used types are Single Line Text, Rich Text, Image Filed, Link Filed, Date etc. 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
Standard values are a way of defining default values i.e. whenever any items are created we can specify some default values to that item. There are various different tokens supported by Sitecore
: The name of the item
: GUID of the item
: GUID of Parent Item
: Name of Parent Item
: Current System Date in yyyyMMdd format
: Current System Time in HHmmss
: Date and Time yyyyMMddHHmmss
A layout is a highest level presentation assigned to any item. Why we are saying highest level, is because all the sublayouts and rendering are going to be placed on layout. With respect to .net, a Layout is a .aspx page or Web Page.
A syblayout is also a presentation assigned to any item but its not the highest level. With respect to .net, a sublayout is a web user control or .ascx file. For eg: Say our Home page item has three section, Header, Content and Footer. We will assign a Layout to that item and above that we will assign three Sublayout of Header, Content and footer respectively.