Intro to Model View Libraries and SharePoint

Over the past year I have seen a huge uptake in the use of JavaScript Model View with SharePoint. A Model View library allows you to separate your data, presentation, and the transformation of that data to presentation view. The uptake is probably caused by two factors, first a rejuvenated interest in the MVC pattern, and second is the RESTful services SharePoint 2013 brings to the table. SharePoint 2010 also had these RESTful services, but they were new and didn’t provide all the functions that the 2013 services do.

Here is a great drawing to explain the MVVM concept:

MVVM

  • Model: The data and business objects
  • View: The presentation, the user interface
  • View Model: A code representation of the data and UI operations

In the next few installments of this blog I will go over some of the popular MV libraries out there (Backbone.JS, KnockOutJS, and Ember.JS) and how to make them work with SharePoint. After that we will take my favorite KnockOutJS and walkthrough how to provide a fully functioning newsfeed from SharePoint 2013 social feeds.

  1. Intro
  2. Backbone.js
  3. Ember.js
  4. KnockOutJS
  5. Reading Social Feeds
  6. Writing to Social Feeds
  7. Tying it all together
Matt Maher

Matt is a SharePoint architect currently focused on end user solutions, Office365, enterprise social apps, and server infrastructure.
Follow Matt:

What is Big Data?

Big Data has been a topic of intense discussion and media hype during the last year or two.  A number of people have asked Netwoven consultants the following questions:

-          What is Big Data?

-          What is Hadoop?

-          What is Microsoft’s strategy for Hadoop

-          How can I use Hadoop for my business?

-          Is Big Data only about Hadoop?

-          What is Predictive Analytics?

-          How does Search integrate with Hadoop?

-          How do SharePoint and Hadoop Integrate?

-          How can users use PowerPivot and Hadoop?

-          How can users use Powerview and Hadoop together?

-          How is SQL Server and Hadoop integrated?

-          How is SSAS and Hadoop integrated?

-          Is statistics dead with big data since we do not have to deal with smaller datasets anymore?

Netwoven has been actively working with Big Data, Hadoop, and Predictive Analytics.  Our team of consultants will be providing you with information through our blog at http://netwovenblogs.com.

In this first blog article, we discuss what Big data is.  It has several definitions:

-          According to some, BIG DATA IS ALL ABOUT seeing and understanding the relations within and among pieces of information that, until very recently, we struggled to fully grasp.

-          Big data is data that exceeds the processing capacity of conventional database systems. The data is too big, moves too fast, or doesn’t fit the structures of your database architectures.

To clarify matters, the three Vs of volume, velocity and variety are commonly used to characterize different aspects of big data. They’re a helpful lens through which to view and understand the nature of the data and the software platforms available to exploit them.

Volume points to the volume of data that is flowing down the pipe today that organizations need to deal with.  Think about the volume of information that Bing, Google, Facebook create.

Velocity points to the speed at which the information is coming down the pipe.

Variety points to the various types of information that is generated today such as linkedin, blog, audio, video, facebook, twitter type of information.

In addition to the three V’s a fourth V often has been added to mean ‘Value’.

In the next blog post, we will go into more details of Big Data.

Niraj Tenany

Niraj specializes in Enterprise Content Management and Big Data business strategies and technologies.
Follow Niraj:

Customizing Content Processing Pipeline in SharePoint 2013

Often there is a need to customize the content processing pipeline to meet certain business requirements. There are various approaches to this that are discussed in this blog.

The figure below is showing the logical overview of how crawling and content processing works for SharePoint 2013 Enterprise search.

content processing works for SharePoint 2013

Now if requirement is such that the managed properties of crawled items need to be modified before being indexed then customized business logic needs to be implemented somewhere in the content processing pipeline. The only place where SharePoint 2013 allows us to call external SOAP services (wcf and web services) is during “Content Enrichment”.

In this article, 2 cases will be discussed:

Case 1:

