Pages

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

Friday, January 4, 2013

Chrome control in apps for SharePoint 2013



Introduction:

        In this post we will see the basics about “Chrome Control” in apps for SharePoint 2013.


About Chrome Control:

                The Chrome Control downloads a copy of the style sheet used in the parent site and applies it to the HTML pages in your client-side App. We can find the default style for any site in the below URL format.

http://{SharePointSite}/_layouts/15/defaultcss.ashx

Chrome control basically apply style sheet to App page.

Steps:
                We need to dynamically load the "SP.UI.Controls.js" file, which is available in “/15 hive” path. We load this script using Jquery library as mentioned below.




Then create a collection to hold the chrome control option values. 


Finally, instantiate a new Navigation object using the container <div> added to the page markup in the previous step and make the object visible.


We can combine all these scripts into a single file called “ChromeLoader.JS” and refer this JS in our HTML/ASPX page and mention a div with “chrome_ctrl_container” id.

Now if we run the page we will get the below output.

The Navigation Bar with setup icon and menu will be loaded as per our configuration mentioned above.


The same settings will be configured directly in HTML as in below image and the output will be the same.

 

Summary:

            Chrome control in SharePoint 2013 App allows addition of custom navigation nodes that links to other pages and help pages. The demo App in Office 365 hosted App.



Thursday, December 13, 2012

Hello World App Using Client Web Part in SharePoint 2013

Introduction

In this article we will see how to create and use a "Client Web Part" using the Office Napa Tool. In the previous article, we covered the basic App development using Napa Tool.
Steps

First we will navigate to the "Napa office 365 Development Tools" and select any existing App or create a new one.

Image1.jpg


Image2.jpg

Image3.jpg

Once your application opens, select the "ClientWebPart.aspx".

Image4.jpg

Add the following code to develop a simple application that will just list the latest 10 tweets.

Image5.jpg

Add the "JS" event to populate the tweets.

Image6.jpg

Create a new site page (wiki page) in our SharePoint 2013 site and edit the page.

In Edit mode navigate to the Ribbon ->Insert -> click App part

Image7.jpg

Select the SharePoint App and add it to our page.

Image8.jpg

Image9.jpg

We will ensure that the web part will work fine. Now it will load the tweets.

Image10.jpg

Summary

Using "Client Web Part" we easily add any "App Functionality" to our pages.
 

Tuesday, November 27, 2012

Site Access Request and Invitations in SharePoint 2013

Introduction

In this article we will see how the end-user requests site access invitations and how the site owner will manage the requests in SharePoint 2013.

Steps

We will first allow the end user to send an access request, if they don't have access to the SharePoint sites. The Site Owner/Administrator goes to the Site Settings -> Site Permissions page; see:

Image1.jpg

In the permissions page click the "Access Request Settings" link from the Ribbon.

Image2.jpg

Check the "Allow access requests" check box and enter the email id.

Image3.jpg

Image4.jpg

If the user doesn't have the access to the site then they will get a message like "Sorry you don't have access to this site" and if enabled for the site access request, the user is able to send a request as shown below.

Image5.jpg

Once user has sent the request, they will see the following status and confirmation message:

Image5.5.jpg

Now the site Owner/Administrator navigates to Site Settings-> Access requests and invitations.

Image6.jpg

We are able to view all the pending requests with conversation messages and we provide appropriate access and approve the request.

Image7.jpg

If there are any issues while attempting to approve the request, then we check the "configure outgoing e-mail settings".

Image8.jpg

Once the requests are approved, we are able to see the request status and confirmation message. Approved requests are moved from "Pending Requests" to "History" section.

Image9.jpg

Now the same user is able to view the site.

Image10.jpg

Internals

Some quick notes about the Access Requests internals. It is all stored in a hidden list called "Access Requests". This list has three views/pages:
  • Guest user invitations (Access Requests/pendinginv.aspx)
  • History (Access Requests/oldreq.aspx)
  • Pending Requests (Access Requests/pendingreq.aspx)
That is good to know if you want to leverage/improve the functionality of access requests in your applications. This list has unique permissions with only Site Owners with Full Control.

Summary

SharePoint 2013 has, with this simple feature, made it so much easier to create and manage community sites; internal or external. It's these little things that make a huge difference!

Wednesday, November 21, 2012

Hello World Application in SharePoint Store Apps

