A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Monday, March 20, 2017

SharePoint Integration with IIS



Before discussing the Integration, we will discuss the architecture of SharePoint at the architecture level. The diagram represents the architecture of SharePoint and split into two halves. The Left-half is administrator world and the right-half is the end-user world. Everything in right half resides in SharePoint content database. Let's continue with some terminologies before goes into deep dive. 

Farm

A farm is a logical architecture or logical grouping of SharePoint servers that share common resources of SharePoint. It can be a single machine or more than one machine. The farm is differentiated on their tier levels. Might be possible Farm can be 1to N-tier. Installation can either be done at 1 machine to N. Most of the cases in production you have to choose at least 5-tier architecture for application Server, front-end Server, SQL, AD+DNS, Office Web App Server and Exchange; you can add more than one application server, Front-End etc at any level.

Configuration Database

Each farm is associated with a SQL server database called a configuration database. The SharePoint CONFIG database as SharePoint_Config created during SharePoint Products Configuration Wizard and is used by the central administration to manage all of your web applications, site collections, and service applications etc. Configuration Database co-located with the Central Administration database. Generally, you only have one instance of SQL server per farm, unless you cluster or mirror the instance. A SharePoint farm can only have one central administration database although you can host the central administration website on more than one server on your farm.


Site collection and Site

A site collection is a logical grouping of sites and a site is a container for information. In a site, we can have lists and libraries. A site collection is made up of one top-level site and all sites below it. The number of site collections you can have in a single web application depends on the capacity of your server infrastructure. 
For more information here is the link of Technet.


List and Library

A list is like an Excel worksheet just like rows and columns of data. A document library is just a special case of a list. We still have rows and columns of data, but each row is associated with a document. So we can store pictures, text files, web pages and all kind of documents. In-library others column except document filed called metadata of that library. A list has major versions only, can have attachments but not indexed, do not have Check-in/Check-out features and didn't open with explorer but in cased of library, files are directly in the library can't have attachments, have both minor (draft) and major (published) versioning, have Check-in/Check-Out, publishing libraries can use Page Layouts and Have Unique Document Ids out of the box.


SharePoint content database

Everything on the end user part (right-hand side) in the architectural diagram is stored in SharePoint content database. So, if we create a site within a site collection, we are adding an entry to a table in the database. If we create a list, again, we are adding entries into tables. If we add a document to a document library, that will also add an entry in the database.


Deployment mechanism of web application

A web application is just an extended IIS website, so when we create a web application, SharePoint creates an IIS website but modifies the WEB.CONFIG file, GLOBAL.ASPX file and creates some virtual directories which point to the SharePoint system folders.


Integration with IIS

SharePoint integrates with both IIS and ASP.NET, IIS websites are extended through the standard extension mechanisms built into ASP.NET. In SharePoint, integration with IIS is done at web application level. The files used by IIS are stored in \INETPUB\WWWROOT\WSS\VIRTUALDIRECTORIES\<PORT> and this port is used by the IIS website and the SharePoint web application.
The WSS part of the path refers to the “Window SharePoint services”. The folder of the web application at port 80 just has a GLOBAL.ASAX and WEB.CONFIG file. The default installation or the basic installation of SharePoint takes over port 80.


ASP.net and SharePoint Development

The default installation or the basic installation of SharePoint takes over port 80. So if you want to do SharePoint development as well as ASP.NET development then you will need to have a separate IIS website where you can host your ASP.NET applications. They will host their externally to SharePoint inside IIS.

SharePoint Central Administration Utility


When you create new web applications or when you are managing web applications you've to use the SharePoint Central Administration Utility (browser based) or STS Admin (classic way) or PowerShell commands instead of IIS Manager. Now there are certain cases where you do need to get into the IIS Manager like IISRESET etc.

The default installation path for SharePoint files used by IIS is C:\inetpub\wwwroot\wss\VirtualDirectories\80.




"12625" is the name of the port assigned to central admin web application. We can change the port of the newly created web application but it will not change the folder name. So, the name of the folder will remain unchanged. If we want to change the name of the folder too, then we will need to update is manual.

We can see in the screenshot that upon changing ports to the "9999", it changed the ports on IIS panel and in SharePoint but it did not change the folder name. SharePoint files are present in the SP system folders and SP databases.


The below screenshot is showing the website of central admin.

We can see the comparison of both folders. The 80-port directory contains files, GLOBAL.ASPX and WEB.CONFIG and we can also store the backups files of web config.

Screenshot presents the mapping between the web application and IIS manager. 

Now create a new web application using SP central administration, click “New”, remove GUID from DB Name, specify the port number and click OK. After that a create the site collection. The web application is now added to SharePoint central administration. In Application Pools inside the IIS Manager new application pool would be created and virtual directories in contents tab.

Authors [Ali Mamoon, Mujahid Hafeez]

Tuesday, February 21, 2017

PnP PowerShell overview

SharePoint Patterns and Practices (PnP) contains a library of PowerShell commands (PnP PowerShell) that allows you to perform complex provisioning and artifact management actions towards SharePoint. The commands use CSOM and can work against both SharePoint Online as SharePoint On-Premises. Read more


https://msdn.microsoft.com/en-us/pnp_powershell/pnp-powershell-overview

Friday, February 17, 2017

Attach ECB menu on another column instead of Title column in SharePoint list using Sharepoint Designer


Go to SharePoint designer and open the site ->Your List->Your View

Find all FieldRef in <ViewFields> tag. Then add below attributes to desire FieldRef like this code

<FieldRef Name="DateColumn" ListItemMenu="TRUE" linkToItem="TRUE"/>'


If you want to remove existing ECB menu then remove the following code and save it.

<FieldRef Name="LinkTitle"/> 

Wednesday, January 25, 2017

SharePoint PnP JavaScript Core Library v2.0



The SharePoint Patterns and Practices JavaScript Core Library was created to help developers by simplifying common operations within SharePoint and the SharePoint Framework. This is open source, community driven library with contributions cross different organizations and teams. Currently it contains a fluent API for working with the full SharePoint REST API as well as utility and helper functions. This takes the guess work out of creating REST requests, letting developers focus on the what and less on the how. PnP JS Core library can be used in SharePoint Online or in on-premises. It's a great library to be used with SharePoint Framework customizations, but it can be also used using classic development models, like with Script Editor Web Part or when you embed JavaScript to SharePoint using User Custom Actions.


https://dev.office.com/blogs/sharepoint-pnp-javascript-core-library-v20