SharePoint
Next time on Information Worker
If you follow the IW website you may have seen that the September community meeting in Jo’burg would be about SharePoint 2010 Deployments. That has changed to something far more exciting: Double Demo Day!
Double Demo Day means we get to see two members of the community do a demo of something very interesting.The demos are:
Creating Workflows with SharePoint Designer 2010, InfoPath and Visio
Creating workflows with Visio 2010 and SharePoint Designer 2010 has never been easier. In this session I’ll go through the process of rapidly creating and deploying workflows in a SharePoint 2010 environment.
This will be presented by Ridwan Sassman, who helped us out last month with video taping the session.
Branding SharePoint 2010 with MasterPages, Layouts and CSS
One of the largest limitations of WSS3.0 and MOSS2007 is the ability to brand SharePoint without intricate knowledge of the platform and in some cases breaking a few rules and modifying out of the box system files to get the desired look and feel. Come and see how the theming engine in SharePoint 2010 together with CSS, Master Pages and Layouts can be used to brand your SharePoint site using the amazing new SharePoint Designer 2010.
This will be presented by Brent Samodien. If you have been to a SLAB’s you will know Brent as he helps us with the venue!
October
Looking ahead to October – there is no Jo’burg community meeting. Why? ‘cause we will all be at Tech·Ed Africa 2010! If you haven’t registered then you must do so NOW! Or you could try and win a free entry!
Tech·Ed Africa 2010: Want to go for free?
Win 1 of 4 Tickets to Microsoft Tech·Ed Africa 2010 worth R6 150 each!!!
Venue: ICC Durban
Date: 17th - 20th October 2010
All you need to do is take a photo of a Microsoft Tag in a really cool/funny/practical place and upload the picture to the Facebook competition page.
More details in the competition animated video here.
Full Competition Rules on our Facebook page.
Dates for Submissions & Announcements of Winners:
- 25 Aug 2010 - Last Date For Submissions (week 1) (5pm)
- 27 Aug 2010 - Week 1 Winner Announced
- 01 Sep 2010 - Last Date For Submissions (week 2) (5pm)
- 03 Sep 2010 - Week 2 Winner Announced
- 08 Sep 2010 - Last Date For Submissions (week 3) (5pm)
- 10 Sep 2010 - Week 3 Winner Announced
- 15 Sep 2010 - Last Date For Submissions (week 4) (5pm)
- 17 Sep 2010 - Week 4 Winner Announced
Submissions & Announcements of Winners:
- A new winner will be selected weekly.
- Last date for submissions for a particular week is 5pm Wednesday of that week.
- Winner for that week will be announced on the Friday.
- Submissions after 5pm will count towards the following week.
- Submissions which did not win in a previous week will still be considered in following weeks and need not be re-submitted.
- A person can only win once, thereafter all his other submissions will be ignored.
- You cannot submit on behalf of another person.
- Submissions are done by posting a photo to the Facebook page wall.
Terms and Conditions apply:
This competition is limited to Tech·Ed Africa 2010 entrance and does not include Travel, hotel or any other expenses. You will be required to help out at the Developers Community Lounge at Tech·Ed Africa 2010 for 3 hours a day if you do win. For Full list of rules please consult the Facebook page.
It's Dev4Dev's time again!
My favourite gathering of developers happens 2 or 3 times a year, it’s called Dev4Devs. This is a free event which Microsoft runs, where ANYONE can present a topic but they only have 20min! This means that in a morning you see 7 topics and rather than getting swamped in all the details you dive directly to the really important parts.
The topic list is below, and there is some exciting topics there and even some non-MS technology is covered too!
I am also really glad that the entire ATC team at BB&D, which is the team I work in, is presenting – they are highlighted in the list below!
The next one comes on the 4th September 2010 and it occurs at Microsoft’s offices in Johannesburg and you can register at https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032456806&Culture=en-ZA
Session List for Dev4Devs
Windows Phone 7 - Getting Started
A high level introduction to getting started with Windows Phone 7 development including: where to begin, options for developers, thinking about design and a demonstration application.
Presenter: Johannes van Schalkwyk
Making MVVM easy
Starting with WPF, Silverlight or WP7? Heard of MVVM but think it’s WAY too complex for your simple application? Join me for a crash course using the easiest MVVM framework available… Caliburn.Micro!
Presenter: Rudi Grobler (ATC Team Member)
Why you should care about Google Closure
Closure is a modularised set of JavaScript libraries that can assist you in building rich internet applications.
It's been battle-tested by Google on sites like: Gmail, Google Docs and Google Maps.
Attend this short intro to get an understanding of how important these libraries are and why you should consider using them in your next big internet app.
Presenter: Simon Stewart
Introducing NHibernate 3
The daddy of .NET ORM is back with a new release, in this session you'll see a few of the newest features - such as a full IQueryable LINQ provider - that makes NHibernate 3 the best release yet!
Presenter: Kevin McKelvin
Branding SharePoint 2010 with MasterPages, Layouts and CSS
One of the largest limitations of WSS3.0 and MOSS2007 is the ability to brand SharePoint without intricate knowledge of the platform and in some cases breaking a few rules and modifying out of the box system files to get the desired look and feel. Come and see how the theming engine in SharePoint 2010 together with CSS, Master Pages and Layouts can be used to brand your SharePoint site using the amazing new SharePoint Designer 2010.
Presenter: Brent Samodien
Unit Testing - Code Coverage & Mocking
In this presentation William will demonstrate how code coverage tools help measure the effectiveness of your unit tests. He will also show how Mocking tools can help to add value to your unit tests and ensure that all edge-case logic is properly checked.
Presenter: William Brander (ATC Team Member)
Getting ready for Windows Azure development
Heard about the cloud? Excited about the possibilities? In this session we have a 1000-mile introduction to Microsoft’s operating system for the cloud, Windows Azure, how it compares to the other cloud offerings that are out there and how to get your hands dirty with the skill-up process. Endless possibilities + new tech = fun stuff.
Presenter: Ryno Rijnsburger
An introduction to Mercurial Source Control
Want a quick introduction into a Distributed Version Control System (DVCS)? Meet Mercurial it is a cross-platform, fast, lightweight source control management system designed for easy and efficient handling of distributed projects.
Presenter: Zayd Kara (ATC Team Member)
Making money with Coded UI
Coded UI is a brand new feature of Visual Studio 2010 which enables you to quickly build automated user interface tests for your application and run them as if they were unit tests. In the talk we will look at how Coded UI can change your life, one UI at a time!
Presenter: ME! (ATC Team Member)
Hack .Net in 10 Seconds - Why obfuscation is critical
Hacking 101 – I demonstrate how to bypass basic copy protection in an unobfusctaed .Net application through reverse engineering and show how obfuscation adds a layer of protection. I also demonstrate additional techniques for protecting your applications from hacking once they are released in the wild.
Presenter: Mark Pearl
Composite Applications with PRISM
In this session Stephan will demonstrate how to leverage the Composite Application Libraries to create modularized applications for WPF and Silverlight. He will also show you how to do multi-targeted development by sharing lots of code between the web and desktop applications.
Presenter: Stephan Johnson
An Introduction to Pex and Moles
An introduction into Pex and Moles, covering the basics of Mole Types and Mole Stubs and Parameterised Testing.
Presenter: Dave Russell
ASP.NET Dynamic Data
I will briefly introduce ASP.NET Dynamic Data by showing how to build a complete data maintenance web application with almost zero code.
Moving on, I will demonstrate some standard ways of customising a Dynamic Data application, and some more advanced non-standard customisation techniques. I will finish off by illustrating how Dynamic Data libraries and controls can be leveraged in other applications that don't normally use dynamic data.
Presenter: Brady Kelly
ASP.NET MVC 3
As you probably already surmised, ASP.NET MVC 3 is the next major release of ASP.NET MVC. Join us as we highlight the upcoming features and modifications to this popular framework.
Presenters: Jaco Pretorius and Kobus Brummer
ALM in 2010
Here is the slides from my talk on Application Lifecycle Management in 2010 which I did for the Information Worker user group.
Here is the blurb for the session
You can download the slides and the white paper from the IW site.Development is not just about writing code and pressing compile. It is a process, which starts long before code is written and extends long after the compile is done and this process includes a lot of management - this process is called Application Lifecycle Management (ALM).
SharePoint development is not immune to this and this presentation looks at what the landscape and tools are like for ALM in 2010 and how it relates to SharePoint development.
How to create an adapter for the TFS Integration Platform - Appendix 2: SimpleDictionary
Note: This post is part of a series and you can find the rest of the parts in the series index.
For my WI adapter I needed an implementation of Dictionary<T,V> which could be serialised and unfortunately the .NET one can’t. So I threw together a simple implementation of one using two List<T>. It is not perfect for every possible time you may need an alternative to Dictionary<T,V>, for example the only item manipulation I have is to add an item and clear all items, but it is great for my needs in the case:
[XmlRoot("simpleDictionary")]
public class SimpleDictionary<Key, Value> : IEnumerable, IXmlSerializable
{
private List<Key> keys = new List<Key>();
private List<Value> values = new List<Value>();
public List<Key> Keys
{
get
{
return keys;
}
}
public List<Value> Values
{
get
{
return values;
}
}
public IEnumerator GetEnumerator()
{
return (IEnumerator)new SimpleDictionaryEnumerator(this);
}
public void Add(Key key, Value value)
{
keys.Add(key);
values.Add(value);
}
public void Add(object o)
{
KeyValuePair<Key, Value>? keyValuePair = o as KeyValuePair<Key, Value>?;
if (keyValuePair != null)
{
this.Add(keyValuePair.Value.Key, keyValuePair.Value.Value);
}
}
public void Clear()
{
keys.Clear();
values.Clear();
}
#endregion
private class SimpleDictionaryEnumerator : IEnumerator
{
private SimpleDictionary<Key, Value> simpleDictionary;
private int index = -1;
public SimpleDictionaryEnumerator(SimpleDictionary<Key, Value> simpleDictionary)
{
this.simpleDictionary = simpleDictionary;
}
#region IEnumerator Members
public object Current
{
get
{
return new KeyValuePair<Key, Value>(simpleDictionary.keys[index], simpleDictionary.values[index]);
}
}
public bool MoveNext()
{
index++;
return !(index >= simpleDictionary.keys.Count);
}
public void Reset()
{
index = -1;
}
}
public System.Xml.Schema.XmlSchema GetSchema()
{
return null;
}
public void ReadXml(XmlReader reader)
{
if (reader.IsEmptyElement)
{
return;
}
XmlSerializer keySerialiser = new XmlSerializer(typeof(Key));
XmlSerializer valueSerialiser = new XmlSerializer(typeof(Value));
reader.Read();
while (reader.NodeType != System.Xml.XmlNodeType.EndElement)
{
reader.ReadStartElement("keyValuePair");
reader.ReadStartElement("key");
Key key = (Key)keySerialiser.Deserialize(reader);
reader.ReadEndElement();
reader.ReadStartElement("value");
Value value = (Value)valueSerialiser.Deserialize(reader);
reader.ReadEndElement();
this.Add(key, value);
reader.ReadEndElement(); // for keyvaluepair
reader.MoveToContent();
}
reader.ReadEndElement(); // for root
}
public void WriteXml(XmlWriter writer)
{
XmlSerializer keySerialiser = new XmlSerializer(typeof(Key));
XmlSerializer valueSerialiser = new XmlSerializer(typeof(Value));
for (int counter = 0; counter < this.keys.Count; counter++)
{
writer.WriteStartElement("keyValuePair");
writer.WriteStartElement("key");
keySerialiser.Serialize(writer, this.keys[counter]);
writer.WriteEndElement();
writer.WriteStartElement("value");
valueSerialiser.Serialize(writer, this.values[counter]);
writer.WriteEndElement();
writer.WriteEndElement();
}
}
}How to create an adapter for the TFS Integration Platform - Appendix 1: Power Tips
Note: This post is part of a series and you can find the rest of the parts in the series index.
Throughout the series I have share a bunch of power tips for making this easier and this is a quick cheat sheet of them all.
From Part II: Getting Started
- Power Tip: Once you have completed the tools install, go into to SQL Server and backup the TFSIntegrationPlatform database immediately. There are not only a few odd bugs that roam around which may cause you to need it but if you want to test on a clean environment, a restore is quicker than a reinstall.
- Power Tip: Make a common root for the TFS code and yours (in my case I used RangersCode) and then create sub directories in there for platform and your code (so I had My Production and MS production folders under RangersCode). This helps keep the items close, which makes things easier later plus keeps them separate so you can identify them.
From Part III: Overview of adapters
- Power Tip: The TraceManager puts all information written to it in the log files, so please make sure you do not put any sensitive information in there.
From Part IV: IProvider
- Power Tip: Using Visual Studio 2010’s new “Generation from usage” features makes this stage of development much easier.
From Part V: Items (IMigrationItem & IMigrationItemSerializer)
- Power Tip: VC stands for Version Control. This refers to an adapter that works with the source control aspects of the system. WI, work items, and WIT, work item tracking, are the same thing. File attachments in WI are NOT regarded as VC and must be handled by your WI adapter.
- Power Tip: When you are downloading files in the IMigrationItem, you are responsible for the creation of the path too. So make sure you are creating directories and also checking what directories exist too.
From Part VIII: IMigrationProvider
- Power Tip: In my implementation I used the very useful Path.GetTempFileName() from the .NET framework to get a place to put the file. However this causes an empty temp file to be created automatically and the platform doesn’t like that, so I needed to delete the temp file after that, and then call Download.
- Power Tip: For folders creation or for deletes of files/folders you can use the Path property of the action to get the folder name.
From Part IX: IServerPathTranslationService
- Power Tip: The neutral path, or canonical path as it is correctly named, is a path that is “Unix like”, (I.e. /src/project/). However these do not follow all the same rules as true Unix paths. For example : is a valid character in the path.
How to create an adapter for the TFS Integration Platform - Part X: Reflection on SharePoint
Note: This post is part of a series and you can find the rest of the parts in the series index.
This post is not a technically heavy, like the most of the series, but more a reflection on what I learnt about integrating to SharePoint. This information will hold true for any type of work with SharePoint, not just if you are creating adapters.
What I used
For the WIT adapter I used on the lists.asmx web service, which allows you to work with list items. While with the VC adapter I used both the lists.asmx and copy.asmx web service and I ended up using some WebDav methods too. You may be asking why I needed lists.asmx with VC – because of SharePoint Rule #1 “Everything is a list” – even a document library. The copy web service allows for files to be uploaded to SharePoint.
My goal was to use just web services, which are one of the three ways you can interact with SharePoint the other two being WebDav and the API. The API is better than web services in every aspect (it is faster and more feature complete) but has a serious limitation, you MUST run the application using the API on the same server as SharePoint is install on. It makes it really only useful for tools used by SharePoint admins or web components, like web parts. WebDav is a standard for talking to web services and is generally regarded as a poorer implementation compared to the web services because it does much less.
In the end I had a bug with file deletion in the VC adapter when using the web services. After much fighting, I gave up and used WebDav for that one function.
What I learnt
If I rewrote these adapters I would use mostly WebDav and only use the lists.asmx web service for meta information tasks rather than manipulation. This is because while the WebDav implementation does less, it does all the fundamentals (create, update, delete) and it does it faster and more reliable way than the list and copy web services. The lists.asmx web service would be used only for getting item ID’s, lists of items, files and folders and maybe renaming since WebDav can’t rename. This would allow me to drop the copy web service would give me faster adapters and cleaner code in less time.
How to create an adapter for the TFS Integration Platform - Part IX: IServerPathTranslationService
Note: This post is part of a series and you can find the rest of the parts in the series index.
IServerPathTranslationService takes the path to your source control item and translates it into a platform neutral path and visa versa. An example for this is if you were moving files between Windows and Linux. On Windows your path may be c:\RangersCode\My Production\ while on Linux that path needs to become/src/RangersCode/My Production/ to handle the differences you need to change it to a neutral path first.
The amount of sleep that I lost on path translation is embarrassing because the concept is dead simple, applying it correctly is ridiculously hard. The de facto guide for how this should work can be found on Willy-Peter’s blog, however there is also an update based on a lot of question asking by me which you may want to read.
This is only needed for VC adapters so if you just want a WI adapter you can skip this.
Power Tip: The neutral path, or canonical path as it is correctly named, is a path that is “Unix like”, (I.e. /src/project/). However these do not follow all the same rules as true Unix paths. For example : is a valid character in the path.
The two methods you need to implement are:
TranslateToCanonicalPathCaseSensitive
This method requires you provide a neutral path for one of your paths. For me this is simply just putting a leading slash on the item’s URL:
public string TranslateToCanonicalPathCaseSensitive(string serverPath)
{
TraceManager.TraceInformation("WSSVC:TranslationToCanonical - {0}", serverPath);
string localPath = string.Format(CultureInfo.CurrentCulture, "/{0}", serverPath);
TraceManager.TraceInformation("WSSVC:New:{0} -> {1}", serverPath, localPath);
return localPath;
}
TranslateFromCanonicalPath
This method is the reverse from TranslateToCanonicalPathCaseSensitive it takes a neutral path and provides one that applies to your adapter. In my case it meant dropping the first character and making sure I had an absolute URI:
public string TranslateFromCanonicalPath(string canonicalPath, string canonicalFilterPath)
{
TraceManager.TraceInformation("WSSVC:TranslationFromCanonical - {0} - {1}", canonicalPath, canonicalFilterPath);
string result = new Uri(canonicalPath.Substring(1)).AbsoluteUri;
TraceManager.TraceInformation("WSSVC:TranslationFromCanonical:Result {0}", result);
return result;
}
First in the Platform’s Eyes
There is an interesting thing that the platform does when it comes to server path translation, it creates this class first. This is before anything else, like the configuration service, so you need to make sure this class relies on very little, if any ,outside information. During the creation it also takes the root path from the filter items in your configuration and passes it to TranslateToCanonicalPathCaseSensitive to get the root neutral path. It needs to know this because it will want to strip this information out when it passes it to the other adapter and add it back when other adapters pass their paths to you.




I am a community lead in this group.