“Calcutta” is a city in India, recently renamed as “Kolkata”. Now some people may search with “Kolkata” and others with “Calcutta”. Here the “Location” property can be modified to “Kolkata” whenever “Calcutta” entry is found against “Location”. For this the following steps are needed:

  1. Create a wcf application in Visual Studio 2012 and add a reference to “Microsoft.office.server.search.contentprocessingenrichment.dll” which you can find in “c:\\program files\Microsoft office servers\15.\Search\Application\External”.
  2. Delete default interface (e.g. IService1)
  3. Add following references to  Service1.svc.cs file
    • Microsoft.office.server.search.contentprocessingenrichment
    • Microsoft.office.server.search.contentprocessingenrichment.PropertyTypes
  4. Inherit “Icontentporcessingenrichmentservice” in Service1.svc.cs file
  5. Implement the method “ProcessItem”. This is the method where you get required properties for each items.
  6. Add following in <system.servicemodel> in web.config file<bindings><basicHttpBinding><!– The service will accept a maximum blob of 8 MB. –><binding maxReceivedMessageSize = “8388608″>

    <readerQuotas maxDepth=”32″

    maxStringContentLength=”2147483647″

    maxArrayLength=”2147483647″

    maxBytesPerRead=”2147483647″

    maxNameTableCharCount=”2147483647″ />

    <security mode=”None” />

    </binding>

    </basicHttpBinding>

    </bindings>

  7. Host this wcf to IIS (Create a virtual directory). Map this to the physical path of wcf application. Right click on the Virtual Directory  and click on “Convert to Application”
  8. Browse and get the url for hosted .svc file
  9. Execute following PowerShell script to map “Content Enrichment” to hosted custom wcf$ssa = Get-SPEnterpriseSearchServiceApplication$config = New-SPEnterpriseSearchContentEnrichmentConfiguration$config.Endpoint = http://Site_URL/<service name>.svc$config.InputProperties = “Location”

    $config.OutputProperties = “Location”

    $config.SendRawData = $True

    $config.MaxRawDataSize = 8192

    Set-SPEnterpriseSearchContentEnrichmentConfiguration –SearchApplication

    $ssa –ContentEnrichmentConfiguration $config

  10. Run a full crawl on the content source.

Case 2:

In case of more than one content source, one can be configured for “Advanced” and the other for “Intermediate” resources. Here “Author” property of one can be modified to “Advanced” and the other to “Intermediate” so that when users search using “Advanced” key word they can see files from first content source and vice versa.

