Wednesday 12 September 2012

Switching version settings in a document library

Overview:  I got asked a question on Document libraries which is rather obvious but I needed to check this out.  If a Document Library is set to use "Major and Minor Versions" what happens to the minor versions when you set it to only use "Major Versions".  And the answer is... Nothing.  The historic versions work as they previously did (while under the minor and major verions), when the documents are edited they will automatically now only use major versions in SharePoint.

 

Monday 10 September 2012

Scrum for SharePoint - Part 2

See Part 1

Technology: I am using Team Foundation Server 2012 Release Candidate.  I believe the best tools for the scrum team are offered through Visual Studio. VS 2012 has all the features and VS2010 can't do specific tasks such as create projects however I've found using VS2010 to work well.  The template used in TFS is the Visual Studio Scrum 2.0 template.   Also see http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/DEV212

Ways to work for TFS:  VS has the most comprehensive feature set for working with TFS 2012.  You can also use the TFS web UI, the SharePoint Foundation UI that is hooked up to TFS or excel and then import the data.


Creating PBI's: The screen shots use TFS2012 RC & VS2010.  I have annotated the screenshot to help with input of PBI's.  Not the priority is set from 1-1000 (default is 1000 which is the lowest priority).  I like to use Mike Cohan's planning poker (uses a relative Fibonacci sequence number to assign relative effort weight).  The scrum team vote on estimated effort after an understanding of the user story is complete.  Optional. Free tool to use for planning poker   Try this, a friend of mine built this while playing around for Scrum Poker Planning. 

The scrum master has to accept the PBI and for me to do this I need 3 pieces of information namely: the user story, acceptance criteria & additional detail short clear information such as an annotated Balsamiq mock-up.  Obviously the product owner  may negate the need for additional information but often they need to get this information from someone else in the business and I find mock-ups invaluable for clarifying to all people visual requirements.  Lastly, ensure that the team understand INVEST principles for  (Independent, Negotiable, Valuable, Estimat-able, Small, and Testable) for each User Story/Requirement.

Acceptance criteria is needed for each PBI.  This would be good to have in the Sprint planning meetings.  This is the format I recommend (gherkin language).
Scenario:
  Given
  When
  Then

An example I have is
Scenario: Employee requests leave
  Given an employee has sufficient leave available in the year
  When the employee schedules leave (holiday)
  Then the employee is informed his request is valid and his manager is informed of the request.

Acceptance Criteria – “What is Acceptance Criteria? Put simply, it's the criteria that defines what "Done" means for each PBI. Acceptance Criteria is critical to the success of a Scrum team, as it becomes the handshake between the Product Owner and the team -- it helps define what the team is committing to.”  http://www.nomad8.com/files/acceptance_criteria.php
"Pre-established standards or requirements a product or project must meet" Google's definition of acceptance criteria.
Normally acceptance criteria focuses on functional user stories but you also need to cover NFR's such as performance.  Negative acceptance criteria is often overlooked when creating AC's and do the AC's before development starts, you can always change them later.
An alternative to Gherkin for writing the acceptance criteria is to use checklists to ensure the User Story does what the business stakeholder wants and the developer has developed it correctly.

(Story Board)

The TFS 2012 Scrum template provides a good overview of the current sprint.  Team favorites are dropped from TFS queries to provide useful insights into the project.


Key Meetings:

1. Daily Stand-up (max 15 minutes):  I like to perform these at about 10:00 every day in the morning.  Each person tells the group: done/achieved in the past 24 hrs, what they are doing in the next 24 hours and brings up any blockers/obstacles/impediments.  I like to take notes as the scrum master and as the team falls into place.  I let team members run the daily stand-up scrum meeting in random turns once we all know how to do them and it seems to work well with communications in the team and I take summarized notes and I use the format:  Date, Time, Attendees, Each attendee summary & general meeting notes:  e.g. Adam and Paul were late for the meeting, blockers were not recorded, Kanban board was not updated....
Rules: Start at 10:00, be concise (part items that are taking to long and get the people to talk after the meeting), all participants to stick to the format: last day, today and blockers.  It always ends at 10:15 and leave the area.  Listen to the appoint meeting scrum master and they need to stop ongoing discussions.

2. Demo Meetings:  Date, time, attendees & roles, problems & suggestions.  Do at the end of sprint, tend to be 30 minutes to 90 minutes per demo each sprint. 

3. Sprint Review Meeting: Done at the end of a sprint cycle after the sprint is over.  Ensure each PBI is reviewed.  Often used with demos to validate each PBI and this allows the Product Owner to evaluate the PBI's fulfillment and make changes if necessary.  Important but can be skipped by the whole team as long as the PO does it and is happy.

