Sharing the experience search

Search sharing-the-experience.blogspot.com
Showing posts with label Best Practices. Show all posts
Showing posts with label Best Practices. Show all posts

Monday, May 19, 2014

@SPC_ORG by @susanhanley on User Adoption. Observe, Listen and Communicate

A keynote on 5/19/2014 #SharePointConference.ORG - User Adoption
http://susanhanley.com/. Susan is local to me - she lives in Bethesda, MD.

Notes from the keynote.
The factors of Successful User Adoption:

1. WIIFM - what's in it for me.
Make you heard your stakeholders

2. The SP solution should be tight to critical company goal

3. Adoptable solution solves the problem

4. Give people voice

SP2013 features engage users:
 - likes, ratings in RIGHT context;
 - search; Create a Tip web part with tips and feedback. (Sue thinks it's crucial)

5. Engaging content
 - well written content for the web;
 - relevant for user.

6. Keep it simple

7. Start small. 
Turn out solution in 90 days

8.Roll out in gradual manner

9.Engage leaders
"No involvement by leaders, no commitment by employees. No exceptions"

A great tip: " To reduce attachments in the emails, set a rule in the leader's mailbox to reject attachments and ask to provide a link to the document"

10. Look for "early adopters"

11. Train to make people comfortable
Plan a training roadmap - for comfort.
Effective training - training suits people needs. Use different formats for different people.
12. COMMUNICATION
  • be persistent
  • get feedback whenever possible
  • Think about how to communicate THE LAUNCH

The ideas on launch videos:

don't call SharePoint portal - SharePoint portal

Another idea:
30 minutes for 30 things that you didn't know about SP
"Get Sharp on SharePoint" - webcast

13. OBSERVE the users

Thursday, October 3, 2013

SharePoint: Search analytics or How to Improve Search

Recently, I have been diving deeper into Information Architecture

Key Issues in Governance Planning is Search


Google search and sharepoint search shouldn't work the same

when you google something you will get a lots of something

when you search in SharePoint, your intention get less but more relevant information to make business decision quicker. You are confined in bussiness jargon you use in your organization, or by author you are searching for.


Typical Search problems:
 - Garbage in, Garbage out
 - Poort meta data
 - Too much noise
   - Irrelevant content on top
   - Useless content
   - Duplicate content
 - Bad document authoring (pdf, MSOffice)
 - Misalligment with/misunderstanding users' conceptions
 - No Improvement over time


Actions to improve search:
 - Use Site Collection Web Reports
 - Check statistics weekly in the first 3 months
 - Make 20-50 Best Bets
 - Check monthly  and adjust
 - Improve titles descriptions
 - Add metadata
 - Map existing metadata


How to use Site Collection Web Reports to analyze Search?

How do you know of search needs improvement?

Start with "Failed Queries" /_layouts/WebAnalytics/Report.aspx?t=SearchFailureReport&l=sc
Look at the numbers of Queries that are failed. Compare with numbers of visitors
If you see that failed numbers are high, this is the first indication that you have to improve search.

Percentage abandoned value indication:
 returned no results - need to see if we can improve content exposure (via metadata) to show the result based on criteria
 100%  - users didn't follow any link that been shown in the result page. Check the result by yourself, analyze why content is not used by user. Is it wrong metata that describes the content or user uses different terminology?


How do you analyze UX via Search?

If visitor numbers are high /_layouts/WebAnalytics/Report.aspx?t=UniqueVisitorsTrend&l=sc
, but rarely people use Search overall _layouts/WebAnalytics/Report.aspx?t=SearchTrafficTrendReport&l=sc
, it might mean that you navigation is great
or users go only to the specific places without exploration what else can be useful in the portal and maybe you need to promote search feature more.

If users intensely use search it might indicate that you have to improve your navigation page

How can you reduce failed queries?
Add a search keyword with best bet.
Best Bet is a promoted result. Analyze use of the Best Bets via "Best Bets usage" - _layouts/WebAnalytics/Report.aspx?t=BestBetPerformanceReport&l=sc


This note is based on Search Analytics in SharePoint 2010



Friday, May 24, 2013

Is SharePoint rubbish? Trash talk on SharePoint architecture

I have recently bought a book by one of the favorite knowledgeable guy in the SharePoint world - Todd Klindt - Professional SharePoint 2013 Administration

The book is hilarious and very descent to have on the shelf if you are a SharePoint Administrator, Developer or Architect.

Here is my favorite paragraph so far, which is very metaphorical and easy memorize for someone who is new in this big and messy SharePoint World.



"Try this analogy to understand how [all] pieces work together: Web applications are the landfill. Content databases are giant dumpsters. A site collection is a big, black 50-gallon garbage bag. Webs, lists, and items are pieces of trash. Your users spend all week creating garbage, continuously stuffing it in the garbage bags, with each piece of trash occupying only one garbage bag at a time. Each garbage bag can hold only 50 gallons of trash (quotas) before it is full, after which the user has to either ask for a new garbage bag or get a bigger garbage bag.  That full garbage bag is placed in a dumpster, and it is not possible to put a garbage bag in more than one dumpster without destroying it.  Dumpsters are serviced only by one landfill but that landfill can handle thousands of dumpsters without issue. "

Thursday, September 13, 2012

SharePoint sandboxed solutions are deprecated in SharePoint 2013

Yesterday, a new SharePoint developer was frustrated with limitations in Sandbox solution that he has to develop for SharePoint Online, which at this moment (September 2012) is on SharePoint 2010.

He send me an email with a link to Apps for SharePoint compared with SharePoint solutions and a glorious title SharePoint sandboxed solutions are deprecated in SharePoint 2013 Preview

It's totally understandable when you are trying  to find a way to get rid of , as I call it,  SharePoint development madness.
Let me explain myself. For me, SharePoint development madness feels like an internal feeling of frustration and hopelessness. It is rooted in deep sense of overwhelming.
You as a new SharePoint developer is constantly have an  impression that you have to know a lot beforehand in order to write a first line of code for SharePoint.
And I were there... not a nice place. SharePoint community calls it -a steep learning curve...
I have posted recently a quick note on where to start in SharePoint development for a newbie. It might help initially to catch some fundamentals.

If your case is that you have to develop something in sandbox for SharePoint 2010, but you have already heard a lot about SharePoint 2013 new development Apps you almost certainly feel left behind.

You feel cheated since MSDN says that Sandboxed solutions are deprecated in SP2013 Preview? Be hold!

Here is me perspective on this emotional issue:


As it says in Apps for SharePoint compared with SharePoint solutions  SharePoint sandboxed solutions are deprecated in SharePoint 2013 Preview in favor of developing apps for SharePoint, but sandboxed solutions can still be installed to site collections on SharePoint 2013 Preview. 

My impression that MS believes that APP can replace all functionality that is possible to implement in sandbox solution. But at the same  time, we don’t know what’s going to be a new hit in the version after SP2013.

MS doesn’t announce the release date for Sp2013. Some rumors say it might launch 1Q of 2013.

If you feel uncomfortable to develop server side code in Sandbox solution, the only option I can see is Client-Side development: Client-Side Access and Remote Access

I believe you can develop client-side logic (javascript) and deploy it via Sandbox solution.

To summarize, we have to stick with sandbox since we don’t have any other option at this moment. But you still have a freedom to choose how you will implement the logic (server side\client side).
Once we are over the hill and with SP2013, I would glad to see you moving logic out of the sandbox to APP if this is appropriate.

Business doesn't jump fast to a new version. I predict that we will have more clients with SP2010 in the next few years rather than with SP2013.

For more information on SandBox vs APPs in 2013:


Friday, August 17, 2012

SharePoint UX: Styling and Branding. Design strategy

Previous related post:
SharePoint UX: Styling and Branding . Do it right

Kyle Schaeffer presented a nice design strategy that I couldn't resist to share with people who want:

 - prepare SharePoint implementation proposal;

 - present to the clients SharePoint custom design before implementation with less expenses;

 - come up with design solution that suits business needs and feasible to do in SharePoint.

Strategy consists of 4 phases:

1. Discover


Perception vs Expectation.  Kickoff meetings

You goal as an integrator, understand the client. 

Ask the client:

  -  Who are the users?

  -  What are they going to do?

  -  What is your goal?

Check yourself whether you understand the client.

How do you check your understanding?

Use a user persona , journaling. Use these personas for QA, during the whole project life

Example of journaling: 
Joe - a manager- does specific tasks

In QA cycle, ask clients again if "is a Joe satisfied?"

Spend some time on Information architecture 
( 50-100 users for small site -3-4 days for Information architecture)

- gather info about content

 - determine audience, users, personas

 - determine priority of content from the client's perspective

SharePoint UX: Styling and Branding . Do it right

Several weeks ago I have realized that I have been working with SharePoint last 3 years and it never occurred to me that I did nothing regarding User Experience and Design in SharePoint.

I have just accepted the things as they are in SharePoint... and I know for clients sometimes it really hurts to learn where to click to get some work done.

So, I have decided to improve life of business users who work with SharePoint via learning how to make SharePoint experience more user friendly. and I knew only one person who can help me with that Kyle Schaeffer

This week I have got an opportunity to be in his (Dulles, VA) class SharePoint Designer 2010 Styling and Branding Week. The class is 4 days long, I have decided to take the last part - Level II:


Day 3: Working with Layouts, Styling SharePoint Components (Blogs, Wikis, MySites,Discussion Boards)

Day 4: Enhancing the User Experience with JQuery and other Advanced Techniques




Overall, the class worked for me. I have been confirmed that there are people who can do design SharePoint 2010 in the way that doesn't brake SharePoint. And also it was reaffirming to know that there is an example of successful SharePoint integration company who knows what are the strengths and weaknesses of SharePoint and willing to work with it.

I am fully aware of reservations that clients might have when they hear the word "SharePoint". They heard it's hard to customize and hard to work with.

And I can see why these opinions exist. I believe if SharePoint isn't used right it will do more harm than good not only for clients, but for company who is trying to integrate it.

So, let's do it right! Let's educate ourselves when SharePoint is appropriate and when it's not. And if it's a appropriate for SharePoint, let's integrate it in the right way... and finally let's design the sites in the way it's comfortable to users to use.

 The topic - when SharePoint is appropriate is still an open topic for me... I hope to get more insights in this area. Your suggestions are warmly welcome.

How to integrate in the right way? - I have got some experience in this sphere:
http://sharing-the-experience.blogspot.com/search/label/Best%20Practices

And lastly, how to design SharePoint - this is what next several posts are all about:

SharePoint UX: Styling and Branding. Design strategy

SharePoint UX: Styling and Branding. Design implementation

Other good links to have (for SharePoint html work):
startermasterpage.codeplex.com
http://responsivesharepoint.codeplex.com/

Tuesday, June 26, 2012

SharePoint 2010: Best Practices on SharePoint on-premise and Office 365 SharePoint Online

Some best practices on "How to develop SharePoint 2010 applications"

I found useful to know how Yaroslav Pentsarskyy suggested to organize SharePoint 2010 project in Visual Studio 2010:
 - Platform project - core components;
 - Content project;
 - Service project;
 - Branding project.

The first chapter gives you an idea how you can organize SharePoint project structure, including the deployment project.

And absolutely agree with the following:

"There is one more benefit to keeping those artifacts separate; when it comes to bug fixes or functionality upgrades, it’s easier to replace one dll that keeps all of the supporting functionality than replacing core platform dll"

Here is one more note on the book "Top 60 custom solutions build on Microsoft SharePoint Server 2010":
All demonstrated solutions are Farm Solutions.


I have decided not to buy the book, since in the near future I will not work with SharePoint 2010 on-premise.
Maybe I will work with SharePoint Online!
For more best practices on SharePoint 2010 development: SharePoint 2010: Best Practices


So, I needed to investigate what should I know before diving into SharePoint Online development.
I have found a great white paper: "Office 365 SharePoint Online –Architectural considerations" byJeremy Thake
"When considering an activation of SharePoint Online as part of your SharePoint strategy, the main architectural decisions which need to be made should focus on the following areas:
 Capabilities 
 Workloads
 Authentication
 Permissions
 Creation of a cohesive end user experience
 Information Architecture 
 On-boarding and Off-boarding of data
 System Requirements
 Architectural Approaches"
Restrictions for SharePoint Online:
- no farm solution;
- no FAST Search;
- no developer dashboard;
- no SharePoint Timer Jobs;
Business Connectivity Services Profile Page;
Audit Opening and Downloading;
 - Records Center (but you still can use in-place record management);

Good news - you can use SCOM 

"A general pattern in the industry has already been to leverage client side code (ECMAScript) and the client object model or Silverlight to bypass some of the limitations."

The "Architectural consideration" is a great and concise article, but in some places info is not up to date.
For example the article states that you cannot use BCS, but  The service update in November 2011 enables developers to create BCS applications by using SharePoint Online. You need to use WCF service deployed on Windows Azure.


SharePoint Online storage limitations:
SharePoint Online for enterprises: key features and specifications
SharePoint Online Collection Sizing and User Limits



In summary, the aforementioned limitations are outlined below:
 -  Size limit of a site collection (100 GB), number of site collections (300) and maximum storage in 
a tenant (5 TB).
-  Record Center capabilities not offered (but you still can use in-place record management)
-  Mail Enabled Document Libraries are not supported, impacting Scanners & Scanner software
-  PDF documents cannot be opened in the browser
-  Word Automation features not available
-  Auditing does not capture which documents are opened and closed

-  Business Intelligence Center, SharePoint PowerPivot, PerformancePoint Services and integration 
with a reporting server not supported
 - Only Sandboxed Solutions, or browser centric applications based on technologies such as Silverlight, jQuery and Client Object Model can be used.



Further reading:


Appendix B: SharePoint Online and Office SharePoint Server Feature Comparisons



SharePoint Online Developer Resource Center 
SharePoint Online Administration


SharePoint 2010 101 Code Samples

Friday, June 22, 2012

SharePoint: SharePoint 2007 Administration and PowerShell 2.0



Last months my work with SharePoint 2007, I felt a strong inclination to use PowerShell 2.0.
I envied a happy people who were already with SharePoint 2010 and could enjoy SharePoint 2010 Administration via SharePoint.ps1


PowerShell and SharePoint: What, Why and How
Simple concept: How to use SharePoint cmdlets in PowerShell ISE


I also wanted to have such beautiful commands that have been shipped by SharePoint.ps1 for SharePoint 2010:
Get-SPFarm,
Get-SPWeb,
Get-SPWebApplication


So, my problem was that we don't have SharePoint.ps1 for SharePoint 2007.
To easy up my desire, I have created my functions:
Get-SPFarmV3,
Get-SPWebV3,
Get-SPWebApplicationV3.


And some additional:
Get-SitesWithMissingTemplate, Get-SSProvider, Get-SPVersionV3.


All above I have packed in one SPv3Adapter.mdl module.


Windows PowerShell Module Concepts


Module Installation Best Practices:


Do not install modules for Windows PowerShell in the system location at %Windir%\System32\WindowsPowerShell\v1.0\Modules. Only modules included with Windows are installed to the system location.


http://msdn.microsoft.com/en-us/library/dd878350(v=vs.85).aspx


Module installation
http://msdn.microsoft.com/en-us/library/dd878350(v=vs.85).aspx




And some additional PowerShell files:
Helper functions: Start-CustomTranscript, Get-CustomAPPLog,Get-SolutionDeployed


I have used a lot Get-SolutionDeployed during upgrade SP2007 to SP2010:


The module Helper.mdl has dependency on SPv3Adapter.mdl

Please install  SPv3Adapter.mdl  module first in order to enjoy Sp2007 helper functions.
One of the favorable option for me is to use manifest (you are welcome to use attached customModulesLoader.psm1 and  Manifest.mdl)  to ship the PS modules.


"SharePoint 2007 to 2010 Upgrade" online project (part 10) : Upgrade strategy plan

As it's been recommended by Joel Oleson's, we choose a Hybrid upgrade approach

Here is an actual upgrade strategy plan, that I have created before getting my hands dirty with testing and upgrading:

1. SP 2007 Prod analysis

 - Topology.
Topology review showed us that we need to change topology for a new farm to increase performance.
We moved a SSRS server out of the WFEs.

 - Hardware.
Check if you need to upgrade the hardware before the SP2010 upgrade
We had to upgrade all servers in the farm.
We requested a new VMs with appropriate hardware. The old 2007 farm servers will be upgraded
and we will re-use them to make the farm Highly Available.

 - Configuration (external system dependency, ISA configuration)
For an example, after we rolled SP2010 out, we have discovered that current VPN client won't support popup windows in the IE...and SP2010 extensively uses Dialog forms.
Make sure that you thought over all the systems that are using the SharePoint to avoid our mistake. These dependencies should be tested with test SP2010 farm before going live.

 - Customization
To pull all wsp files use the script spExtractSolutionsFromFarm.
Check if you have third-party tools that you have to migrate over.

 - Recommendation
This chapter helps to formulate the scope of the work to present to project manager\customer.


2.  Preparation for SP2010 upgrade


Here are the actual stages that we gone through to make 2010 Upgrade happen:

Stage I: “Pruning”. We need to prepare Prod environment before the actual upgrade. By pruning I mean removing all rudiments that are not used or not proper installed on the current Prod.

Stage II: "Build a new SP2010 farm"

1. Get new machines that meet hardware requirements for SharePoint 2010 


2. Install SP2010 on the new Prod  farm

3. Build topology


4. Configure service applications
Pay close attention to User Profile Synchronization service .
If you have BDC, decide whether you want to convert them into new BDCM models or not.
Depends on your decision, you need \ don't need to run Application Registry Service.


5. Deploy all custom SP2007 wsp files that needed (use the script spExtractSolutionsFromFarm )
Deploy old 2007 wsp file to check what's needed to be fixed to be compatible with SP2010.
For us, it was a big chunk of the functionality that used old BDC API.


Stage III: Test database attach upgrade on the new SP2010 farm
Document all errors that you have experienced during the upgrade, and their resolution. I have used wiki template in SharePoint for easy reference.

Stage IV: Test phase.

1. Build SP2010 farm in the testing region.
I have re-used old VMs, first requesting the up-scale for them

2. Perform the steps from 2-5 on the Test environment

3. Test\Development cycle
Should include iterations for development and re-testing
It took 3 months for us.

Stage V: Run the full cycle of the SP2010 upgrade sequentially for all environments except Prod
Ex: Development, Staging, Training

3: Prod upgrade to SP2010



Helpful to specify assumptions prior the actual upgrade:
All customizations were delivered on Prod through wsp files.
All custom solutions are SharePoint 2010 compatible
Test-SPContentDatabase check  doesn’t show errors




By this time you can do upgrade with closed eyes.
We didn't get any unknown issues. All have been known before since we ran the scenario 5 times already.



1. Set read-only acces on the old Prod

2 . Backup SP2007 content database

3.  Attach SP2007 database to a new SP2010 Farm

4. Run all actions that are needed after upgrade

We had a action upgrade plan, where we put the action that's needed to be taken during the upgrade and after.We put time to perform the operation and a responsible person for it.
It was like a lauching a shuttle, with only one exception - we knew it will launch without failure)


