SharePoint – Azure Platform

SharePoint – Azure Platform ”; Previous Next In this chapter, we will be covering the Microsoft Azure Platform. Microsoft Azure is Microsoft’s cloud platform technology, which is in itself a very powerful technology. It is not just a place to deploy your code, but it is a whole set of services exists that you as a developer can use in your SharePoint solution development. Cloud Computing To understand Microsoft Azure, you must first know a bit about the cloud. Cloud computing is all about leveraging the Web as a set of resources for the development and deployment of your solutions. Traditionally, cloud computing has been defined as categories of services. They are − Infrastructure as a Service (IAAS) Platform as a Service (PAAS) Software as a Service (SAAS) Each one of these categories is different in the context of development. For instance, you might think − IAAS as hosted virtual machines (VMs) you manage remotely. PAAS as where you deploy code, data, binary large objects (BLOBs), web apps, and other application artifacts to a cloud-based environment (such as Windows Server 2012 R2 and IIS). SAAS as subscription-based services that you can sign up to use, for example, Office 365. Although these three categories of services dominate the way in which the cloud is characterized, the cloud has four generally accepted pillars − Pool resources with other cloud users. Manage your own services and apps through the management portal. Apps and services can grow and contract with your business needs. Pay for only what you use in regards to the cloud. Azure Platform Overview The Microsoft Azure platform is composed of many different services. You can leverage them in your application design, deployment, and management such as Data, Service, and Integration, which is the Client layer in any application that consumes the services within Microsoft Azure. Data Layer In Data layer there are number of different types of data storage mechanisms or features that map directly to data storage which contains both non-relational and relational. Non-relational Feature The non-relational storage features enable you − To store assets such as virtual machine images or images or videos in Blobs Create non-relational tables Manage message queues along a service bus, and manage data caching in your distributed applications Relational Feature The relational data features are as follows − The core Azure SQL Database, which is the cloud version for the on-premises SQL Server Reporting services (SQL Reporting) The ability to stream near real-time data streams from data transactions (Stream Insight) Services Layer The Services layer contains a number of default services that you can use when building your solutions, ranging from Media Services to core Cloud Services such as − Creating websites Worker role classes Leveraging Hadoop on Microsoft Azure to process Big Data requests For many of these services, you can use baked-in functionality and a set of APIs within your application. For example, if you want to build a multimedia learning solution, you could leverage the Media Services − To upload WMVs Transcode them to MP4s Save them to BLOB storage Create a public URL for access and then stream them from Microsoft Azure Integration Layer The Integration layer contains some fundamental services such as − Geo-replicated content delivery network (CDN) Traffic Manager Virtual Private Network, which enables you to connect a virtual machine to your on-premises system Workflow and business process and integration services All of these capabilities enable you to integrate systems or secure them. Azure Apps Microsoft Azure is not just about services. Azure is an ever-evolving cloud platform that has a set of tools and SDKs that enable you to get started with the developing of cloud applications quickly. To start with Microsoft Azure you need the following − Visual Studio latest Microsoft Azure subscription Microsoft Azure subscription Step 1 − Let us have a look at a simple example in which we will deploy our web application to Microsoft Azure by creating a new ASP.NET MVC application. Step 2 − Click Ok and you will see the following dialog box. Select MVC template, check Host in the Cloud checkbox and then click OK. Step 3 − When the Configure Microsoft Azure Web App Settings dialog appears, make sure that you are signed in to Azure. If you are not signed in, then first sign in. You can see the default name, but you can change the Web App name. Step 4 − Enter the desired information as shown below. Select Create new server from the Database server dropdown list. Step 5 − You will see the additional field. Enter the Database server, username and password and click Ok. Once the project is created, run you application and you will see that it is running on localhost. Step 6 − To deploy these applications to Azure, right-click on the project in solution explorer and select Publish. Step 7 − You will see the following dialog box. Click the Microsoft Azure Web Apps. Step 8 − Select your application name from the Existing Web Apps and click OK. Step 9 − Click the Validate Connection button to check for the connection on Azure. Step 10 − Click Next to continue. Now you will see that the connection string is generated for you already, by default. Step 11 − Click Next to continue. Step 12 − To check all the files and dlls, which we will be publishing to Azure, click Start Preview. Step 13 − Click Publish to publish your application. Once the application is successfully published to Azure, you will see the message in output window. You will also see that your application is now running from the cloud. Now let us go to the Azure portal again and you will see the app here as well. SharePoint Apps and Microsoft Azure SharePoint and Microsoft Azure are two sizeable platforms unto themselves. SharePoint is one of Microsoft’s leading server productivity platforms or the collaborative platform for the enterprise and the Web. Microsoft Azure