4. Sprint Retrospective Meeting: Optional meeting to identify improvements that can be made.  I use this meeting after the Sprint Review at the end of the 1st 2 or 3 sprints and then only periodically as the project progresses.  Tip: Use the format: Glad, sad, bad game.  https://app.scatterspoke.com for managing Retrospectives.  An alternative is to the approach: What went well, What didn't and What needs to happen.


I've seen many different formats for running retrospectives, and a good default option for me is "mad, glad, sad". I also like the Danish baking Retrospective that I saw recently.  
Azure Devops Danish Baking Retrospective Board

A nice feature I was shown recently was to "Include a Team Assessment".  I'd use it every 3-4 sprints assuming we are using 2 week sprints, the results are a great indicator of confidence and the teams position.
Team Assessment in DevOps Retro board 

5. Sprint Planning Meeting:  Have a sprint goal.  Done at the start of the sprint cycle.  The scrum team and the product owner identify items from the product backlog to go into the sprint.  The last part of the meeting is to create a sprint backlog to implement each item selected from the product backlog.  I also like to have a grooming of stories in the previous sprint to ensure the whole team know what is likely to come along and tech can feedback to the PO/stakeholders.

Agile for SharePoint
Scrum for SharePoint - Part 1
Scrum for SharePoint - Part 2 (This Post)
Scrum - Part 3 - Scaling Scrum
Scrum - Part 4 - Kanban and Scrum
Scrum - Part 5 - Certification PSM 1

Sunday 1 July 2012

Azure Web Sites

Overview:  I love Azure.  There is just so much we can now do and a new feature released in June 1012.  The "web sites" function in Windows Azure (WA) are extremely flexible and this post shows how you can create a website using various templates in my case a Joomla CMS web site complete with a My SQL database.

There are a lot of options for using Azure web sites such as creating your own web sites in Visual Studio and uploading them to the Web Site role (all for free).  In this post I'm looking at leveraging a CMS to create a web site.  Windows Azure offers up to 10 free web site roles.  There are a lot of templates in the gallery so I feel this is a great place for design agencies and small business that need commercial web sites such as CMS, blogs ect.  They even have the WordPress template.

Steps to get Joomla working:
You will need a Windows Azure (WA) account, you get a free 90 day trial and if you hook your MSDN to it you get a decent amount of extra cloud computing hours thrown in. But for the 10 free "web sites" you don't use your cloud hours - it's free!

Once you are logged into the portal click the Add (+ button on the bottom left of the screen to add new services.  In this case select "Web Site" > "From Gallery" as show below.
Select the "CMS" tab and in my case I chose the "Joomla" template.
 Add the site name and login credentials as prompted (you can add a CName record later).
 The web site is created that backs onto my MySQL database.
Check the url and build your site.
Summary:  Web sites in Azure are easy, they are backed up by MS, there are tons of templates or build your own options, it free.  Microsoft is adding functionality and new services to Azure quickly and is easy to use.    

Scrum for SharePoint - Part 1 Introduction

Overview: Scrum is an Agile methodology that is useful for SharePoint projects as it allows for discovery/refinements of requirements as opposed to formally knowing all the functional requirements of a system upfront.  Each project lends itself to specific methodologies however, an Agile approach is often more suitable for SharePoint projects.  For larger, more formal projects I like MSF but traditional SDLC methodology run projects also work well.  Scrum is one Agile methodology and probably the most commonly used.  As with all projects I recommend following a methodology but lend from other and take out what isn't working to get the optimal process.

Scrum for Dummies:  Scrum consists of 3 types of team roles: the product owner/s, scrum master and the rest are team members.  Tam sizes should be less than 7-8 people (if bigger use scrum of scrums).
1.) The Product Owner is responsible for creating user stories.  These are specified in the form: As the <role> , I want to <feature> so that <benefit>.
2.) From the User stories I create Product Backlog Items (PBI's), Scrum is broken up into sprints (usually 2-4 weeks).  The sprint kicks off with a Sprint planning meeting that involves the entire team.  PBI's are broken down into tasks, tests and bugs.  During the sprint planning, the team members commit (renamed to forecasting in 2016) to the PBI's in the sprint and creates a "Sprint Goal".  I usually set apart 3-4 hrs to complete the Sprint Planning session at the start of each sprint.
3.) Daily scrum meeting takes 15 minutes facilitated by the scrum master.  Each team member states what they accomplished in the last day, what they will be working on in the next day and any blockers.  When the team members start a discussion, shelve it and they can have a separate meeting outside the scrum to avoid over running on the scrum meeting.  Do scrum meetings standing it helps make the sprint/team finish on time.
4.) At the end of each sprint, there must be a potential deployment.  Hold a scrum retrospective, this is to work out the team velocity (are the PBI's and features being achieved) and work out how productivity can be improved.
5.) Documentation:  Scrum is not document intensive but aims to get features right not finish at a specific point.  The documents generated by scrum are:
5.1) User Stories and corresponding Acceptance Criteria
5.2) Meetings (Daily scrum minutes/decisions, sprint planning agreements/outcomes & retrospective minutes)
5.3) Whiteboards (architecture diagrams and user story refinement)
5.4) TFS recorded data 
5.5) Communications (emails about decisions, supporting information, this could also include pptx from presentations, user reviews).

