Showing posts with label SharePoint Development. Show all posts
Showing posts with label SharePoint Development. Show all posts

Friday, April 21, 2017

SharePoint Feature Receivers

In SharePoint, a feature receiver is used to add event handlers. Feature receivers derive from SPFeatureReceiver.

The following events are useful when activating a feature:

FeatureInstalled – runs after feature installed

FeatureActivated – runs after feature activated

FeatureDeactivating – runs before feature deactivated

FeatureUninstalling – runs before feature uninstalled
 
Video on SharePoint Feature Receivers:

Element Manifest.xml File

In SharePoint the element manifest file gives instructions for when the feature is activated. Common items to do in a feature:

ClientWebPart – create a client webpart

ContentType – create a content type

CustomAction – create new link or menu command

Field – create a site column

ListTemplate – create a custom list type

Workflow – create a workflow template

WorkflowAssociation – associate a workflow template with a list
Video on Element Manifest.xml File:

Features in SharePoint

A SharePoint feature is a feature definition.

-          Allows for design and implementation

-          Step for creating a SharePoint solution

-          Features can include: links, menu items, list types, web-parts, application pages, content types, site columns, master pages, etc.

-          Features can also include event handlers – which need a feature receiver class to operate

-          Feature.xml is the feature manifest file. It provides metadata information about the feature.
 
Video on SharePoint Features:

SharePoint Farm Solutions


A farm solution is a special kind of code set used in SharePoint. Some items to be aware of:

-          It is used as a server side code which runs against the SharePoint server side object model.

-          It is only available for an on-premise deployment.

-          It is used for branding solutions, central administration customizations, application pages, custom services and timer jobs, etc.

-          A farm solution is deployed with:

Add-SPSolution   to upload the package

Install-SPSolution to deploy the solution package
Video on SharePoint Farm Solutions:


SharePoint Solution Package


A solution package is a deployment mechanism for code in regard to SharePoint.

-          The package allows for the reuse, deployment and versioning of code.

-          The package is a set of files that has a manifest that contains the needed installation instructions.

-          The package is a *.cab file with a *.wsp extension.

Note: sometimes it’s best to change the extension to a .zip so that the contents of the .wsp can be viewed.

-          The solution package can contain:

o   Features definitions

o   Images

o   Assemblies
Video on SharePoint Solution Packages:

Wednesday, February 15, 2017

SharePoint Root Directory Quick List


SharePoint Root Directory Quick List

The following are some core SharePoint root directories – these are common directories on a web front end and typically what type of files they contain in them:

C:\Programs Files\Common Files\Microsoft Shared\Web Server Extensions\

Then the last directory will be as follows – depending on the SharePoint version utilized:

14 = SharePoint 2010

15 = SharePoint 2013

16 = SharePoint 2016

 

The following are the common directories then the types of files in them:

/ISAPI – Web Services (*.svc, *.ashx and *.asmx)

/Resources  – Resource files (*.resx)

/TEMPLATE/ADMIN – Application pages used in central administration

/TEMPLATE/FEATURES – Feature definition files (*.xml)

/TEMPLATE/IMAGES – Images (*.gif, *.jpg and *.png)

/TEMPLATE/LAYOUTS – Application pages (*.aspx)

/TEMPLATE/LAYOUTS/1033/STYLES – CSS files (*.css)

/TEMPLATE/LAYOUTS\ClientBin – Silverlight components (.xap)

/TEMPLATES/Site Templates – Site definition files (onet.xml)

/TEMPLATE/XML – Custom field type definition files (fdltype.*xml)

 

View Video