SharePoint – Client Object Model

SharePoint – Client Object Model ”; Previous Next In this chapter, we will take a look at the Client Object Model or CSOM. This was one of the two APIs, for building remote applications that were added to SharePoint 2010. One of the design goals of the Client Object Model was to mimic the Server Object Model as much as possible, so there would be a shorter learning curve for developers already familiar with doing development on the Server side. The heart of the Client Object Model is a web service called Client.svc, which lives in the _vti_bin virtual directory. We are not supposed to communicate directly with Client.svc, but we are given three proxies or entry points, which we can use. They are − .NET Managed code. JavaScript. JavaScript. The code communicates with these proxies and then these proxies eventually communicate with the web service. Since this is a remote API and communication is done with SharePoint via web service calls, the Client Object Model is designed to allow us to batch up commands and requests for information. .NET Managed code The two core assemblies for the .NET Manage Implementation are − Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll. Silverlight code The assemblies for the Silverlight implementation live in TEMPLATELAYOUTSClientBin. The assembly names also start with Microsoft.SharePoint.Client. For all assemblies but one, the assembly name ends in Silverlight. The two core assemblies for the Silverlight implementation are − Microsoft.SharePoint.Client.Silverlight.dll Microsoft.SharePoint.Client.Silverlight.Runtime.dll JavaScript The JavaScript implementation on the Client Object Model lives in the TEMPLATELAYOUTS folder underneath the SharePoint System Root. The JavaScript library names all start with SP. The three core libraries are SP.js, Sp.Runtime.js, and SP.Core.js. The Client Object Model is expanded in SharePoint 2013. Retrieve Resources with Load using .NET Let us look at a simple example in which we will use the managed implementation of the Client Object Model using Windows forms application. Therefore, first we need to create a new project. Step 1 − Select Windows Forms Application in the middle pane and enter name in the Name field. Click OK. Step 2 − Once the project is created, let us add one list box and one button as shown below. To use the Client Object Model, we need to add a couple of assembly references. Right-click on the References and choose Add Reference. Step 3 − Select Extensions in the left pane under Assemblies. The two core assemblies for the managed implementation of the Client Object Model are Microsoft.SharePoint.Client and Microsoft.SharePoint.Client.Runtime. Check these two options and click OK. Now double-click the Load button to add the event handler as given below. using Microsoft.SharePoint.Client; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ClientObjectModel { public partial class Form1 : Microsoft.SharePoint.Client.Form { public Form1() { InitializeComponent(); } private void loadBtn_Click(object sender, EventArgs e) { using (var context = new ClientContext(“http://waqasserver/sites/demo”)) { var web = context.Web; context.Load(web); context.Load(web.Lists); context.ExecuteQuery(); ResultListBox.Items.Add(web.Title); ResultListBox.Items.Add(web.Lists.Count); } } } } The entry point into the Client Object Model is the client context. It is the remote of client version of the SPContext object. This is a disposable type, so it is wrapped in a using statement. We pass the URL the SharePoint site in ClientContext. So now, we have our context. We need an object to represent the current site so that is var web = context.web. Note − Remember, this object is just an empty shell, so we need to load the web objects by using context.load and pass the web object. This indicates that we want web objects properties to be populated in the next batch retrieval. Next, we need to call context.ExecuteQuery and that actually kicks off the batch retrieval. We retrieve the property values from the server and add to list box. When the above code is compiled and executed, you will see the following output − Click the Load button and you will see that we get both, the title and count of the lists. It enables our project setup to use the Client Object Model to check the loading resources using the load method. Print Page Previous Next Advertisements ”;

SharePoint – Features & Elements

SharePoint – Features & Elements ”; Previous Next In this chapter, we will take a look at features and elements. Features are in some ways the component model in SharePoint. They allow you to define logical units of functionality. For example, you might want to have the ability within a site − To create a list with a specific schema, Have a page that will show the data from that list, and then Have a link or a menu option somewhere within the site to navigate to that page. You could create a feature, which defines that logical grouping of functionality. The individual pieces of functionality are defined by elements. So there would be an element which − Creates the list and sets the schema. Provisions the page into your SharePoint site, and Creates the menu option or the link. The feature defines the unit and then the elements define the individual pieces of functionality inside of that unit. We discussed about the three kinds of elements − A list instance to create a list. A module to provision a page. A custom action to create a menu option or a link. However, there are many other kinds of elements that can be created within SharePoint. Another important concept to understand about features is that of activation and deactivation. For example, if an end user wants the above-mentioned functionality to be added to his site, he would activate the corresponding feature that would create the list, add the menu option or link, and provision the page into their site. Later he could deactivate the feature to remove the functionality. It is important to note that on deactivation of a feature, some elements are automatically removed. For example, SharePoint would automatically remove the menu option or link, which is defined by a custom action. Others are not removed automatically. Therefore, in our case, the list instance and the page would not be removed automatically. Hence, as a developer, you need to understand what elements get removed automatically and which ones do not. If you want to remove the ones that do not get removed automatically, you can write in code in a feature receiver. Let us look at the working with features and elements. We will start with the end users view of features. Step 1 − Open your SharePoint site. Step 2 − To go to the Site settings, you have two links that enable you to manage features. The first link Manage Site features is under Site Actions, which enables you to manage site scope features. The other link Site collection features under Site Collection Administration, which enables you to manage site collection scope features. Step 3 − If you click on either of these links, you will be taken to a page, which shows the currently active and inactive features. For each of the features, you have an option to activate or deactivate the feature. Let us look at a simple example by creating a new SharePoint Solutions Empty Project. Step 1 − Let us call this FeaturesAndElements and click OK. Step 2 − Specify the site you want to use and select the Deploy as a farm solution option and then click Finish. The first thing we want to create is the feature. In the Solution Explorer, you can see a Features folder, which is currently empty. Step 3 − Right-click on the Features folder and choose Add Feature. It creates a Feature named Feature1, and it opens up the Feature designer. The default Title is the title of project, plus the title of the feature. Step 4 − Rename the feature from Feature1 to Sample. Title and Description are what the user sees in the page where they activate and deactivate the features. Set the Title to Sample Feature and the Description to Adds the Contacts list and the page is used to view the list. The other thing we need to set is the Scope of the feature, which is the activation scope. It can be Farm, a WebApplication, a Site collection or a Site. In this case, we are going to provision a list and a page. Since, both live in a SharePoint site, so we will pick Web here. Step 5 − Let us start adding features in our elements. The first element will be the list and we will create a contacts list. Right-click on your project and choose Add → New Item… Step 6 − Select List in the middle pane and enter Contacts in the name field. Click Add. Step 7 − You will see the List Creation Wizard. Create a list called Contacts based on the Contacts list. Click Finish to create the list or at least create the element, which will eventually create the list. Given below is the screenshot of the list designer. Step 8 − This designer is just an XML editor. Open the file Elements.xml under Contacts and add the following data. <?xml version = “1.0” encoding = “utf-8”?> <Elements xmlns = “http://schemas.microsoft.com/sharepoint/”> <ListInstance Title = “Contacts” OnQuickLaunch = “TRUE” TemplateType = “105” FeatureId = “00bfea71-7e6d-4186-9ba8-c047ac750105” Url = “Lists/Contacts” Description = “”> <Data> <Rows> <Row> <Field Name = “ID”>1</Field> <Field Name = “Last Name”>Anders</Field> <Field Name = “First Name”>Maria</Field> <Field Name = “Company”>Alfreds Futerkiste</Field> <Field Name = “Business Phone”>030-0074321</Field> </Row> <Row> <Field Name = “ID”>2</Field> <Field Name = “Last Name”>Hardy</Field> <Field Name = “First Name”>Thomas</Field> <Field Name = “Company”>Around the Horn</Field> <Field Name = “Business Phone”>(171) 555-7788</Field> </Row> <Row> <Field Name = “ID”>3</Field> <Field Name = “Last Name”>Lebihan</Field> <Field Name = “First Name”>Laurence</Field> <Field Name = “Company”>Bon app”</Field> <Field Name = “Business Phone”>91.24.45.40</Field> </Row> <Row> <Field Name = “ID”>4</Field> <Field Name = “Last Name”>Ashworth</Field> <Field Name = “First Name”>Victoria</Field> <Field Name = “Company”>B”s Beverages</Field> <Field Name = “Business Phone”>(171) 555-1212</Field> </Row> <Row> <Field Name = “ID”>5</Field> <Field Name = “Last Name”>Mendel</Field> <Field Name = “First Name”>Roland</Field> <Field Name = “Company”>Ernst Handel</Field> <Field Name = “Business Phone”>7675-3425</Field> </Row> </Rows> </Data> </ListInstance> </Elements>

SharePoint – Data

SharePoint – Data ”; Previous Next In this chapter, we will be covering one of the most common tasks of SharePoint i.e. interacting with the various data sources such as lists or document libraries. A great thing about SharePoint is that you have a number of options available for interacting with data. Some examples are Server Object Model, Client-Side Object Model, REST services etc. Before you can do anything with SharePoint programmatically, you need to establish a connection and context with your SharePoint site. However, for this we need SharePoint on Premises, which can be installed on Window Server. You need to add reference in your project to Microsoft.SharePoint.dll or Microsoft.SharePoint.Client.dll. With the appropriate references added to your project, you can then begin to set the context and code within that context. Let us have a look at a simple example. Step 1 − Open Visual Studio and create a new project from File → New → Project menu option. Step 2 − Select Windows from Templates → Visual C# in the left pane and choose Console Application in the middle pane. Enter the name of your project and click OK. Step 3 − Once the project is created, right-click the project in Solution Explorer and select Add → References. Step 4 − Select Assemblies → Extensions in the left pane and check Microsoft.SharePoint in the middle pane and click OK. Now right-click the project again in Solution Explorer and select Properties. Step 5 − Click the Build Tab in the left pane and uncheck the Prefer 32-bit option. Step 6 − Now go back to the Program.cs file and replace it with the following code. using Microsoft.SharePoint; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SharePointData { class Program { static void Main(string[] args) { using (var site = new SPSite(“http://waqasserver/sites/demo”)) { var web = site.RootWeb; Console.WriteLine(web.Title); var lists = web.Lists; foreach (SPList list in lists) { Console.WriteLine(“t” &plus; list.Title); } Console.ReadLine(); } } } } Note − In the above code first created a new SPSite object. This is a disposable object, so it is created within a using statement. The SPSite constructor takes in the URL to the site collection, which will be different in your case. The var web = site.RootWeb will get the root of the site collection. We can get the lists using web.Lists and print the title of the list items. When the above code is compiled and executed, you will see the following output − SharePoint Tutorials appdata Composed Looks Documents List Template Gallery Master Page Gallery Site Assets Site Pages Solution Gallery Style Library Theme Gallery User Information List Web Part Gallery Print Page Previous Next Advertisements ”;

SharePoint – Server Object Model

SharePoint – Server Object Model ”; Previous Next In this chapter, we will take a look at the SharePoint Server Object Model. You use the SharePoint Server Object Model when you are writing code that will run inside the context of SharePoint. Some common examples would be the code-behind in a page or a web part, event handlers behind a feature or a list, timer jobs etc. Features of Server Object Model Following are the key features of Server Object Model You can use the Server Object Model if you are programming an ASP.NET application inside the same application pool that is used by SharePoint. Server Object Model can be used if you are developing a client application such as console or Windows forms or a WPF app that will run on a SharePoint server. You cannot use the Server Object Model to connect remotely to a SharePoint Server. When you want to use the Server Object Model, you refer to the Microsoft.SharePoint assembly. There are other assemblies, which make up the Server Object Model, but Microsoft.SharePoint is the main one. The core types that you will use most commonly map to the components that you use as an end user, so things like site collections, sites, list, libraries, and list items are represented by the types SPSite, SPWeb, SPList, SPDocumentLibrary, and SPListItem. The type and the Server Object Model that represents a site collection is SPSite and the type that represents a SharePoint site in the Server Object Model is SPWeb. Therefore, when you go from the end user terms to the developer terms, you will just have to do that mental mapping. Now when you first start using SharePoint, it can be confusing because site is so overloaded and it means opposite things in the end user and developer vocabularies, not to mention the web vocabulary. Let us have a look at a simple example of Server Object Model. Step 1 − Open Visual Studio and create a new project from File → New → Project menu option. Step 2 − Select Windows from Templates → Visual C# in the left pane and choose Console Application in the middle pane. Enter the name of your project and click OK. Step 3 − Once the project is created, right-click the project in Solution Explorer and select Add → References. Step 4 − Select Assemblies → Extensions in the left pane and check Microsoft.SharePoint in middle pane and click Ok button. Now right-click again the project in Solution Explorer and select Properties. Step 5 − Click the Build Tab in the left pane and uncheck the Prefer 32-bit option. Step 6 − Now go back to the Program.cs file and replace it with the following code. using Microsoft.SharePoint; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SharePointData { class Program { static void Main(string[] args) { using (var site = new SPSite(“http://waqasserver/sites/demo”)) { var web = site.RootWeb; Console.WriteLine(web.Title); var lists = web.Lists; foreach (SPList list in lists) { Console.WriteLine(“t” + list.Title); } Console.ReadLine(); } } } } Note − In the above code first created a new SPSite object. This is a disposable object, so it is created within a using statement. The SPSite constructor takes in the URL to the site collection, which will be different in your case. The var web = site.RootWeb will get the root of the site collection. We can get the lists using web.Lists and print the title of the list items. When the above code is compiled and executed, you will see the following output − SharePoint Tutorials appdata Authors Composed Looks Contacts Course Documents Courses Documents List Template Gallery Master Page Gallery Site Assets Site Pages Solution Gallery Style Library Theme Gallery User Information List Web Part Gallery You can see that these titles are Solutions Gallery, the Style Library, Form Templates. These are lists that are used internally by SharePoint. Therefore, instead of displaying all the lists, maybe you only want to show the lists that the users would normally see. Hence, instead of getting the entire list collection, we want to get all the lists that are not hidden. We can do that using a link query as given below. using Microsoft.SharePoint; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ServerObjectModel { class Program { static void Main(string[] args) { using (var site = new SPSite(“http://waqasserver/sites/demo”)) { var web = site.RootWeb; Console.WriteLine(web.Title); var lists = from SPList list in web.Lists where list.Hidden == false select list; foreach (SPList list in lists) { Console.WriteLine(“t” + list.Title); } Console.ReadLine(); } } } } When the above code is compiled and executed, you will see the following output − SharePoint Tutorials Authors Contacts Course Documents Courses Documents Site Assets Site Pages Style Library You can see that this will give us back all the lists that are not hidden. Let us have a look at another simple example in which we will also display some information about the list items. using Microsoft.SharePoint; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ServerObjectModel { class Program { static void Main(string[] args) { using (var site = new SPSite(“http://waqasserver/sites/demo”)) { var web = site.RootWeb; Console.WriteLine(web.Title); var lists = from SPList list in web.Lists where list.Hidden == false select list; foreach (SPList list in lists) { Console.WriteLine(“t” + list.Title); var items = list.Items.OfType<SPListItem>().Take(5); var isDocLib = list is SPDocumentLibrary; foreach (SPListItem item in items) { var value = isDocLib ? item.Name : item.Title; Console.WriteLine(“tt” + value); } } Console.ReadLine(); } } } } When the above code is compiled and executed, you will see the following output − SharePoint Tutorials Authors Muhammad Waqas Mark Upston Allan Bommer Andy Onian Contacts Waqas Upston Bommer Course Documents Sample1.docx Sample2.docx Sample3.docx Courses SharePoint Tutorials C# Tutorials ASP.Net Tutorials NHibernate Tutorials Documents Site Assets Site Pages Home.aspx How To Use This Library.aspx Style Library List Data When you first create a list, it always has a title column.

SharePoint – Capabilities

SharePoint – Capabilities ”; Previous Next In this chapter, we will be covering the default set of capabilities (or features) built into SharePoint that enables you to take advantage of the platform without doing any development. You can use or extend these core capabilities when building your Apps. Microsoft has historically referred to these capabilities as workloads. These workloads provide a way to talk about the different capabilities of SharePoint coming together. You should see these workloads as representing not only a core set of related applications but also as opportunities for your application development. Following are the workloads, which were added in SharePoint 2010 − Sites − Representing the different types of sites available for use and the features within these sites. Communities − Representing the community and social features such as blogs and wikis. Content − Representing core enterprise content management features. Search − Representing the search-driven features. Insights − Representing business intelligence features such as KPIs. Composites − Representing the ability to integrate external applications by using, for example, Business Connectivity Services. SharePoint 2013 – Capabilities In SharePoint 2013, Microsoft has extended the capabilities to add more features and provide tighter integration. Following are the core capabilities for SharePoint 2013 − Capability Native Features Example Extensibility Sites Sites is where you will find the collaborative aspects of SharePoint. Sites contain an abundance of features, including the capability to create, store, and retrieve data, and manage, tag, and search for content, documents, and information. You also have connectivity into the Microsoft Office 2013 client applications through the list and document library. Sites, site templates, Apps for SharePoint, workflow, master pages, site pages Social Provides social and social networking capabilities, newsfeeds, and profile searching and tagging, along with the capability to search, locate, and interact with people through their skills, organizational location, relationships, and rating of content. Search customization, rating and tagging capabilities, blogs, wikis, metadata tags Content Contains the capability to explore, search, and manage content using Web pages, apps, workflow, or content types. Apps for SharePoint, workflows, Word or Excel Services Search The ability to search content inside and outside of SharePoint in a rich and dynamic way with real-time document views through Office Web Apps. In addition, the integration of information in structured database systems and on-premises or cloud-based LOB systems such as SAP, Siebel, and Microsoft Dynamics. SharePoint Search, Search customization, Business Data Connectivity (BDC) Insights Predominantly about BI and support, for example, the capability to integrate Microsoft Access into SharePoint; leverage Excel and SQL Server to access and display data on a Web page; enable the use of dashboards and key performance indicators (KPIs) to transform raw data into actionable information. Excel Services, Access Services, dashboards, BDC, PerformancePoint Services Interoperability Ranges from LOB integration to Office integration, through the new Apps for Office application model; (think HTML and JavaScript-fueled custom task panes that link to cloud services instead of VSTO managed code add-ins) to custom solution development. BDC, Apps for Office, custom development Branding Changing the look and feel of your site through built-in template changes or more detailed and organizationally driven branding. Out of the box configuration, master pages and customized Apps for SharePoint Print Page Previous Next Advertisements ”;

SharePoint – Central Administration

SharePoint – Central Administration ”; Previous Next In this chapter, we will be covering the high-level introduction of SharePoint Central Administration. Central Administration is the place where you can perform administration tasks from a central location. As we have already signed up for an Office 365, so we also have an administration site. Open the URL https://portal.office.com/ in the browser. Step 1 − Select the Admin icon. Step 2 − Now select Admin centers → SharePoint in the left pane. The following page will open. You can see a variety of site collection administration features and manage the following activities − Application management Monitoring Security General application settings System settings Backup and restore Upgrade and migration Configuration wizard Apps Application Management In Application Management, you can perform tasks like creating new web applications and site collections. You can manage the services that are installed on your SharePoint site such as Word, Excel or BCS and manage your content database. You can also perform tasks like modifying the properties of the content database, activating features, and creating new site collections etc. Monitoring Monitoring is the central place wherein you can manage reporting, monitoring, and the status of your SharePoint site. The Monitoring site is divided into three areas, which are as follows − Health Status − You can see the status of different services on your SharePoint Server. Timer Jobs − You can define the specific jobs and decide when to run them. Reporting − A set of tools that enables you to create and manage reports, run diagnostic logging, and view reports on various server-side activities. Security Security settings is all about the security in the main browser UI, where the users and the site administrators can assess specific permissions that relate to users for their sites. Security covers many areas such as − Management of administrator accounts Configuration and management of service accounts. Management of password change settings and policies. Specifications of authentication providers, trusted identity providers. Antivirus settings. Blocked file types. Self-service security. Secure token services. General Application Settings In General Application Settings, you can configure a number of general options for your SharePoint site collections and sites such as send mail to users. You can also manage a number of deployment and approval options such as content deployment location and approvers of that content. In general, think of this site as the generic settings for your SharePoint sites. System Settings You can configure server-centric settings such as farm-level or access features, or even manage the services like Excel and Word Services, which are available to the users of the site collection. You manage these types of settings from within the System Settings site. Backup and Restore Sometimes, you might need to backup and restore your SharePoint site. The backup and restore feature enables you to create and schedule regular backups for your SharePoint, perform ad hoc backups, restore from a previously backed-up SharePoint site etc. Upgrade and Migration Sometimes, you might want to upgrade from one version of SharePoint to another version such as moving from SharePoint Standard to SharePoint Enterprise. This requires a license and some facility to upgrade the server. This type of activity can be done in the Upgrade and Migration section of the Central Administration site. You can also install service patches, check on installation, and upgrade progress from within this part of the administration toolset. Configuration wizard It is simply a step-by-step wizard that configures SharePoint Server for you. You should have seen this wizard when you first installed SharePoint. However, you can run it again after installation to change some of the configurations on your SharePoint server. Apps Apps is a new category within the Central Administration site that enables you to manage different facets of the apps that are installed on your SharePoint instance. For example, you can use Apps to manage the licenses, ensure that apps are running and performing in an error-free way, and also manage the App Catalog. Print Page Previous Next Advertisements ”;

SharePoint – App Model

SharePoint – App Model ”; Previous Next In this chapter, we will be covering the SharePoint deployment App models. Since, SharePoint is moving towards the cloud, the following deployment models are available to use Apps for SharePoint − SharePoint-hosted Autohosted SharePoint-hosted App The SharePoint-hosted deployment type represents a way to deploy client-side, lightweight apps to SharePoint. The easiest way to think about the SharePoint-hosted App as an application that has no server-side code. The key features of SharePoint-hosted App are − It is an application made up of static application files or pages that reside on your SharePoint like HTML and JavaScript files that enable client-side coding. When users access the SharePoint-hosted App, they are redirected to the page that contains your application. The SharePoint-hosted deployment type is good for lighter-weight Apps such as branded list views, media apps, or weather apps. If you decide to leverage the SharePoint-hosted deployment model, then you are limited to the code that does not run on the server. You can use Silverlight with SharePoint and take advantage of HTML along with JavaScript. Let us have a look at a simple example of SharePoint-hosted application. Step 1 − Open Visual Studio and select the File → New → Project menu. Step 2 − In the left pane select Templates → Visual C# → Office/SharePoint and then in the middle pane select App for SharePoint. Enter the Name in the Name field, Click OK and you will see the following dialog box. In the New App for SharePoint, we need to add the SharePoint site URL that we want to debug and then select the SharePoint-hosted model as the way you want to host your app for SharePoint. Step 3 − Go to the SharePoint admin center and copy the SharePoint URL. Step 4 − Paste the URL in the New App for SharePoint dialog box as shown below. Step 5 − Click Next and it will open the Connect to SharePoint dialog box where we need to login. Step 6 − Enter your credentials and click the Sign in button. Once you are successfully logged in to the SharePoint site, you will see the following dialog box − Step 7 − Click Finish. Once the project is created, click the AppMenifest.xml file in the Solution Explorer. Step 8 − Click the Permissions tab. A Scope dropdown list will open. Step 9 − In the Scope dropdown list, select Web, which is the scope of permissions that you are configuring. In the Permission drop-down list, select Read, which is the type of permission you are configuring. Step 10 − Open the Default.aspx file and replace it with the following code. <%– The following 4 lines are ASP.NET directives needed when using SharePoint components –%> <%@ Page Inherits = “Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version = 15.0.0.0, Culture = neutral, PublicKeyToken = 71e9bce111e9429c” MasterPageFile = “~masterurl/default.master” Language = “C#” %> <%@ Register TagPrefix = “Utilities” Namespace = “Microsoft.SharePoint.Utilities” Assembly = “Microsoft.SharePoint, Version = 15.0.0.0, Culture = neutral, PublicKeyToken = 71e9bce111e9429c” %> <%@ Register TagPrefix = “WebPartPages” Namespace = “Microsoft.SharePoint.WebPartPages” Assembly = “Microsoft.SharePoint, Version = 15.0.0.0, Culture = neutral, PublicKeyToken = 71e9bce111e9429c” %> <%@ Register TagPrefix = “SharePoint” Namespace = “Microsoft.SharePoint.WebControls” Assembly = “Microsoft.SharePoint, Version = 15.0.0.0, Culture = neutral, PublicKeyToken = 71e9bce111e9429c” %> <%– The markup and script in the following Content element will be placed in the <head> of the page –%> <asp:Content ID = “Content1” ContentPlaceHolderID = “PlaceHolderAdditionalPageHead” runat = “server”> <script type = “text/javascript” src = “../Scripts/jquery- 1.6.2.min.js”></script> <link rel = “Stylesheet” type = “text/css” href = “../Content/App.css” /> <script type = “text/javascript” src = “../Scripts/App.js”></script> </asp:Content> <asp:Content ID = “Content2” ContentPlaceHolderID = “PlaceHolderMain” runat = “server”> <script type = “text/javascript”> function hello() { var currentTime = new Date(); $get(“timeDiv”).innerHTML = currentTime.toDateString(); } </script> <div id = “timeDiv”></div> <input type = “button” value = “Push me!” onclick = “hello();” /> </asp:Content> Step 11 − Go to the Solution explorer, right-click the project and select Publish. Click the Package the app button. This builds your SharePoint-hosted app and prepares it for you for deployment to your SharePoint site. You will see the following folder, which contains the *.app file. Step 12 − Navigate to your SharePoint online site. Step 13 − Click Apps for SharePoint in the left pane. A new page will open. Step 14 − Drag your files here to upload. Once the file is uploaded, you will see the following page − Step 15 − Click the option – Site Contents in the left pane. Click the add an app icon as shown in the following screen shot − A new page will open. Step 16 − Select Your Apps → From Your Organization in the left pane and you will see that the app is available for installation. Click the app. Step 17 − When you click the app, a dialog box opens as shown in the following screen shot. Click Trust it. Step 18 − You will see that the app is installed. Once the installation is complete, you can click the app. You will see the following page, which contains one button − When you click the Push me button, it will display the current date. Autohosted The Autohosted deployment model is a significant departure from previous SharePoint applications. In this model, you build Apps for SharePoint, but the code is seamlessly deployed to Windows Azure in the background, so SharePoint automatically creates the cloud-hosted app for you. The important features are − It looks like it is running on SharePoint, but in the background it is actually deployed to a special Office 365 Windows Azure instance and registered as an authenticated and authorized App with SharePoint. You do not have complete access to the entire platform capabilities of the Windows Azure platform with the Autohosted deployment model, but you do have enough of the platform to build some interesting applications. Let us have a look at a simple example of Autohosted by creating a new project.

SharePoint – APIs

SharePoint – APIs ”; Previous Next In this chapter, we will be covering the several sets of APIs to access the SharePoint platform. The selection of APIs depend upon the following different factors − Application type Developer existing skills Device on which the code runs Application Type There are different types of applications such as − SharePoint Add-in Web Part on a SharePoint page Silverlight application running on either a client computer or a client mobile device ASP.NET application exposed in SharePoint JavaScript running in a SharePoint site page SharePoint application page Microsoft .NET Framework application running on a client computer Windows PowerShell script Timer job running on a SharePoint server Developer Existing Skills You can easily create applications in SharePoint if you already have experience in any of the following programming models without needing to learn a lot about SharePoint programming − JavaScript ASP.NET REST/OData .NET Framework Windows Phone Silverlight Windows PowerShell Device on Which the Code Runs The device on which the code runs can be any of the following − Server in the SharePoint farm. An external server such as a server in the cloud. A client computer and a mobile device. The following table provides guidance for different set of APIs, which can be used for a selected list of common SharePoint extensibility projects. S.No. API & Usage 1 .NET Framework client object model, Silverlight client object model, REST/OData endpoints Create an ASP.NET web application that performs CRUD operations on SharePoint data or external data that is surfaced in SharePoint by a BCS external content type, but does not have to call SharePoint across a firewall. 2 REST/OData endpoints Create a LAMP web application that performs CRUD operations on SharePoint data or external data that is surfaced in SharePoint by a BCS external content type. Create an iOS or Android app that performs CRUD operations on SharePoint data. 3 Mobile client object model Create a Windows Phone app that performs CRUD operations on SharePoint data. 4 Mobile client object model and the server object model Create a Windows Phone app that uses the Microsoft Push Notification Service to alert the mobile device of events in SharePoint. 5 .NET Framework client object model Create a .NET Framework application that performs CRUD operations on SharePoint data. 6 Silverlight client object model Create a Silverlight application that performs CRUD operations on SharePoint data. 7 JavaScript client object model Create an HTML/JavaScript application that performs CRUD operations on SharePoint data. Create an Office Add-in that works with SharePoint 8 Server object model Create a custom Windows PowerShell command. Create a timer job. Create an extension of Central Administration. Create consistent branding across an entire SharePoint farm. Create a custom Web Part, application page, or ASP.NET user control. Print Page Previous Next Advertisements ”;