5. Validation


6. Switch ISA to a new farm

7.  Keep SP2007 prod for several weeks to test issues that will be reported by end-user. It will give you a clear answer if the issue is new in SP2010 or it was present before in 2007.


Voila, you did it!

Thursday, June 21, 2012

SharePoint: How to build SharePoint application wrong. SharePoint Karma



Whenever I refer to SharePoint development strategies, I always end up with SharePoint deployment strategies.


I am aware that in SharePoint world there are people who prefer to do customization via SPD and without a traditional development cycle.


This post for others... who wants to preserve a development cycle and who wants to have a fully automated and predictable deployment:
- via wsp files (or sandbox solution)
- and specific actions (like a feature activation) which is shipped as  PowerShell\stsadm commands. (Best Practices: Sharepoint Application Development Life Cycle)


How do you choose between content customization and code-based approach?
If you need to deploy anything on the server, that's a sign that's your approach is code-based customization.


Here is a quick SharePoint karma guide for code-driven development for SharePoint. Each wrong action will lead to a specific strong deployment reaction.
All described actions I saw done by developers. I hope this quick guide helps you to avoid pain of SharePoint deployment.


Action: Create a site locally manually. And then develop some other features.
Reaction: Deployment will be hard to other environments. You will need to re-create a site manually and hope that you haven't skip any steps.
Recommended action: create a custom site definition(onet file).It was a recommended approach since 2007. But I heard it's not what will be recommended in SharePoint 15. In SharePoint 2010 you have 2 options:
 - a web template that is shipped via sandbox solution and placed in the content db;
 - a site definition that is shipped via wsp file and deployed on the server.
