SPC09: Overview of New Developer Features in SharePoint 2010
At the SharePoint Conference in Las Vegas, Paul Andrew gave a thorough overview of the new features for developers in SharePoint 2010.
This is my modest attempt to convey Paul’s presentation in a simple blog post. Please note that the session contained a huge amount of information and I probably (definitely!) didn’t manage to take it all in. Read on at your own risk…
Development environment and tools
Traditionally, the path to your first SharePoint hello world-web part is littered with technical obstacles in the shape of tedious installation problems, Windows Server 2003 blues, virtual server nightmares etc. No more. Now you just need your laptop to develop SharePoint applications.
The box
SharePoint developers no longer need to run a Windows 2003 Server. In fact, SharePoint and the development tools can now be installed directly on Windows 7 or Vista (service pack 1). Either versions of SharePoint can be used, i.e. SharePoint Foundation (formerly WSS) or SharePoint Server.
The operating system must be 64 bit since SharePoint 2010 only runs in a 64 bit environment.
SharePoint on a desktop operating system is just for developers and not for running a production environment.
Visual Studio 2010
Many of SharePoint 2010’s new features can be accessed from inside Visual Studio 2010. Also, quite a few third-party add-ons may not be needed anymore as the functionality is now covered by Visual Studio.
Highlights:
- Built-in designers for:
- Web parts
- BCS (formerly BDC)
- Workflows
- Package and deploy SharePoint projects
- Generate WSPs
- View SharePoint sites in server explorer
- Integration to Team Foundation Server
- Support for SharePoint sandboxed solutions
- WSPs from SharePoint Designer can be imported (including workflows)
- Build workflow steps for SharePoint Designer
- SharePoint Business Connectivity Services support
- New events projects templates
General improvents
Developer dashboard
A developer dashboard can be displayed automatically at the bottom of every page. The DD displays valuable information about how the page is generated, for instance:
- Timing and duration of events
- Database queries (even the ones SharePoint does in the background)
The DD is activated with the follow stsadm command:
stsadm –o setproperty –pn developer-dashboard –pv ondemand
Coding
Coding for SharePoint just got slightly easier due to the many improvements in .NET framework 4.0 and SharePoint 2010.
Below is a rundown of some of the new features:
- LINQ for SharePoint
- After-synchronous events
- New event types:
- Site-scoped events
- Web creation events
- Workflow improvements:
- Initiation and association forms in Visual Studio
- New design user interface for workflows in SharePoint Designer
- Use Visio 2010 to design workflows
- SharePoint UI can now be saved as a template
- WSP is now the unified developer format – works in site collections and machine
Improvements to lists
In SharePoint 2007, lists can cause any developer headaches. Hopefully, the new list architecture in SharePoint 2010 will solve this. Below is an overview of some of the improvements:
- Validation with Excel-like Formula – forms can be validated using simple syntax
- Lookup to multiple columns
- Lookup fields have true relations which ensure proper deletion (transaction-style)
- List index auto-creation
- Scalability and performance vastly improved:
- Lists and folders can now contain a million elements
- Document libraries can contain 10 million documents
- List query throttling
- Lists views no longer based on CAML but XSL-T. Queries still use CAML
Ribbon and Dialog framework
The ribbon we know (and some love) from Microsoft Office is now used in SharePoint 2010.
Some of the highlights:
- Custom actions can be embedded in the ribbon
- The ribbon is context sensitive
- The SharePoint out-of-the-box forms are replaceable
- New web dialog functionality:
- A dialog floats on top of the SharePoint page and is used to get input from the user
- Fully programmable
Silverlight 3
Silverlight plays an important part in SharePoint 2010 and is used in many of the improved UI elements. From a developer’s point of view, these are the highlights:
- Built-it and customisable media player web part
- List and site creation from within Silverlight
- Office web applications run in Silverlight
- Client object model – call SharePoint APIs from within Silverlight
SPC09: Arrival in Las Vegas
Last night I arrived in Las Vegas for the annual Microsoft SharePoint Conference – along with 13 colleagues from PeopleNet and a handful of clients from Denmark.
Some of us are staying at Mandalay Bay and some (including me) at the Luxor.