TFS:
  • SharePoint has a lot out of the box and using Scrum allows for better technical decisions whereby team members often identify OOTB solutions which hopefully eradicates the common developer mentality of using .NET to do existing SP functionality.
  • There are Templates for Scrum download and base your project off them.
  • Microsoft offer a great free services called TFSPreview (http://www.tfspreview.com/) which is a SaaS offering TFS 2010, doesn't have all the features but it is amazing and best of all it has a built in Scrum template so I'd always start with this and if you feel you are being to restricted you can always go for a on premises option. VSTS (cloud service) is the current name for TFS preview Oct 2017.

Agile for SharePoint
Scrum for SharePoint - Part 1 (This post)
Scrum for SharePoint - Part 2
Scrum - Part 3 - Scaling Scrum
Scrum - Part 4 - Kanban and Scrum
Scrum - Part 5 - Certification PSM 1

Friday 29 June 2012

Azure WCF Role - url issue

Problem:  Created a WCF service using Visual Studio (VS) 2010, I called my endpoint TimesheetBOL.svc.  This WCF worked perfectly when deployed locally but then I used the Azure emulator or the Azure Service role, the scv endoint was pointing to the local machine and not using the host header.
Here is the issue. I have a simple service that I deployed to Azure. It is accessible via:
http://tspaulbeck.cloudapp.net/TimesheetBOL.svc but the link to the wsdl uses the internal machine name instead of the host header, like this:
svcutil.exe http://rd006123e/TimesheetBOL.svc?wsdl Obviously, the wsdl is not accessible.

WCF test util throws the following error:
The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
Server stack trace: at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()

Resolution:  Us an attribute supported in .NET 4, "useRequestHeadersForMetadataAddress".




Thursday 28 June 2012

Working with SP2010 offline

Problem:  Often users are disconnected from SP2010 on premises, they need to work with data and update the SharePoint farm with the changes.

Initial Hypothesis:
Groove 2007 (Ray Ozzies company bought by MS) was the approach for off line content for MOSS, it is not call Workspace 2010.
Lists can be exported to Excel (this can be kept in sync or decoupled, the 'Design tab > Refresh' ribbon button will pull the current list data). 
Access can be used to retrieve and write back the data to the SP list. 
Outlook "You can synchronize a SharePoint library, contact list, task list, Project task list and a certain type of SharePoint external list with Microsoft Outlook 2010. Because many SharePoint 2010 users also use Outlook 2010 to collaborate and coordinate activities and projects, the ability to synchronize these libraries and lists can help you become more efficient, especially if you work offline or don’t have convenient access to your SharePoint sites all the time."  microsoft.com

Resolution:
  • Workspace 2010 is brilliant for offline conent watch out as it doesn't work with SP calendars and come other conent types such as publishing pages.  Also not the size is limited to 2GB or 30,000 items per list/document library.
  • Excel is a great option for working with data out of SharePoint and it can be kept current.  Maximium number of items is limited to 50,000.
  • Access can either take the data as an export from SP or have it linked to the live SP list.  Working with the live data can not use SQL/Query builder in Access.  Updating any data in Access will update the SP lists, so useful for updating data as opposed to Excel being read-only of the data.
  • Document librarts can be brought into Outlook allow for offline usage.  Calendaars can be overlayed and tasks are easy to setup with 2 way sync.

Wednesday 27 June 2012

SP2010 List View Throttling

Overview:  IT pro's and developers in SP generally understand the properties that can be used in setting list views in SP.  Users of SharePoint and department site collection administrator types seem to find it confussing.


How Lists Throttling Works - Simplified:
SharePoint's default list view threshold is 5000 items.  This does not mean the list is up to 5000 items simply that your list view will querry the list and work with a maximum of 5000.  Now the point to understand is that if you are filtering on 6000 rows event though you are displaying 100, you have passed the threshold as you need to look at all 6000 that you are filtering/sorting.  If you add an index to the property that you are filtering/sorting on, it will work. 

"For a view to quickly filter through a large number of items, the first column that you specify in the filter must be indexed. Other columns you specify in the view filter may or may not be indexed, but the view does not use those indexes. You also need to make sure that the first column of the filter does not return more items than the List View Threshold, even if the final result of the filtered view returns less than the List View Threshold. " from MS.

Other:
The smallest the list view threshold can be set to is 2000 results.
List thresholds can be increase for general users, this can have performance issues.

Glyn Clough explains list view throttling clearly in more detail.

Steve Peschka explains working with large lists.
Tutorial from MS.  This blog and movies explains view limit thresholds perfectly.