Custom web templates (the preferred approach) and custom site definitions (which in some scenarios you must do)


Action: Create stp to deploy first version of the site. You know that in the future you need to change the site structure.
Reaction: Once you have created a site from a template, there is no way you can change structure via stp
Recommended action: Use site definition and feature stapling approach for further releases. In SP2010 you can make the changes for some features that is shipped via site definition using Feature Upgrade


Action: Build a wsp, place in it only eventreceivers for specific list with expectation that the list will have appropriate structure (someone should change the structure of list and then register the eventreceiver)
Reaction: As you can guess by action, you will not have stable behavior on the environment,since half of the deployment should be performed manually. I can only hope that you keep your deployment documentation up to date.
Recommended action: If you need to develop an eventreciever for the list that should have specific fields or content type, you should describe the list in the list template feature. Package the list template, list template instance and eventreciever register features as a bundle in wsp file.

Action: Every time is time for deployment - create a new site as a blank site - and create all object manually, copy files from original site to the destination and than replace hard-coded id in the file - manually
Reaction: It's messy and prone to errors.  There is no way to make such site automatic deployable
Recommended action: consider best practices of SharePoint development, use packages to deploy and feature upgrade for further releases. In case you need make some data structure changes - use SharePoint object model, write the code and package as a ReleaseFeature ( Feature stapling). This approach will allow you to keep track of all your structure changes on the existing site, plus you still can use the site definition to create a new site, and after the creation the feature stapling will do change work as it did for the existing one.