Here the two different content sources are segregated first and then processed differently. That is why there is a need of a “WCF Router” to identify the content source and map to wcfs accordingly.

  1. Create two wcfs as directed in Case 1
  2. Create a WCF Application and open web.config and configure as described below :
  3. Here “basicHttpBinding” is being used<basicHttpBinding><bindingname=”basicHttpBinding_IContentProcessingEnrichmentService”maxReceivedMessageSize = “8388608″>

    <readerQuotas

    maxDepth=”32″

    maxStringContentLength=”2147483647″

    maxArrayLength=”2147483647″

    maxBytesPerRead=”2147483647″

    maxNameTableCharCount=”2147483647″ />

    <security mode=”None” />

    </binding>

    </basicHttpBinding>

  4. Then configure Services section (base address not required if service is hosted in IIS)<services><service behaviorConfiguration=”RoutingServiceBehavior” name=”System.ServiceModel.Routing.RoutingService”><endpoint name=”RoutingServiceEndpoint” address=”" binding=”basicHttpBinding” bindingConfiguration=”basicHttpBinding_IContentProcessingEnrichmentService” contract=”System.ServiceModel.Routing.IRequestReplyRouter”/>

    </service>

  5. A service behavior needs to be created where the name of the filter table is referenced. This will be defined in the next step. To enable full inspection of the SOAP envelopes in the XPath filters, the attribute “routeOnHeadersOnly” is set to false.<behavior name=”RoutingServiceBehavior”><routingfilterTableName=”ContentSourceFilters”

    routeOnHeadersOnly=”False”/>

    </behavior>

  6. Now configure client wcfs<client><endpoint name=”ContentProcessingEnrichmentService” address=”http://localhost:300/ContentProcessingEnrichmentService/Service1.svc&#8221; binding=”basicHttpBinding” bindingConfiguration=”basicHttpBinding_IContentProcessingEnrichmentService” contract=”*”/><endpoint name=”ContentProcessingEnrichmentServiceDB” address=”http://localhost:300/ContentProcessingEnrichmentServiceDB/Service1.svc&#8221; binding=”basicHttpBinding” bindingConfiguration=”basicHttpBinding_IContentProcessingEnrichmentService” contract=”*”/>

    </client>

  7. Now “Routing” will be configured i.e. the mapping section between wcf and contentsource. Here the filters and the filter table are defined to map the filters to normal endpoints (and optionally to backup endpoints). Here “Xpath” filtertype is used as e XPath expressions look for all Property nodes in the SOAP envelope.<routing><namespaceTable><add prefix=”cc” namespace=”http://schemas.microsoft.com/office/server/search/contentprocessing/2012/01/ContentProcessingEnrichment”/&gt;

    </namespaceTable>

    <filters>

    <filter  name=”Sharepoint” filterType=”XPath” filterData=”//cc:Property[cc:Name[. = 'ContentSource'] and cc:Value[. = 'Local SharePoint sites']]”/>

    <filter name=”WCMContent” filterType=”XPath” filterData=”//cc:Property[cc:Name[. = 'ContentSource'] and cc:Value[. = 'WCM']]”/>

    </filters>

    <filterTables>

    <filterTable name=”ContentSourceFilters”>

    <add filterName=”Sharepoint” endpointName=”ContentProcessingEnrichmentService”/>

    <add filterName=”WCMContent” endpointName=”ContentProcessingEnrichmentServiceDB”/>

    </filterTable>

    </filterTables>

    </routing>

  8. Build solution and host to IIS as case 1
  9. Execute following PS commands to integrate routing.svc (router service) to content enrichment$ssa = Get-SPEnterpriseSearchServiceApplication$config = New-SPEnterpriseSearchContentEnrichmentConfiguration$config.Endpoint = “http://localhost:300/Router/Router.svc&#8221;

    $config.InputProperties = “Author”, “Filename”, “ContentSource”

    $config.OutputProperties = “Author”

    $config.SendRawData = $True

    $config.MaxRawDataSize = 8192

    Set-SPEnterpriseSearchContentEnrichmentConfiguration –SearchApplication $ssa –ContentEnrichmentConfiguration $config

  10. Run a full crawl on both content sources.

Hope you find this article interesting and helpful. Let us know in the comments below if you have any questions.

Social Terms and Vocabulary

This weekend I put together a list of vocabulary that Netwoven uses when engaging in Enterprise Social projects and opportunities. This is by all means not a complete set, but it starts to help people understand what you are talking about.

Also stay tuned for our SharePoint 2013 specific vocab list.

@Mention: a way of identifying a person in a post that lets the person know they were mentioned, usually by an @ symbol in front of the name, but Google Plus uses a + instead.

90-9-1 rule: 90% of users are “lurkers” that read and observe but don’t contribute, 9% of users contribute only occasionally, and 1% of users make the majority of postings in any one network

AstroTurfing: A tactic used by some to create a fake grassroots movement or buzz

Authenticity: Used to describe “real” people behind blog posts and other social profiles.

Avatar: An avatar is a name or image that represents a person on forums, social networks, and other websites. Usually a small picture or unique username.

Blog: A site updated frequently by an individual or group to record opinions or information.

Crowdsourcing: to harnessing the skills and enthusiasm of the crowd to contribute content and solve problems

Digg: A social news website that lets members vote for their favorite articles.

DM: A Direct Message is a private message from one person to another that others on Twitter cannot see.

Feed: In the social media world it applies to areas where information from your social network gathers and is presented.

Forum: also known as a message board, a forum is a site dedicated to discussion.

Geotagging:  Geotags are location-based tags attached to status updates, media, or other posts that gives GPS information

Hashtag: The # symbol, called a hashtag, is used to mark keywords or topics in a Tweet or post. Identical hashtags are then grouped into a search thread as a way to categorize messages.

Meme: A means of taking viral concepts and making them everyday lingo.

Microblogging: Short message postings from a social media account. Facebook statuses and Twitter posts are two examples.

Online reputation management:  ORM is the act of monitoring the social spaces for mentions of a company or person, often done by tools or applications that aggregate the networks.