IntroductionIn this article we will see how to develop our first app using "Nappa Office 365 Tools" in SharePoint 2013.StepsFirst we need to create a Site Collection with the "Developer Site" template. See:ShrStrApps1.jpgOnce the site collection has been created, click the SharePoint store link and we will get the following message:ShrStrApps2.jpgJust select any language and we will see the "Napa Office 365 Development Tools" app and "Add" this app to our site. See:ShrStrApps3.jpgWhile adding this Napa app, it'll ask for credential verification. It'll be a hotmail/live id. See:ShrStrApps4.jpgOnce the "Napa" app has been added in our site, we will see the following message:ShrStrApps5.jpgWe'll see the same app will be in the Site Content also, the same place we see all the apps of the particular site. See:ShrStrApps6.jpgClick the "Napa" app; it'll redirect to the Welcome page with various choices of apps. Just select SharePoint Apps.ShrStrApps7.jpgOnce we select the SharePoint Apps, it'll redirect to the "Napa" Cloud development site as shown below. We'll see the bread crumb as Office 365 --> Napa-->SharePointApp1 which means that SiteName--> Napa-->App Name.By default we will see the following set of files in our application:ShrStrApps8.jpgWe can able add/remove any files in our application. See:ShrStrApps9.jpgIn our app we just want to display the logged in user name, let's make it simple. See:ShrStrApps10.jpgAfter doing the coding, we can run our application as shown below. It'll open our app in a new browser window. In addition to that we have also opened our app from VS 2012.ShrStrApps11.jpgWe will see the installation steps, once its completed we will see our application in a separate window.ShrStrApps12.jpgShrStrApps13.jpgIf we want to publish our app, select the publish option in the bottom-left icon and complete it.ShrStrApps14.jpgShrStrApps15.jpgOnce it's published we will see our application in the App Packages. Like WSP files 2013 we have a new format with an .APP extension.ShrStrApps16.jpgWe can find the published app in our Site Contents page. See:ShrStrApps17.jpgIf we open the app will see our Application Pages. See:ShrStrApps18.jpgSummary"Napa" is a free app for SharePoint. Since "Napa" is web based, you don't need to install anything on your machine to start developing for Office and SharePoint. Just fire up your browser and start coding. As your application matures and you need more advanced tools, you can seamlessly switch to the more powerful, fully featured Visual Studio IDE, and continue developing there. 

Sunday, November 18, 2012

Claims-based Authentication in SharePoint 2013


Introduction

In this article we will see what are all the improvements in claims-based authentication in SharePoint 2013.

Key-Points
  • Claims-based authentication is the default for new web applications in SharePoint 2013.
  • When you create a web application in Central Administration, you can only specify authentication methods for claims-based authentication.
  • Although Windows Classic mode authentication is still available in SharePoint 2013 and can be configured through Windows PowerShell, we recommend that you use claims-based authentication. Windows Classic mode authentication is deprecated in SharePoint 2013.
In SharePoint 2010, while creating a new web application we will see the following options related to authentication and security.

options-related-Authentication-and-security.jpg

But in SharePoint 2013 we will see only claims-based authentication:

Claims-Based-Authentication.jpg

We will do the easier migration from classic mode to Windows-based claims mode with the new Convert-SPWebApplication Windows PowerShell cmdlet.

Some of the key changes related to security in SharePoint 2013 are:
  • Login tokens are now cached in the new Distributed Cache Service.
  • By storing the login tokens in the Distributed Cache Service in SharePoint 2013, the configuration of affinity in your load balancing solution is no longer required. There are also scale-out benefits and less memory utilization in the web front-ends because of a dedicated cache service.
  • SharePoint 2013 has a dedicated local server-to-server security token service (STS) that provides server-to-server security tokens that contain user identity claims to enable cross-server authenticated access.
  • SharePoint 2013 uses OAuth 2.0 to authorize requests by apps in the SharePoint Store and App Catalog to access SharePoint resources on behalf of a user.
Summary

Understanding these changes will really help us to design and develop applications based on SharePoint 2013.

Monday, November 5, 2012

Add and Remove Doc Library in SharePoint 2013


Introduction

In this article we will see how to add and remove a document library in SharePoint 2013 Sites.

Steps

We go to the site's home page and click the "Site Content" link from the quick launch menu.
Image 1.jpg

Then it'll display the list of apps we can add to our site, as in:

Image 2.jpg

There are two options for adding apps to your site.

Option 1

We can directly click the App icon or Tile to add the particular app into our site, then click the Document Library.
Image 3.jpg

Option 2

Click the "App Details" link; it'll redirect to the App Detail page and add the app.
Image 4.jpg

Both the preceding options redirects to the Document creation page, fill in the input and add the library.
Image 5.jpg

If we click the "Advanced Options", notice that the Document Library "List Template ID=101" as a query string is in the page URL. Microsoft may call it an App but still it internally maintains the basic structure.
Image 6.jpg

The same page in SharePoint 2010 looks like in the following page, it's based on Silverlight.

Image 7.jpg
Fill in the values and create a Document Library.

Image 8.jpg
 
Image 9.jpg

Now if we go to the Site Contents page, we will see the newly created Document Library.
Image 10.jpg

If we want to delete the Document Library then simply click the top-right "More info" link or click the App icon or Tile, it'll open a popup with the "Remove" option.
Image 11.jpg

Once we click the "Remove" button, we will get the following alert message and if we select OK, the document library will be deleted.
Image 12.jpg

Summary

We have learned how to add and remove a document library in a SharePoint 2013 site.