Nick Hadlee's Blog on SharePoint and Other Occasional Rants…


Is it Code? – A Rant, Response and Example of Social Media’s Reach
June 5, 2010, 1:08 pm
Filed under: Cutomisation, Rant

First up a warning! This will appear to be post that has no purpose, meanders a little, and probably has no actual conclusion (also I use all sorts of weird colloquialisms). Appearances are often correct! I didn’t plan to write it but felt compelled to in response to some effort put in Jim (@dullroar) and Raymond (@iwkid). Honourable mentions to Marc (@sympmarc) for his championing of the ‘middle-tier’ (oh brother flames and brimstone await me for the use of that term) and Mark (@mrackley) for tackling a similar question previously. Ok, ok enough with the setup; let’s get on with the show…er post.

I asked what I thought was a fairly innocent question on twitter the other day but is anything ever innocent or innocuous when “thrown” out onto twitterverse or the interwebs? I was trying to validate the use of “codeless” when describing certain types of SharePoint solutions.

nickhadlee Poll: Is #XSL code? In the context of a ‘codeless’ solution 🙂 [Feel free to RT]

Why? Was I trying to deliberately rile people and get into some sort of tit-for-tat twitter banter going? No – absolutely not. The context of the question was aimed at what an end-user might consider code. A typical end-user might not even know what XSL is so the point is possibly moot. Really at the heart of my question was to define what we can call a “no code” SharePoint solution. I am a big fan of using the “no code” moniker and to quote Jim it is "probably more related to business politics rather than technical reality".

So what sort of response did I get? It started off pretty tame.

iwkid RT @nickhadlee: Poll: Is #XSL code? In the context of a ‘codeless’ solution <– I consider it "no-code" in that it is not managed/deployed

kennethprice @nickhadlee I think xsl is within boundaries of codeless solution.

Off I went to bed thinking that was that. 3-0 to the “it’s not code” camp and the “codeless” term can be applied liberally. Hmm that’s what I thought. Overnight Jim and Raymond decided to put pen-to-paper and expand their thoughts on the topic past the 140 character limitations of twitter:

dullroar @nickhadlee @iwkid @sympmarc My (long) answer to the poll: http://ping.fm/aziFn

iwkid @dullroar @nickhadlee @sympmarc @EUSP My response 🙂 http://www.iwkid.com/blog/Lists/Posts/Post.aspx?ID=82

Not to mention I irked Marc a little. Marc and I chat a bit on the interwebs so I knew the responses were all in good humour (I think…Marc we still talking???):

sympmarc RT @nickhadlee: Poll: Is #XSL code? -> You know my answer to this one. Is English not a language because lots of people speak it?

sympmarc @nickhadlee Is Druidism not a religion because it contains little spiritual duality?

sympmarc @nickhadlee Ok, that’s enough for me. Goodnight, Gracie.

For me Jim’s post pretty clearly sums up why XSL is indeed code. Based on Raymond’s response I think we both now admit our initial NOs were really a bit premature! If you’re still reading then I do congratulate you on persistence…now would be a good time to pull out some high-school-essay-style argument backed up with evidence. Not quite yet – I am quickly going to mention that there were other RTs (that’s a retweet for the twitter uninitiated. Twitter…what you mean that twitter-the-complete waste of time social-media-thing-ma-bob? No I don’t mean that. I mean twitter-the-extended-SharePoint-community-reach-out-tool. Sorry got a little preachy there!). One that I think is worth a mention was from Mark Miller (@EUSP) over at EndUserSharePoint.com. Why? Because if you work in the “no code” world then please check out the site as its one of the better resources for that kind of stuff:

EUSP RT @sympmarc @dullroar: @nickhadlee @iwkid @sympmarc http://ping.fm/aziFn -> Is XSL code? <- Critical discussion for EUSP authors.

Ok so I think I need to wrap this baby up so here is where I stand on the matter.

Do we need a label like “no code” or “codeless”? Does this all really matter or is it just semantics? No I don’t think it matters, not really. It seems easier to brand something ”no code” to make it easier to sell the idea to people that we are using the SharePoint platform more extensively instead of needing to deploy some heavy code-based customisations (By the way I like code – I even write some occasionally!). Are “no code” solutions any less risky or a lower impact option than deployed DLLs?…..NO! That would be a massive half-truth/un-truth/fallacy/plain-old-lie. I have seen Data Views, JavaScript and other “codeless” options bring pages and sites to their knees just as well as any dodgy code can.

