Archive | Case Study RSS feed for this section

Create the Solution in Visual Studio 2012

22 Nov

I want to start putting together some branding stuff to deploy, so I need to create a solution and some base projects before I get started.

I have decided on the following projects to start off with

GISIT.SharePoint.Branding – Masterpage, css, images, page layouts, theme
GISIT.SharePoint.PageComponents – Webparts (if we decide to add apps later we will need to add a different type of project specific to apps but I’m not sure on this yet)
GISIT.SharePoint.Common – This will be a class library for constants or any common SharePoint functions. There are two ways this could be implemented, a class library or a sharepoint project. The difference between these is the class library needs to be added as a dll to the SharePoint package of any other projects (branding and page components wsp’s), whereas the WSP way would allow you to directly deploy and update the dll directly using the wsp built. If something needed to be only changed in the dll such as a constant value, we will have to to an update on either the branding or page components, which I am happy with at this stage.

1. Open Visual Studio

2. Create a new project.
Name it [Company].SharePoint.Branding
Select SharePoint 2013 Empty Project
Change the solution name to [Company].SharePoint

3. Click on the solution and add a new project

4. Select Class Library (or SharePoint 2013 Empty Project if you want to deploy this as a WSP)
Name it [Company].SharePoint.Common

5. Create another new project in the solution.
Select SharePoint 2013 Empty Project
Name it [Company].SharePoint.PageComponents

6. Right click the whole solution and select Rebuild

7. Add the common dll to the branding and page component projects. First go to the branding project and right click Reference. Click on Add Reference.

8. Click on Solution on the left hand side, then select [Company].SharePoint.Common. Click OK

9. Double click on the package for branding.

10. Click on the advanced tab

11. Click on Add, then Add Assembly from Project Output

12. Select [Company].SharePoint.Common then click OK

13. Save the package file and follow the same steps for the Page Components project.

14. The project is now ready for us to start adding content to. Starting with branding.


What’s new in Branding ?

22 Nov

I created the main (and only) site collection with the team site template. Before I start looking into the new branding features I have to figure out what’s new in SharePoint 2013 and decide the best way of creating the master page and theme etc.

Firstly lets look at what we get when we use the Team Site Template

Site Settings

Themes don’t use office themes anymore but instead use two xml files with the extensions .spfont and .spcolor. These are then used in Composed looks.


Composed Looks are new to SharePoint 2013 and allow users to choose a masterpage, fonts, colors and a background image.

Composed Looks

To create a new composed look, click on new item in the composed looks gallery. Here you can specify the links to your masterpage, spfont, spcolor and an image.

Composed Looks Creation

Composed looks can be applied by clicking on Change the look under Look and Feel in Site Settings.

More info on creating themes and composed looks:

Composed Looks

Lets Activate the Publishing Features

Head to the Site Settings Page and firstly activate the publishing Site Collection Feature. Site Settings > Site Collection Administration > Site Collection Features > Activate SharePoint Server Publishing Infrastructure.

Publishing Features

We have some additional items under Look and Feel now, Design Manager, Device Channels, Import Design Package and Navigation.

Device Channels

This allows you to define a different master-page for different devices. We won’t be implementing device channels, and there’s a couple of posts already that explain this in detail so I will link these

Import Design Package

There is now an option to export design packages, what this includes is changes to the Master Page Gallery, Style Library, Theme Gallery, the Device Channels list and Page content types (msdn article on this). This is a WSP file of the branding components required (excluding  pages, navigation settings, or the term store). This allows designers to export and import design packages without the use of Visual Studio. I will cover this a little more in the next post about implementing branding where I export out one of these packages to take a look at what’s in the WSP.