Action:Write a code to send an email\interact with end-users without environment variables
Reaction: If you miss configuration settings for your interactive logic, you miss control over it. You may end up with end-user notification sent while you are testing the application.
Recommended action: Choose approach that suits your needs best:
- property bag on the specific object (site, list, item ,etc ) (One of the way how to handle the property bag - SharePoint Property Bag Settings 2010)
- hidden list with environment variables.


Action: Manually copy to the environment all custom master pages and customized OTB SPD web parts
Reaction: It's messy and prone to errors.  There is no way to make such site automatic deployable
Recommended action: Package master pages in a feature to deliver to the server.
Regarding OTB SPD web part -there is no easy way, since the web part holds the id of the specific object from where the data is pulled. So this object will not be valid on other environment ( but in case you have developed on the copy of the prod content db, you are fine)
We have decided to develop a custom feature receiver to deploy such web parts - File provisioning: a hard-coded list id replacement


Action: Deploy report files with data source - a list asmx with hard coded List ID
Reaction: If you developed the data source (a list) that doesn't have the same id as in prod, you will have to manually change the data source after deployment.
Recommended action: To make it transportable - you can think of msi installer with parameters to swap hard coded value to a new one.


Action: Create a site groups manually and have the logic that gets these groups by IDs
Reaction: It’s prone to errors. If someone delete the group and then create a new one with the same name. You hardcoded value in the logic will break.
Recommended approach: Try the approach:
- create custom code feature which creates the groups. In the logic verifies if the custom groups exist and the permissions for them are right. If the groups don't exist, re-created them in the code.