Answer the question Nick! Is XSL code? I’d have to say (now) yes it is, thanks again Jim! Do we need a name for this so called “codeless” middle tier? Hmm, probably not but the debate will rage on for a bit yet…bet you a fiver! I think Marc Anderson said it best (not exactly like this but close enough).

“Does it really matter how we get to the solution? It’s satisfying the business requirement that matters most!”

Now I think I have come to the end of my diatribe. I’m not sure if I went anywhere but I at least feel I spent as much time as Jim and Raymond on a response. It has made me think I need to do a post on why I prefer using “codeless” techniques whenever possible but that is definitely a post for another time. Feel free to hit me up on twitter or leave a comment if you find any of this contentious/a further pollution of the internet or whatever. It’s really just the ramblings of a confused and simple mind!



The Content Type Is In Use – SharePoint 2010 Error Redux
May 24, 2010, 12:30 pm
Filed under: 2010, Errors, Tips & Tricks

This is a common error if you try to delete a content type in SharePoint. SharePoint is quite rightly trying to stop you from breaking anything by removing a content type if:

  • the content type is being used by a list or library somewhere in your site; or
  • another content type inherits from the content type you are trying to delete

SharePoint provides the SPContentTypeUsages class which allows you to track where the content type is being used and there are some good posts about other things to look for when tracking down the offending content type. In SharePoint 2010 there is an extra place you need to look…the recycle bin.

It seems SharePoint 2010 throws this error if you have assigned the content type to a list or library and it has been deleted to the recycle bin. I’m not sure why, and in this circumstance SPContentTypeUsages is no good to you – it won’t have any references about lists in the recycle bin.

Just remember next time you get this error to check the recycle bin and delete any lists or libraries that reference the content type.

Side Note – SharePoint Manager

A really easy way to get access to the information provided by SPContentTypeUsages is via SharePoint Manager.

SPM 2010

This is what you will see if a list referencing the content type is in the recycle bin…nothing!

Content Type In Use



5 Reasons to Attend the 2010 New Zealand SharePoint Conference
May 8, 2010, 1:48 am
Filed under: 2010, NZSPC, SharePoint

Ok so does anyone really need any reasons to attend a conference, let alone a SharePoint conference? Probably not…but maybe, just maybe, you need a little ammo to justify getting your manager, your wife/husband/partner/significant other/whoever to let you come along.

So in Letterman-like fashion heeeere’s tonight’s top 5 reasons to attend the 2010 New Zealand SharePoint Conference:

NZ SharePoint Conference

1. SharePoint 2010

The NZ Conference is on June the 9th and 10th (less than 5 weeks away) and SharePoint 2010 gets its public launch on May 12th. That’s only about 30 days between the launch and the conference. How many other SharePoint Conferences are going to be so close to the launch date? What better place to come and learn about SharePoint 2010?

2. SharePoint 2007

SharePoint 2010 is getting a lot of attention at the moment but this conference isn’t all about SharePoint 2010! There is still going to be a lot of 2007 focused content so if you want to hear about SharePoint 2007, maybe listen to what great things people have done with it, talk to people who have worked with 2007 for the last couple of years then “this will be the New Zealand conference to learn about SharePoint 2007”.

3. World Class Speakers

This year’s speaker line-up is really impressive!

There is a mix of international and local speakers which includes a number of MVP’s, a Certified Master, not to mention a whole other range of fantastic speakers from diverse backgrounds. The internationally renowned SharePoint experts are making fairly lengthy trips to get here and share their knowledge and there is some great home grown talent too so come and listen to what they have to say. I bet you learn a thing or two!

<Plug> Gary Payne and myself will be giving the session 2007 and 2010 Head to Head in the Real World to compare building a solution using 2010 vs. 2007. If you want to see what has changed, been made easier, or just want to see two SharePoint solutions built in under 50 minutes then come and see our session!</Plug>

4. It’s THE New Zealand SharePoint Event of the Year

Unlike other technology-focused conferences (such as TechEd) this will be about SharePoint, SharePoint and more SharePoint. If you want to know anything about SharePoint (2007 or 2010) and you’re in New Zealand between June 9-10 then this is the place you should be.

The session content will range from beginner (100 level) to deep-dive (300 level) in either Business, Technical, Vendor and Voice of the Customer streams. Whether you’re an IT pro, developer, consultant, business analyst, decision maker or end-user, there WILL be something at this conference for you.

5. It’s a Conference!