Today is the official Microsoft welcome reception and, more importantly, the first SharePint of the conference.
Tomorrow the NDA of SharePoint 2010 is lifted and the sessions can begin. I’ve signed up for many more sessions than I can possibly attend and I also intend to spend time at the partner floor and network/socialise with SharePoint contacts from around the world.
I’ll blog as much as I can and you can also follow me on Twitter.
It’s going to be a busy week…
Crawl Problem with Multiple Value Lookup Fields Acknowledged by Microsoft
Last year we at PeopleNet ran into a problem when using lists with many columns, i.e. around 1600!
Indexing such a list would almost always fail with a timeout or out of memory error in the log, even though SharePoint is supposed to be able to handle at least 2000 columns without performance issues.
We corresponded back and forth with a Microsoft support engineer about the problem and it turned out that lists with many multiple value lookup fields will bring the SQL Server to its knees fairly quickly.
Microsoft has recently released a KB article in relation to this, however, it doesn’t specifically single out multiple value lookup fields as the culprit, although they almost always are.
How To Always Link to the Right Application Pages
As a SharePoint developer you’ve probably run into this problem several times: How to make sure that links to application pages stay valid irrespective of where within a site collection your web part is placed.
If you hand-code links you’re likely to get the path relative to the root site wrong. Even worse, if the the filename of an application page is changed, e.g. from DispForm.aspx to DispFormNew.aspx, your links will surely break.
The application pages
Generally, a SharePoint list contains the following application pages:
- AllItems.aspx
Shows all items in the list - DispForm.aspx
Displays a read-only version of a list item - NewForm.aspx
Form for creating a new list item - EditForm.aspx
Form for editing an existing list item
More applications pages exist but these are the ones most commonly used.
Ensuring unbroken links programmatically
The PAGETYPE Enumeration gives you access to the application pages and enables you to build links that always work.
Assuming you have already created your SPList and SPListItem objects the below snippet builds a link to the correct DispForm:
![]()
Of course, the same applies to NewForm and EditForm.
Linking to the default view of a list
Below a list of elements you may wish to link to the underlying list’s default view. In many cases this will be the AllItems.aspx page but what happens if a user changes the default view in the settings of the list? If you’ve hardcoded a link to AllItems.aspx you may be lucky that the link still works but if AllItems.aspx has been renamed or removed, you’re out of luck.
Instead of hardcoding the link you should use PAGE_DEFAULTVIEW, like this:
Simple, isn’t it?
Groove is now SharePoint Workspace 2010
According to the Groove dev team’s blog, Microsoft Groove is to be integrated more tightly with SharePoint and in the process be given a new name.
SharePoint Workspace 2010 is the new official name for Groove.
I wonder how many more products Microsoft will collect under the SharePoint umbrella before the next release? It seems like Microsoft are aiming to capitalise on the SharePoint name and rebrand some of their lesser known products and even roll them into SharePoint.
Programmatically Checking if a SharePoint Element is Published
Here’s a quick tip for you: How to check if the latest version of an element in a SharePoint list is published.
Once you’ve got hold of an SPListItem, you can check the Versions property (an array containing all the versions of the element).
In this block of code IsPublished becomes True if the latest version is published:
![bool IsPublished = TheItem.Versions[0].Level == SPFileLevel.Published ? true : false;](http://sharepointsharpener.files.wordpress.com/2009/03/image5.png?w=701&h=51)
That’s it.
JavaScript Tips for SharePoint
I’ve gatherered a few productive tips for using JavaScript within SharePoint. The below commands can be used within webparts etc. or directly in the browser’s address field while you’re on a SharePoint page, like this:
Putting javascript: in front of your script snippet will fire it right there and then.
These commands are neither terribly advanced nor applicable on all pages, but they make for a useful reference all the same. I aim to continually update this page with new content so if you have any JavaScript tips, feel free to drop them in the comments.
Edit an application page: MSOLayout_ToggleLayoutMode()
This enables edit mode on SharePoint’s application pages, like EditForm.aspx, DispForm.aspx etc. so you can insert web parts above or below the normal content:
Pop-up an alert with the User ID og the logged-in user: alert(_spUserId)
Enable the Edit toolbar: javascript:__doPostBack(‘ctl00$PlaceHolderTopNavBar$SiteActionsMenuMain$ctl00$wsaShowMenu_CmsActionControl’,'reviewPage’)
Simply enables the toolbar where you can access the page edit functions:
Hide the Edit toolbar: __doPostBack(‘ctl00$PlaceHolderTopNavBar$SiteActionsMenuMain$ctl00$wsaHideMenu_CmsActionControl’,'exitMenu’)
No prizes for guessing this one.
Show help: TopHelpButtonClick(‘NavBarHelpHome’)
Pops up the built-in help page. Interestingly, you can try this on Microsoft’s SharePoint Conference web site:

Travel with the Experts to the SharePoint Conference
Last year PeopleNet gathered more than 30 Danish SharePoint enthusiasts for a series of events at the SharePoint Conference in Seattle.
The events went down a storm and the Danish delegation benefitted a great deal from the networking facilitated by PeopleNet.
Next stop Las Vegas
This year, we are taking things a step further – we are putting together a complete conference package which includes:
- Return airline ticket (Copenhagen – Las Vegas)
- Hotel (Mandalay Bay)
- Conference pass
- Special events during the week of the conference
This way, SharePoint stakeholders from different Danish organisations get to travel with like-minded people instead of going to the conference alone.
For more info (in Danish), click here.
Hardening Your MOSS 2007 WCM Application
This is a re-post of a still relevant post from my old blog at SharePointBlogs.com:
—
Today Last year at the SharePoint Conference in Berlin, Ben Robb of cScape Ltd gave a talk about configuring internet-facing web sites running MOSS 2007/WCM.
He brought up some interesting points about securing the application against unauthorised content editing and attacks from hackers.
Make sure your installation check list contains a least the following items:
1. Enable firewalls and standard network security
Fairly standard stuff, but necessary all the same.
2. Disable SMTP and incoming mail
In essence, you shouldn’t be running services on the server that aren’t necessary for MOSS. Also, close any ports that MOSS doesn’t need.
3. Secure the Central Administration site
Surprisingly, it is very common to leave this entry point wide open. The admin site should be accessible only via an SSL connection .
4. Use lockdown mode
Use this stsadm command to activate lockdown mode:
stsadm –o activatefeature –url <url> -filename ViewFormPagesLockdown\feature.xml
Read more about ViewFormPagesLockdown.
5. Restricted reader role
The anonymous user should have a restricted reader role which only enables viewing of pages, documents and images.
6. Policies
Constrain the maximum access per web application and deny all write access via http://sitename:80.
7. Content deployment
Use different servers for authoring and the actual internet-facing web application. Content generated on the authoring server (typically within the intranet) should be pushed out to the public site using scheduled content deployment jobs.
…
To many administrators the above bullets merely point out the obvious and do feel free to leave comments if you have any additions to the list.
Thanks to Ben Robb for providing 99% of the info for this post.