Action: Create your own field as a counter that looks at id and has some increment value in the config file. Every time user deletes the records, you have to change the increment value in the config file.
Reaction: What???
Recommendation: I saw such application that works several years in the Prod with regular request from developer to change the increment. Last time I have checked the increment was gravitating to number 42)).
So never do such thing. This is approach is plain wrong. If you need,for some reasons, to keep ids for list items in strict order and you don't want to skip a number even though the user deletes the item and your next SharePoint id will not be subsequent to previous one, consider:
- to create a calculated field;
- to implement event receiver on the updated\created to keep the counter up to date.


And overall bad actions:


Action: Developer's objection: “It’s working on my local machine, so it is supposed to work everywhere”
Reaction: Depends on how you thought about implementation plan (if any), you may end up with the code that will work nowhere except your local machine.
Recommendation: Before you start coding for SharePoint, think through how you see your changes will be deployed.


Action: Administrator's easy fix: “If on the feature on the Prod gives you a headache - uninstall  the feature”
Reaction: Some sites will may lose the functionality that they needed from uninstalled feature.
Recommendation: Analyze what uses this feature 



Action: Project manager accusation\question: "This is sign of careless and sloppy work. How can we fix it?"  
Reaction: A team will not collaborate to fix the issue since they are considered careless and lazy
Recommendation: Respect the work of others, be aware the world is not perfect, we are here to make it work at some extend. Ask you question in the polite way to get a faster and constructive answer.