This is a two day event. Its a great way to get away from the office – of course the primary focus is on the sessions but conferences are sooo much more than sessions. SharePoint conferences are a fantastic way to network with other SharePoint people, maybe meet some of those individuals you interact with online, and there is more than likely going to be at least one world famous SharePint happening too.

So if you haven’t already it is high time to go get your conference ticket before they sell out!

Check out the online interest around the NZ conference on twitter and if you’re at the conference come and find me and say hello. I’ll be at the User Group Community booth, delivering a session and generally wandering around chatting to people.



New Zealand SharePoint Conference
February 22, 2010, 8:50 pm
Filed under: 2010, SharePoint

If you’re in New Zealand and work with, use or just want to hear about SharePoint then I recommend heading along to this years Community SharePoint Conference. If it is a good as last years then this will be a great event for New Zealand SharePoint people!

New Zealand SharePoint Community Conference 2010



SharePoint 2010 Presentation at the Christchurch SharePoint User Group
November 17, 2009, 10:54 pm
Filed under: 2010, SharePoint, SPUG

I’m presenting on Tuesday the 24th at the Christchurch SharePoint User Group. The presentation will be “A ‘brief’ overview and introduction to SharePoint 2010” which will be end-user focused and will highlight some of the new features and improvements that were unveiled at the SharePoint Conference in Las Vegas. See more information about the session here.

<update>

Here are the links from the presentation:



What’s in Your SharePoint Toolbox?
September 19, 2009, 8:50 pm
Filed under: Administration, Development, SharePoint, Tools

This is both a thank you SharePoint community post and also another one of those resource listing posts. I think it is pretty fair to say the Community has provided many people with many of the tools and information that make our jobs easier. Acknowledging what has been helpful both recognises the Community and might direct people to something that they are looking for.

The massive end-user, IT pro, and developer community that has evolved around SharePoint has shared a rich set of tools, best practices, and guidance for the wider benefit of the SharePoint community. It should be mentioned there is also a lot of stuff out there in the wild that shouldn’t be adopted but I think that is the nature of all information on the internet.

Although we are drawing much closer to the public unveiling of SharePoint 2010, it is unlikely it will be available to the large majority of users until some time mid-next year (2010). In between then and now guidance around best practice will emerge and a whole new set of tools will be created and shared. The success of the current version of SharePoint (the huge number of WSS 3.0 and MOSS 2007 deployments) means the current set of tools will continue to be useful and necessary for some time yet.

So in no particular order…

SharePoint Administration / Deployment

  • SharePoint Manager 2007 – one of the most useful tools for SharePoint administrators and developers. It combines many of the features of the central administration, site settings menu and the SharePoint object model into a well-structured and easy-to-use GUI. The ability to inspect and possibly change almost any object/property in the SharePoint Farm makes it a really useful…SharePoint Manager.
  • SharePoint Content Deployment Wizard – this pretty much does what it says – it’s a content deployment tool with a friendly wizard driven interface. Chris O’Brien has developed an GUI for SharePoint’s native deployment API. Therefore, Content Deployment Wizard is a fully supported method of moving content between environments – it’s essentially the same process as used by STSADM’s export/import commands but it has more granular options. Among other things the Content Deployment Wizard lets you perform selective migrations using a nice GUI – really helpful when you only want to migrate a specific list or web instead of the entire site.
  • SharePoint Automation – these custom STSADM extensions by Gary LaPointe provide administrators with a huge number of additional operations that cannot be performed with the out-of-the-box STSAM commands. Often these would be things you would need to develop a custom (even throwaway) script for. At last count there were 143 commands and a growing set of PowerShell cmdlets.
  • Microsoft SharePoint Administration Toolkit – although not a community tool, this is a set of additional administration tools for both WSS and MOSS produced by Microsoft. There is a full overview on the SharePoint Team blog that explains in detail how the “[toolkit provides] functionality to address various difficult administrative tasks…[including] SharePoint Diagnostics Tool improvements, the Permissions Reporting Tool, the Quota Management command, and Security Configuration Wizard Manifests”. See the SharePoint Team blog for the download links, installation instructions and other useful documentation.