Opengraph: This is an open protocol that Yammer, Facebook and other social networks use to enables a  web page to become a rich object in a social graph.

Tag: Indicates or labels what content is about.

Trending: A word, phrase or topic that is popular a given moment.

Tweeps: Twitter + People = Tweople.

Viral: Anything shared across social networks that get passed along rapidly. YouTube videos are a great example

Wiki: Simple web pages that can be edited by other users.

Forrester and Yammer: Social in the enterprise

Had the pleasure to attend an interesting Yammer/Forrester webinar the other day and thought I would summarize the talking points I heard about social for the enterprise:

  • Defining business value for a social enterprise effort is easier than other knowledge manager efforts. This is true, I go back to when I was helping directors come up with ROI slides on SharePoint as a portal and I thought wow this was hard. The business value for a team of sales people being able to communicate about a deal is a way easier story sell then people being able to share a document in under a minute.
  • Video is the new killer content. This one was an old one for me, I remember people saying that when YouTube was taking off. I want to believe that it is because in the consumer world it is so cool to watch videos of my friends or family is really cool. But do we really want to see a video of the head of marketing recapping our achievements.
  • Social cloud platforms have higher user adoption. I know it is bias, being a Yammer joint webinar, but I see it. Think of these cloud platforms, there aren’t hoops to jump through, they are always up to date, not a 2 year old instance of an on-prem server that IT forgot to update.
  • The sales department is the place to start our company’s social adoption. The sales folks are usually quicker to pick up things that will help them close deals, and they have smart phones and lots of time to check newfeeds and respond to things. I would love to see the study of which department’s employees spend the most time on Facebook and other consumer social sites, I bet it would be the sales folks.

The second half was how Booz Allen, Hamilton uses Yammer. It was ok, but it didn’t resonate with me. I hope this helps give you some fresh ideas.

 

Install and Configure SQL Server 2012 PowerPivot for SharePoint 2010 Using PowerShell

The PowerPivot feature in SQL Server 2012 provides powerful data mashup capabilities to support self-service BI scenarios. It’s based on the xVelocity in-memory analytics engine that achieves very high performance for analytic queries by leveraging columnar storage, compression, and parallel data scanning and aggregation algorithms. PowerPivot integrates with SharePoint Server 2010 to provide a reliable platform for building the managed BI collaboration environment such as avoiding proliferation of spreadmarts, ensuring data consistency and data refresh across user-generated workbooks, and providing and monitoring usage patterns. It also takes advantage of core SharePoint capabilities such as role-based security, versioning, compliance policies, and workflows.

The official MSDN documentation for the manual steps to install SQL Server 2012 PowerPivot in an existing SharePoint 2010 farm can be found here. After installation, you can configure PowerPivot either by performing the manual steps in Central Administration as documented here, or using the “PowerPivot Configuration Tool”. This article describes the PowerShell scripts needed to completely automate the installation and configuration process. In a subsequent post, we’ll discuss the “PowerPivot Configuration Tool” and some issues we encountered while trying to use this tool to validate the installation and configuration accomplished using the automated scripts described here.

1.       Install SQL Server Analysis Services

The first step is to install “Analysis Services” (in-memory mode) and “Analysis Services SharePoint Integration” components on the application server(s) in SharePoint Server 2010 farm that will host Analysis Services. This is accomplished by invoking the SQL Server 2012 setup.exe in a PowerShell session as follows:

$setupPath = "<Path to SQL 2012 Bits>\setup.exe"
$command = "$setupPath /q /ACTION=Install /IAcceptSQLServerLicenseTerms /ROLE=SPI_AS_ExistingFarm /INSTANCENAME=PowerPivot /ASSVCACCOUNT=<Account for AS Service> /ASSVCPASSWORD=<Password> /ASSYSADMINACCOUNTS=$farmAdminsGroupName /ErrorReporting=1 /UpdateEnabled=0
Invoke-Expression "& $command"

