Table of contents
In case you are new to SharePoint, please start with the below video Learn Sharepoint in 8 hours: -
This is a quick start FAQ for people who are new to SharePoint. We will warm up with some theory in the first two articles and then do some practicals on the same lines. I have written a 10 part series for SharePoint and I hope you will enjoy it. This is the first part from the series. Get warmed with the theory first and then the rest of SharePoint is a breeze. This article covers SharePoint basics and walks through how SharePoint works with ASP.NET.
What is SharePoint?
SharePoint helps team members to connect and exchange information in a collaborative manner. It helps to centralize enterprise information for efficient functioning. For instance, below is how a normal organization works. Files and documents scattered in individual PCs and data transported according to custom protocols. The communication protocol for sending data is person dependent. Some would use email, some would share a drive, etc.
SharePoint unites all documents into one centralized place and unifies the data transport mechanism. To summarize, it is a central enterprise information portal.
What is WSS and MOSS?
Microsoft has divided SharePoint products into two parts. One is called WSS (Windows SharePoint Services) and the other is MOSS (Microsoft Office SharePoint Server). WSS is the platform in which MOSS is built. The WSS part is licensed through Windows 2003 Server and it does not cost anything. MOSS is a separate product by itself and needs licensing and it has a significant cost. WSS is good for small teams and small projects. MOSS has extra functionalities, in other words, Value Added Services. So the choice between WSS and MOSS will depend on the budget of the project and the VAS provided by MOSS.
How does WSS actually work?
WSS does not work in an isolated fashion. It needs help from two more products: IIS (Internet Information Server) and SQL Server.
How does WSS work with IIS?
In order to understand how WSS works with IIS, we need to first understand the concept of HttpHandlers and HttpModules. If you are not aware of this, you can refresh about them here.
Using HttpHandlers and HttpModules, a request is first passed through the SharePoint runtime and then passed to the ASP.NET runtime (aspnet_isapi.dll).
If you open the web.config file of a WSS enabled IIS web application, you can see the application runtime handlers and modules.
<add verb="GET,HEAD,POST" path="*"
Version=220.127.116.11, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
We have highlighted the application runtime module.
Microsoft.SharePoint, Version=18.104.22.168, Culture=neutral,
What is site and site collection?
SharePoint is all about enterprise data. When we talk about enterprise data, it looks as shown in the figure below. In other words, grouping and sub grouping of data.
SharePoint extends the IIS web application structure to accommodate the above defined data structure using site and site collections. We will see in the later sections how to create site collections.
What is the main advantage of using site collections?
As said previously, SharePoint is all about data and data should be properly authenticated / authorized to users. By defining the structure in site and site collection, we can define roles and responsibilities according to data. For instance, in the above figure, we will assign all HR users to the payroll, recruitment, and assessment site. These users will not be assigned to the account site collection. Same holds true for accounts users.
So when you design your hierarchy of site and site collection, you need to keep in mind the enterprise hierarchy structure and design accordingly.
What is the use of SQL Server in SharePoint?
SQL Server is used to store content and configuration information. We have two types of databases: content databases and configuration databases. We had said previously that content is according to a site. So every site has its own content database. For instance, if we have a payroll site and recruitment site, they have their own content databases. Configuration database is for the entire site as they are used in web farms, site configuration, and a lot of other things which are generic and common across all sites.
What is the concept of a virtual path provider?
Any project has two parts: the standard and common part and the customized version. In ASP.NET, we have two types of pages for any project: one is the common ASPX pages and the other is customized ASPX pages. The common pages are stored on file directories while the customized versions of pages are stored in the content database.
In other words, we need an abstract mechanism by which we can render pages from the SQL Server content database and also from the virtual directories. This is achieved by using the virtual provider provided by SharePoint. So for all customized pages, the virtual provider reads from the content database and passes them to the ASP.NET runtime. For all common pages, it goes to the directory, parses it, and the passes it across to the ASP.NET runtime.
The virtual provider is an abstraction which loads the page from the content or the file system depending on whether it’s customized or common pages, and passes it to the ASP.NET runtime.
What is the concept of ghosting and unghosting in SharePoint?
In SharePoint, most site pages derive from templates. The custom pages only store the differences between them. The template is loaded in memory and applied to the custom pages on the fly. In other words, the template is stored in a cache. This definitely brings in performance and flexibility. Flexibility is in terms that when we change the template page, it’s applied to all custom pages. These pages are loaded from the file system. So pages which are loaded from the file system are termed as ghosted pages.
If the page data is loaded from the content database, it’s termed an unghosted page.
As a note, let me clarify the concept of document and content table as we are already trying to understand the concept of ghosting and unghosting. As we know, SharePoint stores all pages in the database. Looking from 50,000 feet, it has two tables: the document table which has the entry of the page and the content which has the source code of the ASPX page.
So when a page is requested, it first checks in the document table and then goes to the content table to load the page. If it does not find the data of the page, it goes to the file directory to load the page. This loading is done by the ASP.NET runtime itself. But if there is data present in the content table, then it’s loaded by the ‘safe mode’ parser.
What is the concept of Safe Mode Parser in ASP.NET?
As said in the previous section, there are two tables: document and content. If the page is stored in the content database, it’s loaded by the Safe Mode Parser which is a page parser provided by SharePoint. If there is no data found in the content, it’s loaded from the file directory by the ASP.NET runtime.
What is the concept of Site pages and Application pages?
Site pages are customized pages and are saved in the content database. So when you use the SharePoint designer to make custom changes, it saves the changes into the content database. If you want to make generic pages in a site collection which will be used by everyone, like for instance the ‘Settings.aspx’ page, then you need to use application pages.
In other words, Site pages are nothing but customized pages stored in content, while application pages are generic pages which will be used by all the sites in a site collection.
In part two, we will try to get hands on with SharePoint, create site collections, create application pages, and understand the concept of features.
Other Links for SharePoint