Good deeds to you and light consequences.

Wednesday, June 20, 2012

SharePoint: Is there life after development? Transition plan for SharePoint support team

Finally, my 2 year project on SharePoint 2007\2010 has been finished!
We started with 9 brave people in the team.
Our tasks were:
1. Build SOA infrastructure;
2. Bring data from disparate data sources into one application for measurement and management;
3. Build SharePoint farm;
4. Organize development and deployment process;
5. Develop custom business solutions based on SharePoint technology;
6. Build a report system to make use of the data in SharePoint;
It took us roughly 8 months of initial and hectic work.

And in another 1 year we have been asked (with 7 people):
 7. Extend functionality;
 8. Maintenance;
6.  Develop mobile solution to work with custom SharePoint sites;
7.  Upgrade 2007 to 2010.

Finished all. Now, it's time to transition support to the support team.
So, here is my a suggested transition plan for SharePoint support team.


The plan should be outlined by a person who holds knowledge. But the content should be filled by support team.  Also support team needs to get an estimate for every phase, the estimate should be recommended by a knowledgeable person.
They need to collaborate with developers to get the document done. 
Once the document is ready, a team lead\ or some other guy who knows the picture, needs to verify the document and to correct if necessarily.

Here are steps for transition plan:

1. Knowledge holders 
A main holder can be a team lead in the project. He should provide contact information to support team.
The contact info should contain all major areas that is needed to fully support the SharePoint farm and a responsible\ knowledgeable person in this area.