Note the following parameters passed to setup.exe: /Role of “SPI_AS_ExistingFarm” is equivalent to selecting “Analysis Services” and “Analysis Services SharePoint Integration” on the graphical setup screen, /InstanceName can only be “PowerPivot”, /UpdateEnabled is set to 0 so that the install does not fail on servers with no external connectivity, and /ASSysAdminAccounts specifies that the farm administrator group is also Analysis Services Administrator (you can specify multiple individual accounts using /PARAMETER="value1" "value2" "value3" format). No SQL Relational Database Engine needs to be installed. For a complete list of parameters see Install SQL Server 2012 from the Command Prompt

Once the installation is complete, the SQL log file can be examined for any errors using the following function:

function ValidatePowerPivotInstall()
{
[bool] $bReturn = $false
[string] $Constant_LogFilePath = "C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\Summary.txt"
if((Test-Path $Constant_LogFilePath))
{
$SetupLog = get-item "$Constant_LogFilePath"
$installationSuccess = $SetupLog | select-string -pattern "Installation completed successfully"
if ($installationSuccess -ne $null)
{
Write-Host "Installation not successful"
$bReturn = $false
}
else
{
$bReturn = $true
}
}
return $bReturn
}

a.       Install OLE DB and XMLA libraries on Excel Server

If Excel Calculation Services and PowerPivot run on separate application servers in the farm, installation of the new SQL Server 2012 version of Analysis Services OLE DB provider (MSOLAP.5) is needed on app server(s) running Excel Calculation Services. The provider is included in SQL Server Setup, therefore explicit installation is only required if the Excel server is not a PowerPivot application server.

$setupPath = "<Path to SQL 2012 Bits>\setup.exe"
$command = "$setupPath" /q /ACTION=Install /FEATURES=Conn /IAcceptSQLServerLicenseTerms /ERRORREPORTING=1 /UpdateEnabled=0"
Invoke-Expression "& $command"

Note that the Feature parameter of “Conn” installs connectivity components.

In addition, the new OLE DB provider must be specified as a trusted data provider in Excel Service App.

[Array] $serviceApps = Get-SPServiceApplication | Where-Object { $_.TypeName -eq “Excel Service Application”}
foreach($ecsApp in $serviceApps)
{
$provider = $ecsApp | Get-SPExcelDataProvider | where {$_.ProviderId -eq "MSOLAP.5"}
if (!$provider)
{
$ecsApp | New-SPExcelDataProvider -providerId "MSOLAP.5" -ProviderType oleDb -description "Microsoft OLE DB Provider for OLAP Services 11.0"
Write-Host "Registered MSOLAP.5 as a Trusted Data Provider with Excel Service App"
}
}

b.       Install ADOMD.NET on server hosting Central Administration web site

Some Central Admin reports in the PowerPivot Management Dashboard use ADOMD.NET to access data collected on PowerPivot query processing and server health in the farm. If the farm server hosting the Central Administration site does not run Excel Services or PowerPivot, installation of ADOMD.NET client library is needed for these reports to function properly.

$setupPath = "<Path to SQL 2012 Bits>\setup.exe"
$command ="$setupPath" /q /ACTION=Install /FEATURES=Conn /IAcceptSQLServerLicenseTerms /ERRORREPORTING=1 /UpdateEnabled=0”
Invoke-Expression "& $command"

2.       Deploy Solutions

After Analysis Services is installed on one or more servers, the “PowerPivot Tools” directory on the server(s) (%Program Files%\Microsoft SQL Server\110\Tools\PowerPivotTools\ConfigurationTool\Resources) will contain two SharePoint solutions (.wsp files). The PoverPivotFarm.wsp is a farm level solution that adds the library templates (for PowerPivot Gallery and Data Feed libraries) and application pages, and the PowerPivotWebApp.wsp is a web application level solution that adds PowerPivot Web service to the Web-front end. The following scripts install these solutions in SharePoint and deploy the web application level solution to the desired web applications in the farm.