Navigation looks the same other than the new managed metadata navigation. This allows users to define their navigation as a hierarchy in the term store. NOTEEEE this is ooonly useful if you want the navigation to be on one site, yes site, not site collection :(. I was quite looking forward to this, but maybe in future this will be available across at least a whole site collection. To read about setting this up go to this Nothing But SharePoint Post. Heres a link to an MSDN article that covers talking to the metadata navigation programatically I’d be very interested to see if someone will create custom navigation that programatically talks to the managed metadata navigation that is associated with the top site / main site collection making it cross site and site collection. Maybe one day….

Design Manager

Design manager allows users to manage page layouts, masterpages and the look and feel of the site by mapping the SharePoint files to a file location where they can edit them using Visual Studio, Notepad++, Dreamweaver or any other tool they prefer. The file a user will edit has commented out snippets of SharePoint Masterpage code that they can work around. SharePoint Brian has covered each of the areas of the design manager here.

To demonstrate how the design manager worker with dreamweave Steve Peschka  has written a great step by step guide. This will give you an idea of how SharePoint works with dreamweaver as well as importing an existing html design and turning that into a masterpage.

Lets Activate the web’s Publishing Feature

Go the Site Features and activate SharePoint Server Publishing

This gives us a Pages library, changes the main URL and gives us more options in the Look and Feel menu.

Most of this is the same as it used to be. There is a new option in the Master page  menu which allows you to use the css file associated with your master page (in the master page gallery you can set this on the master page item). All items set in here apply to all channels, so some sizing etc may need to be overwritten in the other device master pages CSS files.

The welcome page url will need to be changed to a page in the pages library. At this stage there isn’t any pages, so you will need to create a default page and point the welcome page url to there.

Image reditions help optimise images for mobile devices, to use this you have to enable the blob cache however. Walk has written a blog post on this for more information:

The site url will change from /_layouts/15/start.aspx#/SitePages/Home.aspx to /SitePages/Home.aspx.

What have we decided so far for our branding implementation?

From what I have played around with so far and read, I prefer the idea of creating my own solution for branding and not exporting anything (this seems cleaner and you will see why in my next post). This means the implementation will be very similar to SharePoint 2010, deploying a master page, images and css etc. The main difference being instead of setting the masterpage and css on the spweb object on activation I suspect we will have to insert a new list item into the composed looks list and then set a property on the web which tells it what composed look to use, OR it will be the same as it used to be… We will find out!

Install Visual Studio 2012 and Office 2013 and SharePoint 2013 Developer Tools Preview

15 Nov

At this stage Visual Studio 2012 is released/RTM but the developer tools for Office and SharePoint are still in preview. The below instructions apply to the latest preview at the time of this post, which is preview 2. There will be screenshots soon anyway.

  1. Install Visual Studio 2012. You can choose to include the Office developer tools, at this stage (I THINK) the SharePoint 2010 templates will be included but not the 2013 ones.
  2. Using the Microsoft web platform installer (I’m not entirely sure if this is a must as I prefer to download and install directly instead of the platform thingy, but my brief googling didnt help find a direct link)
    Click here for the download link for the web platform installer/selection of current Office/SharePoint components needed, then click on DOWNLOAD THE TOOLS under TOOLS.
    This will select the components required and you can go ahead and install these. At the time of the post, I had to install Workflow Manager Tools for Visual Studio 2012 and Microsoft Office Developer Tools for Visual Studio 2012 – Preview 2
  3. Once these are installed, open Visual Studio and you should have the templates under Visual C# > Office/SharePoint. The first time I installed these it wouldn’t work… turns out in another session I still had Visual Studio open deerrr, after I closed this the installation went fine.

Next I will go over creating the solution and projects 🙂

Scripting Sites and Content Type Decisions (features vs. scripting vs. Manual)

15 Nov


Sites are easy to script, and having a small script to create these means when we upgrade to the full release of SharePoint I can just run the script again.

The sites that we will start out using are:

Root Web
It Support Site
Social/Fun Zone Site
— 2012
—— Course One
—— Course Two
— 2013
—— Course One
—— Course Two

This will change as we properly script the courses once we have a full list as well as have the template implemented. For now a few empty course sites will do for development.

  1. Run up SharePoint 2013 Management Shell
    You may get the below error, but this can be ignored as its a preview issue: This article here mentions this
    could not create a CmdletConfiguration for CmdletName Start-BulkOperation, Cmlde
    tClass , CmdletHelpFile C:\Program Files\Common Files\Microsoft Shared\Web Serv
    er Extensions\15\CONFIG\PowerShell\Help\Microsoft.Office.Education.Institution.d
    Cannot process argument because the value of argument “implementingType” is null
    . Change the value of argument “implementingType” to a non-null value.
  2. I have saved the following PowerShell into a file called CreateSites.ps1. I use NotePad++ for editing PowerShell. At this stage all sites will use the team site template.
    $webApp = “http://gisitportal&#8221; #<— Change thisNew-SPWeb -url ($webApp + “/support”) -Name “IT Support” -Template “STS#0”
    New-SPWeb -url ($webApp + “/fun”) -Name “Fun Zone” -Template “STS#0”
    New-SPWeb -url ($webApp + “/social”) -Name “Social Zone” -Template “STS#0”
    New-SPWeb -url ($webApp + “/courses”) -Name “Courses” -Template “STS#0”
    New-SPWeb -url ($webApp + “/courses/2012”) -Name “Courses – 2012” -Template “STS#0”
    New-SPWeb -url ($webApp + “/courses/2012/courseone”) -Name “Course One” -Template “STS#0”
    New-SPWeb -url ($webApp + “/courses/2012/coursetwo”) -Name “Course Two” -Template “STS#0”
    New-SPWeb -url ($webApp + “/courses/2013”) -Name “Courses – 2013” -Template “STS#0”
    New-SPWeb -url ($webApp + “/courses/2013/courseone”) -Name “Course One” -Template “STS#0”
    New-SPWeb -url ($webApp + “/courses/2013/coursetwo”) -Name “Course Two” -Template “STS#0”
  3. Go to All Site Contents (slightly different to normal….) Click on the cogg icon then View Site Contents, this is on the RIGHT TOP OF THE PAGE by the way.
    View Site Contents SP2013
  4. Now you will see your sites (scroll to the bottom past the “apps”). Done!
    Sub Sites SP2013

Content Types and Fields

I’ve always had issues deciding when to use features or scripted content types, or manual… They seem to fit into different situations, heres where I place them



— The content type won’t change over time
— The content type name and id must stay the same everywhere (for custom functionality relying on this)
— No one wants to run a script or create content types manually
— The user doesnt need to delete the content type

Feature Drawbacks

— Users cant delete content types
— Next time the feature is updated it either wont change anything (particularly fields at a list level), or it will override everything the user has changed
— Users may need to change content types, this means that a developer may have to keep the solution/feature content types up to date. When this is implemented into the clients environment, it can be risky in terms of whether new fields etc will be added properly, particularly at list level. Extra code can be written for a proper upgrade of the feature, but this is a bit of overhead if it isn’t normal practice.


— Easy one click deployment for the client depending where they want certain content types.
— Good for deploying content types that are hugely tied to functionality where the id’s and names, and even fields shouldn’t be changed. This also means the content type and fields are created on activation with the other relevant functionality.



— There aren’t a large amount of content types
— Content types will change heavily over time, so the user needs full control over them after implementation
— The content type may need to be deleted

Scripted Drawbacks

— Unless the client is using a content type hub, the script will need to be run against each site collection, and any new site collections in future. If the content types do change and there isnt a content type hub an admin or dev may have to keep this script up to date.


— Usually deploy once, and from there on a client can fully manage their own content types with no feature restrictions
— Can be re-used accross environments and site collections during initial deployment

Manually Create


— There aren’t many content types or fields on those content types
— There aren’t many site collections (if not using a content type hub)
— The id’s of the fields and content types don’t need to be the same, new content types and fields get a new GUID, so they would be different per site collection (if not using a content type hub)
— You don’t mind re-creating per environment (test, uat and prod)

Creating Drawbacks

— Obviously creating the same thing over and over can be time consuming
— Have to name everything the same and not make mistakes


— If there aren’t very many content types, only 1 or 2 environments and not many site collections… this would be less time consuming

Mention of the Content Type Hub…

A Content Type Hub, or Metadata Hub allows users to create content types and fields in one place. They can then publish these fields and content types out to all of the other webs/site collections so there is no need to deal with them at every level. This can be great for documents that are scared across an intranet where there may be multiple team site collections and they all share common document content types for example.

What to do???

For a start, we know what we want for content types and there aren’t many, we don’t need a content type hub, we only have one environment with no plans for more. The easiest thing we can do for this implementation is manually create the content types and fields. One thing to keep in mind, if we did want more environments, it would be best to grab the details of the existing content types and fields and re-create those using a feature or script in other environments. The same would apply for any new site collections.


15 Nov

This post will link to the various bits and pieces we do during implementation. I will upload any errors/issues we come across too.

  1. Structure (Sites and Content Types)
  2. Install Visual Studio and Office 2013 and SharePoint 2013 Developer Tools Preview
  3. Whats new in branding?
  4. Creating the solution and projects
  5. Implementation of Branding from a developer point of view (including navigation branding)
  6. Web Parts or Apps???

Solution Documentation

12 Nov

Its important to think about what we need for the solution to get started such as search requirements, content types, fields, sub sites etc. This will help out with development if we know what is required here, then I can add some test data in when I start developing.

Web Application

Name: GISIT Portal
Url: http://gisitportal

Managed Paths

There will only be one managed path for search (/search). This will be an explicit path, so there can only be one site that the url /search goes to (instead of /search/mysearchsite if it was wildcard).

Site Collections

The data requirements are quite low as there will only be around 200 documents uploaded each year. Because of this we are only going to use one site collection for the main portal. The search center will have its own site collection and will be based on the enterprise seach site template.

Site Collection Name: GISIT Portal
Database: SP2013_GISITPortal_Content_PROD
Template: Team
Url: http://gisitportal
Managed Path: /

Site Collection Name: Search
Database: SP2013_GISITPortal__Search_Content_PROD
Template: Enterprise Search Center
Url: http://gisportal/search
Managed Path: /search


Most of the content will be driven from the course sites which will be created each year.

Root Web
It Support Site
Social/Fun Zone Site
— 2012
—— Course One
—— Course Two
— 2013
—— Course One
—— Course Two


Course sites will have a template with content types and lists required already set up. This will save tutors time each year when they have to create new course sites that are the same as last year, the only difference is the documents. Documents can be easily uploaded by clicking and dragging them into a library, so this will be an easy task each year.

Page Layouts

I’m not sure at this stage what OOTB page layouts are provided with SharePoint 2013, but at this stage we would need two:

Home Page (3 column + no left hand nav)
Generic Page (2 column + left hand nav)

Managed Metadata

— WEB701
— SEC601
— ITC501
— WEB601
— WEB501
— NET501
— SYD601
— DAT701
— RES300
— PRJ300
— PRJ301
— SDV201

Course Document Type
— Course Outline
— Assignment
— Course Resource
— Generic

— JQuery
— C Sharp
[ More to be added]


Course Document Type (Single select managed metadata)
Course (Single select managed metadata)
Person Away (Single select person field)
Tags (Multi select managed metadata) – students can add new items to this
Issue Status (choice)

NOTE: Most of our fields are managed metadata, this will help students to search and refine documents based on course and type, and find discussion items easier with tags. In SharePoint 2010, search automatically set up refinements for managed metadata where the results included values for a specific field, so I am hoping this is the same if not better in 2013…

Content Types

There won’t be a lot of documents in this system, and the documents that are in the system will be for similar purposes such as a course document, or an assignment. Because of this we won’t have many content types, but will create a structure that can be expanded on in future. For documents, there is a base type called GISIT Base Document which is purely a placeholder. This will come in handy if the structure expanded significantly and another field was all of a sudden required across all documents. Instead of adding the field to all documents, we can just add it to the place holder.

— (GISIT Base Document) [placeholder CT]
—— Course Resource (Course, Course Document Type)
—— Course Document (Course)

— Course Event (Course)
— Away Today (Person Away)

— GISIT News

— Course Discussion (Course, Tags)
— Support Issue (Issue Status)

Naming Decisions
– Discussions vs. forums. We decided to go with discussion instead of forum, this is mostly a preference thing but consistency is the key here (i had used the term forum and discussion in the designs which wont be reflected in the implementation).
– Course resource vs. course document. There are two main types of documents, documents that  a tutor uploads that are purely course related, and documents that students upload which can be assignment based, class work based or group based. We decided to use Course resource for the tutor documents and course document for the students, this gives us a bit of flexibility and fields can be added later on to distinguish the different types if needed, or the content types could be extended downwards to more levels.

Lists – Top Level

Away Today (Calendar)
Course Events (Calendar)


Search is going to be fairly simple as we dont have many content types at this stage. We have however identified a couple of scopes that could be useful for students searching content!

— All Content [OOTB]
— Discussions
— Course Resources

We are hoping that the course discussion areas will be popular for students asking for help and sharing ideas. If these are tagged appropriately with subjects for certain types of issues or technologies an additional search option to search will be useful.


Only I.T students can access the system. For group assignments a new sub site will be created under the course site. The tutor will have access to this as well as the members in the group, other students wont see each others group sites. Students that are in a course will have contribute rights to their course site so they can upload items into discussions and document libraries. At the top level of the site only administrators will edit content, this is the mostly the pages library and news list, the rest of the data is rollup data from elsewhere. We will know more about this as we get further into development.


I will likely be changing this post as time goes on as there are usually changes in terms of fields or forgotten items. Also, i havent figured out all the managed metadata options for tags yet….

Infrastructure and Software

12 Nov

Today I am installing SharePoint. Everything else has been set up by Ryan for me yay. Below is the basic infrastructure we have decided to go with, all servers have server 2012 as the OS.

1 Lync 2013 server

2 AD servers

1 Exchange 2012

1 SharePoint 2013

1 SQL 2012

SharePoint (a.k.a Sauron, 1 box)

All of our servers are going to have a lord of the rings related name. I chose Sauron for SharePoint as its massive and all seeing, also it is the main interface/portal users will be going to.

We are going to use autospinstaller to install SharePoint. This is an easy script to run, you just have to update some xml with your own details.

I am doing a basic install of just SharePoint and the service apps, I will separately script the content databases, web apps and site collections if we need some (at this stage there will only be one site collection). Visual Studio 2012 will be used for development, so I will install that on my machine.


Along the way we had an issue with named instances, “error occurred while establishing a connection to SQL Server“.

User Profile Service (UPS) – Running spautoinstaller the first time failed on the UPS, this may have something to do with the script originaly failing with our database connection issues. Once we sorted out our connection issues and rolled back and started the script from the start again it installed fine with no errors