SharePoint Development

  • SharePoint Search Service Tool – allows you to connect to the search service of either MOSS or WSS via their web services. This is particularly helpful in inspecting the available scopes, managed properties, output of the search index and actually building the search queries. Using the SharePoint Search Service Tool’s GUI you can “build queries in either Keyword or SQL Syntax, submit those queries and examine the raw web service results”. The SharePoint Search Service Tool is useful not only in building up the search query syntax for reuse in web parts but as mentioned on the tools Codeplex homepage, it is very useful for “troubleshooting and verifying the behavior and configuration of a SharePoint environment”.
  • U2U CAML Query Builder – CAML queries are pretty difficult to write unless they are really trivial, and even the the syntax is easy to get wrong if you are doing it by hand. Luckily the good people from U2U have provided an interactive GUI that can connect to SharePoint and help you build the query and interactively inspect the results. Given the pervasiveness of CAML queries throughout SharePoint, this is one tool that is very useful for any SharePoint development.
  • STSDEV – a great alternative to the Visual Studio extensions for SharePoint Services (VSeWSS). It is, or should be, a well-known best practice that features, files and other customisations should be deployed to SharePoint using solution packages (WSP’s). STSDEV, VSeWSS and other Visual Studio add-ins, such as WSP Builder, provide an integrated method to package up the artefacts either created from, or included with a Visual Studio project into a deployable SharePoint solution file.
  • Warmup Scripts – SharePoint, like any ASP.NET application, is really slow for the first request to a page in the web application. This is because IIS and ASP.NET have to do an initial just-in-time (JIT) compile for that first request, which happens after an IISReset or application pool recycle has occurred. Most SharePoint application pools are set to recycle every night so this is always going to affect at least one user in the morning. Warmup scripts address this issue by making that first request to ensure the pages are compiled and ready to be served. There are many different flavours of warmup scripts including the SharePoint Warmup Job by Andrew Connell that manages the warmup requests from central admin and the Application Pool Manager by Spencer Harbar that allows both the recycling and warming up of application pools.
  • SharePoint Designer – everyone (should) know about SharePoint Designer by now, especially since it was made free by Microsoft. This powerful editor for SharePoint sites shouldn’t be dismissed by developers; the powerful dataview/dataform web part is an example of something that can be “developed” using SharePoint Designer.
  • CodePlex – this is where a large amount of the useful community tools and projects can be found. The MOSS Faceted Search, Community Kit for SharePoint and SmartTools for SharePoint are just a few examples and the list goes on.

Web Development

  • Firebug (for Firefox) – possibly the most useful web development tool ever – that’s a pretty big statement but I firmly believe it! Firebug is a Firefox plug-in (it has a sort-of-IE-version) that allows for the live inspection, editing and debugging of the HTML, CSS and JavaScript of a page. The CSS inspector is extremely useful when trying to track down what style rules are being applied to a specific element (and how they can be overridden in the case of Core.css).
  • YSlow (for Firefox) – “analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages” and is a must for anyone who is trying to improve the performance of a page. The rules that YSlow uses to determine the performance of the page all have recommendations on how they can be implemented. This is an excellent tool for improving page/site performance.
  • Fiddler – allows for the inspection of the HTTP traffic between your browser and the server. This includes all of the images, CSS and JavaScript that makes up the page and shows the HTTP codes, load times, compression settings and a myriad of other information for really inspecting what is happening during those requests. Firebug, YSlow and Fiddler all complement each other well and are an absolute must for any performance tuning of SharePoint pages and sites.
  • jQuery – the jQuery JavaScript library deals with many of the issues of cross-browser support then adds a huge set of methods “…that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development”. It’s a Swiss-army-knife for web development and one method of customising SharePoint to enhance the users experience.

General Development

  • RedGate .Net Reflector – is a free .NET assembly explorer. This tool is especially useful to check what version of the dll’s are being deployed with your SharePoint solutions – i.e. did I set the build to debug or release mode?
  • WinMerge – sometimes you just need to compare the difference between two files and WinMerge is great for quickly comparing and finding those differences.
  • EditPad Pro – this is notepad “on steroids”. There are a lot of alternative text editors available but EditPad’s built-in regular expression engine which then provides support for regular expressions during find and replace is invaluable.
  • Log Parser Lizard – I have only used this tool a few times but it was so helpful that I thought it was worth mentioning. Also the credit goes to Todd Klindt as I came across it on a blog post of his. In a nutshell, Log Parser Lizard is a GUI for Microsoft’s Log Parser. Log Parser allows for SQL-like syntax to be used to query text-based data such as log files, XML and CSV files. Log Parser Lizard wraps the complexity of the command-line operations of Log Parser into a nice GUI and includes lots of pre-canned queries out-of-the-box.

SharePoint seems to be the type of product where there is more than one tool to achieve a task and often there is the need for more than one tool to complete that task. These are the tools that I have used consistently and found really helpful and I know there are a lot more out there than this less-than-exhaustive list. If you have any really good tools that you would like to share then please leave a comment.