Here is an example of areas:
SharePoint Developer
SharePoint Architect
External system (BDC) administrators
DBA
Report developer
AD Administrator
ISA Administrator
SharePoint trainers

2. Environment  awareness
Support team should become aware:
 - what environments were build (ex: Dev, QC, Training, Staging , Prod);
 - the purpose of the environment;
 - the environment topology (how many servers with what roles, load balancing (ex. ISA) configuration)

The access plan should be developed: when to ask access to where. 

It will be milestones for the support team get them up to speed.

3.  Code awareness
- what the custom solutions and where they are;
- solution dependencies;
- how to build and deploy;

4. Development and deployment approaches
- is it possible go with no-downtime deployment and how (SharePoint : Farm solution deployment with no downtime. Update-SPSolution -local)


Approaches to deploy:
Content-based and code-based deployment, hybrid ( refer to previous posts):
When it makes sense to use:
- Sandbox solution - SharePoint 2010: Sandboxed solution restrictions and considerations
Hybrid Sandbox solution ;
- Farm solution;
- Content deployment

Each of these has own appropriate context and their advantages and disadvantages.

Note: This step is  for education purposes. You never know what knowledge a new member in SharePoint support team has.


5. Troubleshooting : common areas
As an example for our farm it is:
- SSRS
- External system check ( BDCM)

6. Backup and restore strategy


Happy supporting


Tuesday, June 19, 2012

SharePoint : Farm solution deployment with no downtime. Update-SPSolution -local

Wondering if it's possible to re-deploy farm solution wsp file without downtime? 

In some circumstances, it's possible.


You can do no-downtime deployment if following is true:
 - Your modified wsp file doesn't contain new files or features. The most common scenario, you want to change some code logic that is an existing dll. Once you deploy your modified wsp, the new dll will be placed in GAC (in case you don't have versioning enabled).


- You have load-balanced WFEs. (ISA with SharePoint Farm ( a little bit more complicated scenario with off-box SSL termination))



Here is how it works:
1. ISA test.
Test first if site is up with one server drained. Test for all severs in the ISA farm object for portal.

2. ISA switch.
Drain the first WFE.

3. WFE work. Update-SPSolution
Copy new wsp file on the local drive.
Run
Update-SPSolution -Identity {name}.wsp -LiteralPath "{path}\{name}.wsp" -Local –GACDeployment

Make sure that you specify the parameter –local.
It will deploy files locally and locally restart IIS.

After such update you will see following:


I have 2 boxes in QC env: SOA-MOSS01-QC, SOA-MOSS02-QC.
In the last operation result I see that operation is been performed only on one box SOA-MOSS01-QC.
The second box haven’t been updated yet and at this time actively  serving user requests with old functionality in place.

NOTE:

The Update-SPSolution cmdlet upgrades a deployed SharePoint solution in the farm. Use this cmdlet only if a new solution contains the same set of files and features as the deployed solution. If files and features are different, the solution must be retracted and redeployed by using the Uninstall-SPSolution and Install-SPSolution cmdlets, respectively.

Uninstall-SPSolution also has –local parameter.
But, The Install-SPSolution cmdlet deploys an installed SharePoint solution in the farm. Use the Add-SPSolution cmdlet to install a SharePoint solution package io the farm.
I haven’t tested this option.  And I can see a caveat here, if we need to add-spsolution , we need to remove-spsolution first. And this command doesn’t have –local option. Most likely in the scenario when we need to re-install spsolution instead of update, we have to bring the portal down.

4. Test the result locally on that drained and already updated WFE.

5. ISA Switch
Re-switch the servers.

6. Repeat steps from 3-4.

Done.

P.S.
That is how it looks from an end-user:
He is still accessing the portal while the specific WFE IIS is down.



Monday, June 18, 2012

Performance issue: CAML against a large list

How do you measure and tune performance on the custom form of the SharePoint list?

Recently, I was lucky enough to take part in the performance issue investigation.
We have a huge custom form, in which we pull data from 6 lists.

Here are the steps that I took to investigate performance issue on the custom form:

1.  I  turned the Developer Dashboard On.

It allowed me to see the execution total time and the specific action in that execution.

Since I knew, we were dealing with related items loading from different lists, I focused on the "EnsureListItemsData" on the left side.

EnsureListItemsData is related , exactly, to list items loading.

How do you know which EnsureListItemsData# relates to what list?


2. I turned stack trace on in the web.config file


In the trace you can search by specific EnsureListItemsData#[number] to find the SQL query where one of the parameters is a list name.


3. Before changing anything, I documented  the average execution time for every related list.

4. I identified the most expensive list items load


5. Then, I moved to the code to investigate how the form was written regarding this list.


I have looked at the code and found useful to analyze this piece:

<sharepoint:spdatasource runat="server" id="dsDocument" datasourcemode="List" useinternalname="true"
                            scope="Recursive" selectcommand="<View><Query><Where><Eq><FieldRef Name=' Mngr_Id' LookupId='TRUE'></FieldRef><Value Type='Integer'>{Mngr_Id}</Value></Eq></Where></Query><ViewFields><FieldRef Name='ID'/><FieldRef Name='ContentType'/><FieldRef Name='EncodedAbsThumbnailUrl'/><FieldRef Name='FileRef'/><FieldRef Name='FileLeafRef'/><FieldRef Name='Title'/></ViewFields></View>">
                          <SelectParameters>
                              <asp:Parameter Name="ListName" DefaultValue="Documents" />
                              <asp:QueryStringParameter runat="server" Name="Mngr_Id" QueryStringField="ID" />
                          </SelectParameters>
                        </sharepoint:spdatasource>


Since, the CAML was trying to get the data from List by the field Mngr_Id, I wanted to check if the field is indexed

It turned out that is not indexed!

That means every time the CAML query  selects all items from the list and then applies filter.  by the provided value in the field Mngr_Id.

Here is an article in MSDN that discuses Query Throttling and Indexing. "How Does Indexing Affect Throttling?" precisely describes the current situation in my custom form that uses CAML query.

Recommendations:

1. To Optimize the select.
Here the options that I can see:

1. Set index on the column Mngr_Id in the Documents list:
Here is a PowerShell script to setup the index on SharePoint list automatically.

The script helps in case you have an array of the lists that you want to index.
Of you want to have an automated process of the changes in SharePoint Farm.

I have tested index Mngr_Id :
Measurement before setting the index:
EnsureListItemsData#6 (1575.84 ms)
Measurement after setting the index:
EnsureListItemsData#6 (675.89 ms)

2. Change the CAML query:
2a. Using subfolders. That calls for re-organization items in the document , a folder name should match the Manager Title. This was you MAY probably specify from what view you can select in the spdatasource control;


2. To analyze the changed web application settings:
We have to keep the default settings.
Default:
List View Lookup Threshold 8
List View Threshold  5000

Instead of:
Modified config threshold settings:
List View Lookup Threshold 36
List View Threshold 500 000

This allows us to restrict developers beforehand and optimize the structure and code.

Wish you a fast SharePoint site and calm administrative days)