#Deploy Farm level solution
$sol = Get-SPSolution | Where-Object { $_.Name -eq "PowerPivotFarm.wsp" }
if (($sol -ne $null –and $sol.Deployed -eq $false)
{
Install-SPSolution -Identity "PowerPivotFarm.wsp" -GacDeployment –Force -Confirm:$false
}
WaitForSolutionDeployment "PowerPivotFarm.wsp" $true


#Deploy Web App level solution
$webAppUrl = (Get-SPWebApplication -IncludeCentralAdministration | Where { $_.DisplayName -eq “<web app name>”}).Url
Install-SPSolution -Identity "PowerPivotWebApp.wsp" -WebApplication $ webAppUrl -GacDeployment -Force -Confirm:$false
WaitForSolutionDeployment "PowerPivotWebApp.wsp" $true $ webAppUrl

The web application must use Windows classic mode authentication and not claims authentication to support PowerPivot. The WaitForSolutionDeployment function is borrowed from the PowerPivot Configuration Tool resources script (ConfigurePowerPivot.ps1 in the “PowerPivot Tools” directory mentioned above) and modified as follows:

# This method will be used to wait for the timer job deploying or retracting a solution
# to finish. The parameter $deploy is a bool that indicates if this is a deployment or a
# retraction
function WaitForSolutionDeployment
{
param($solutionName, $deploy, $webApplication)
$solution = Get-SPSolution $solutionName -ErrorAction:SilentlyContinue
$count = 0
while(!$solution -and $count -lt 10)
{
"PowerPivot Solution is not added to farm yet. Wait 3 seconds and check again."
Start-Sleep -s 3
($count)++
$solution = Get-SPSolution $solutionName -ErrorAction:SilentlyContinue
}
if(!$solution)
{
"PowerPivot solution does not exist in the farm"
return
}
"Found solution " + $solutionName
$activeServers = @($solution.Farm.Servers | where {$_.Status -eq "Online"})
$serversInFarm = $activeServers.Count
## Wait for the job to start
if (!$solution.JobExists)
{
"Timer job not yet running"
$count = 0;
## We will wait up to 90 seconds per server to start the job
$cyclesToWait = 30 * $serversInFarm;
while (!$solution.JobExists -and $count -lt $cyclesToWait)
{
Start-Sleep -s 3
($count)++;
}
## If after that time timer still doesn't exist, verify if it suceeded
if (!$solution.JobExists)
{
if ($deploy -xor $solution.Deployed)
{
"Timer job did not start"
# throw new Exception(Strings.ASSPIGeminiSolutionNoDeployed_Exception);
return
}
else
{
"Timer job already finished"
return
}
}
}
else
{
"Timer job already started"
}
if($deploy)
{
$deployText = "deployed"
}
else
{
$deployText = "retracted"
}
## If deploy action and solution not deployed yet or retract and solution still deployed
[bool]$status = CheckIfDeployed $solution.Name $webApplication
if (((!$solution.ContainsWebApplicationResource -and
($deploy -xor $solution.Deployed)) -or
($solution.ContainsWebApplicationResource -and
($deploy -xor ($status)))))
{
"Solution not yet " + $deployText
$count = 0
## We will wait up to 10 minutes per server
$cyclesToWait = 200 * $serversInFarm;
# We enter this cycle if solution is not yet deployed or retracted
$status = CheckIfDeployed $solution.Name $webApplication
while (((!$solution.ContainsWebApplicationResource -and
($deploy -xor $solution.Deployed)) -or
($solution.ContainsWebApplicationResource -and
($deploy -xor ($status)))) -and
$count -lt $cyclesToWait)
{
write-host "." -nonewline
Start-Sleep -s 3
($count)++
$status = CheckIfDeployed $solution.Name $webApplication
## Check every 3 minutes to see if job is aborted or failed
## Application still not deployed/retracted and job not running mean something is wrong
## We can't check geminSolution.JobStatus because it throws in the absence of a job.
if (($count % 60 -eq 0) -and ($deploy -xor $solution.Deployed) -and !$solution.JobExists)
{
"We waited " + $count + " seconds for the solution to be " + $deployText + ". However, the PowerPivot solution is not yet " + $deployText + ". Please check whether SharePoint timer job is enabled. "
break
}
}
}
else
{
"Solution already " + $deployText
}
Start-Sleep -s 15
## Check if solution wasn't successfully deployed/retracted
$status = CheckIfDeployed $solution.Name $webApplication
if (((!$solution.ContainsWebApplicationResource -and
($deploy -xor $solution.Deployed)) -or
($solution.ContainsWebApplicationResource -and
($deploy -xor ($status)))))
{
"We waited " + $count + " seconds for the solution to be " + $deployText + ". However, the PowerPivot solution is not yet " + $deployText + ". Please check whether SharePoint timer job is enabled. "
throw "Solution failed to " + $deployText + ", reason: " + ($solution.LastOperationDetails) + " at: " + ($solution.LastOperationEndTime)
}
"PowerPivot solution is successfully " + $deployText
}

function CheckIfDeployed($solutionName, $webAppName)
{
$solution = Get-SPSolution $solutionName -ErrorAction:SilentlyContinue
$webApp = Get-SPWebApplication $webAppName
foreach ($deployedWebApp in $solution.DeployedWebApplications)
{
if ($deployedWebApp.Id -eq $webApp.Id)
{
return $true
}
}
#write-host "$solutionName not deployed to $webAppName"
return $false;
}

The deployment of these solutions makes three features available in the farm, which can be installed as follows:

try
{
Install-SPFeature -path PowerPivot -force -Confirm:$false
Install-SPFeature -path PowerPivotAdmin -force -Confirm:$false
Install-SPFeature -path PowerPivotSite -force -Confirm:$false
}
catch
{
write-host "Error: $_"
}

In addition, activation of PowerPivotSite feature at the site collection level is necessary to make application pages and templates available to specific sites

Enable-SPFeature –identity "PowerPivotSite" -URL "<site collection URL>"

3.       Register Engine and System Services

This step is critical in making PowerPivot functionality available in the SharePoint farm, but is missing from the list of manual steps on official MSDN documentation. Recall from the PowerPivot for SharePoint Architecture that an instance of the PowerPivot System Service exists on each server in the farm running Analysis Services in-memory engine, performing important functions (like monitoring server health, coordinating client requests for load balancing, collecting usage data, and performing automatic data refresh for PowerPivot workbooks). The PowerPivot system service works with Excel Services in SharePoint 2010 to extract the database from the Excel workbook, select an appropriate SharePoint application server running the Analysis Services service (preferably one that may already have the data loaded into memory), and then attaches the database to the Analysis Services instance.

To facilitate the above operation, all servers must have their instances of Analysis Services (“Engine” service) and PowerPivot “System” Service registered with the farm. The deployment of solutions and activation of features in the Step 2 simply registered the engine service and system service as a farm wide service, but no instances of these services have been registered in the farm yet. While creation of a PowerPivot Service Application will succeed at this point, there will be no Analysis Service instances available in the farm to serve a request. In Central Administration, in System Settings, click “Manage services on servers”, select the farm server(s) where Analysis Services was installed in Step 1 and verify that “SQL Server Analysis Services” or “SQL Server PowerPivot System Service” are not available to be started. Then run the following scripts on each of these servers to register their local instances of Engine and System service in the farm

$service = Get-PowerPivotEngineService
if ($service -eq $null)
{
Write-host "The PowerPivot Engine Parent Service is not registered in the farm: $_"
#installation error, do not proceed
}
$service = Get-PowerPivotSystemService
if ($service -eq $null)
{
Write-host "The PowerPivot System Parent Service is not registered in the farm: $_"
#installation error, do not proceed
}

try
{
$serviceinstance = Get-SPServiceInstance -Server "$ENV:COMPUTERNAME" | where { $_.TypeName -like "*Analysis Services*" } #Get-PowerPivotEngineServiceInstance
if ($serviceinstance -eq $null)
{
New-PowerPivotEngineServiceInstance -Provision:$true
Write-host "New PowerPivot Engine Service Instance created on "$ENV:COMPUTERNAME"
}
}
catch
{
Write-Host "The PowerPivot Engine Service Instance not created : $_"
}

try
{
$serviceinstance = Get-SPServiceInstance -Server "$ENV:COMPUTERNAME" | where { $_.TypeName -like "*PowerPivot*" } #Get-PowerPivotSystemServiceInstance
if ($serviceinstance -eq $null)
{
New-PowerPivotSystemServiceInstance -Provision:$true
Write-host "New PowerPivot System Service Instance created on "$ENV:COMPUTERNAME "
}
}
catch
{
Write-Host "The PowerPivot System Service Instance not created : $_"
}

After running this script, verify that in Central Administration, “SQL Server Analysis Services” and “SQL Server PowerPivot System Service” are now available to be started on the server(s) where the instances were registered, and start them (if not already started)

4.       Create Service Application

To make the service available to clients, a PowerPivot service application (a shared service instance of the PowerPivot System Service) needs to be created in the farm. Important service parameters such as Connection Pool Timeout, and Unattended Data Refresh Account can be specified for the Service Application. This is accomplished by running the following script:

$serviceAppName = “<name>”
$dbServer = “<server name>”
$dbName = “<DB name>”
$saPowerPivot = New-PowerPivotServiceApplication -ServiceApplicationName $serviceAppName -DatabaseServerName $dbServer -DatabaseName $dbName -AddtoDefaultProxyGroup:$true

SharePoint 2013 Branding

With the availability of SharePoint 2013 Preview one can quickly see that site branding and the web developer experience have been significantly improved as part of Microsoft’s overall investment in Web Content Management(WCM).

Site branding has gone through a significant update in SharePoint 2013 Preview. If you’ve ever built custom SharePoint publishing site elements: masterpages, theme, and custom css, you know this is not the motherhood-and-apple-pie effort of traditional web development. Some tasks are simple – creating an Office theme in PowerPoint, and customizing the site banner artifacts. But the task quickly becomes testy as you work through layers of css buried in nested table markup. And last but not least, one must also possess a strong working knowledge of the ASP.NET placeholder controls of a working master page.

In all fairness every multi-purpose wcm architecture imposes strict adherence to structure as a necessity, whether SharePoint or any other wcm system. But easing the implementation effort is a bonus all around. And kudos to Microsoft for making that investment in SharePoint 2013. Below is a quick list of key improvements.

SharePoint 2013 Branding Improvements:

  • Page editor context editing links allow quickly making updates to Global Navigation or Quick Link navigation.
  • Metadata driven navigation means you can easily and dynamically build a navigation taxonomy seperate from your page title and folder architecture. It also means you don’t have to be a designer to manage the navigation structure.
  • Client-of-choice development tools: SharePoint Designer is no longer the only way to build a masterpage or page layout asset. The catalog and page libraries are now exposed to WebDAV clients including Windows Explorer. WebDAV in Explorer requires a quick install, and you must also run the WebClient Service on the SharePoint VM. Then you’re off. This means it will be a lot easier for traditional web developers and designers to build custom site layouts and branded master pages. This is a significant overall change that will enable broader SharePoint adoption for publishing sites.
  • Composed Looks Gallery replaces Office Themes. The composed look is comprised of 2 xml theme files – the Color Palette file and the Font Scheme file. The Composed theme brings together multiple styling artifacts beyond the Office Themes of 2010: the master page, color palette, background image url, and your font scheme.

And because wcm development and web development go hand-in-hand I mention below some web development and other related improvements:

  • Web Parts and layout Zones are DIVs in Publishing Pages. Gone are the days of many-layered tables with nested DIVs buried in a table cell. Web part content is styled using HTML, CSS and JavaScript. Another feature that will be easier for the traditionalists out there. This will also help a great deal with W3C page validation and building accessibility-friendly pages.
  • Content by Search Web Part is much more flexible than the Content by Query Web Part. No longer do you need to edit XSLT to traverse your Doc Set hierarchy – a personal favorite of mine. With search more natively integrated as a web part site content can be more organically personalize and sourced across multiple sites.
  • Clean URLs mean you can build branded name links rather than nested folder urls. This feature also makes it’s way into the catalog site which I’ll discuss in another post.
  • Image Renders allow for building site image standards – thumbnails, product images, event images, avatars, etc. When a user uploads an image they can makes sure their images conform to the design standards of the site from a single image file – regardless of the source image size.
  • SEO optimization is now built into SharePoint with support for XML sitemaps, custom SEO properties <Meta> tag description and keywords.

There are many other detailed features worth mentioning that will simplify your web design and development effort – easier drag and drop, the overall interface is less ‘clicky’ and more application-like, less paging to navigate to common edit and configuration features, and even embedded or linked YouTube content!

All told, you should find plenty of smile-inducing eye candy in this release. I’ll dig deeper into some of the specifics in upcoming posts.