SharePoint Conference 2010 Sessions…More Info Released
September 9, 2009, 9:41 pm
Filed under: 2010, SharePoint

More information about the sessions at SharePoint 2009 Conference have been released. The content is looking pretty good!

SharePoint 2009 Conference Sessions

Are you heading along? Excited too? Drop me a comment or send me a message on twitter @nickhadlee



SharePoint Conference and 2010
August 24, 2009, 8:05 pm
Filed under: 2010, SharePoint

I’m pretty excited about attending the SharePoint Conference in Las Vegas (not to mention fortunate).

A quick check online reports the distance between New Zealand and California is over 10,750 kilometers (6,700 miles). There is a bit of a margin for error as the online tools didn’t know about Christchurch, but needless to say its a long way.

Microsoft recently launched a shiny new website for the conference with all the usual pre-conference information:

Sharepoint Conference

So whats on the agenda? According to the session sneak peak:

  • SharePoint 2010 Overview and What’s New
  • Upgrading to SharePoint 2010
  • SharePoint 2010 Capacity and Performance Planning
  • SharePoint 2010 Security and Identity Management: What’s New.
  • Visual Studio 2010 Tools for Office Development
  • SharePoint 2010 Ribbon, ECMAScript and Dialog Framework Development
  • Developing with REST and LINQ in SharePoint 2010
  • Upgrading SharePoint Server 2007 Code to SharePoint 2010
  • Building SharePoint Composite Applications with the Microsoft Application Platform
  • What’s New in Business Connectivity Services (The Business Data Catalog Evolves!)
  • FAST Search for SharePoint – Capabilities Deep-Dive
  • Advanced Dashboard Creation with PerformancePoint Services for SharePoint 2010
  • Overview of Visio 2010 and Visio Services for SharePoint 2010
  • SharePoint 2010 Web Content Management Deep-Dive
  • If You Build It, They Will Come: Driving End User Adoption

Are you attending #spc10? If so drop me a comment or a tweet as I hope to meet as many SharePoint people as possible while in the US of A!



jQuery to Fix ‘Image Web Part’
July 18, 2009, 6:35 pm
Filed under: jQuery, SharePoint

While working on a mini-demo site today I managed to get distracted with a very minor (and irrelevant) component of the site. I felt compelled to find an elegant-ish resolution even though it served no practical purpose for the demo I was building. How often does that happen?

Image Web Part Sizing

The out-of-the-box Image Web Part is great for adding images to a site. Like all Web Parts it has some properties for changing the web parts behavior, but the problem is some of them don’t quite work as you might expect.

The width and height properties are the true target of this this post. Your initial expectation when you set them is the image displayed by the web part will resize to match the settings. This just isn’t how it works – if the image’s physical size is bigger than the Web Part then some ugly scroll-bars appear.

Image Without Resize

Figure 1: Standard ‘Image Web Part’ with the width property set.

Using a little bit of jQuery we can use these properties to apply the settings to our image as well. The following script can be added to the site using the Content Editor Web Part.

 <script type="text/javascript">
$(function(){
 $("img[id^='MSOImageWebPart_']").each(function(){
            var width = $(this).width();
            var parentDiv = $(this).parents("div.ms-WPBody");
            if(width > parentDiv.width()) {
                this.width = parentDiv.width();
            }
        });       
});
</script>  

Dynamically Resized Image

Figure 2: ‘Image Web Part’ that was resized with jQuery

Note: In this example I am only manipulating the width property of the image element. This leaves the browser to calculate the height of the image to keep everything in proportion. The height could be applied as well but then the image can start to look a little distorted):

See my previous post on jQuerywhich has some useful jQuery links including Jan Tielens excellent post on deploying jQuery to a site collection via a feature. Time to get back to building the demo now the distraction has been dealt with…



Search Service, Anonymous Access and 401s
July 7, 2009, 11:26 pm
Filed under: Administration, Authentication, SharePoint

In another semi-related post I was talking about anonymous access in SharePoint and a work around that can be used if you need to force authentication to work at the same time. It is as counter intuitive as it sounds…

An unexpected side affect of anonymous access can be that SharePoint web services might not work as expected. This certainly was the case in the situation I described in the other post but luckily Dave Wollerman describes a fix for this issue.

An issue I can see arising is when you start to disconnect what SharePoint is managing – configurations via central administration – versus what you are now directly responsible for managing with IIS then your maintenance headache increases. For example: In a farm you will need to make sure all front-ends are synchronised by changing the IIS settings on each server.




<span>%d</span> bloggers like this: