2. SharePointDesignerImprovements Add lists, columns, forms , custom actions without the need to go to the browser. Fine grained designer control SPD work migrates to Visual Studio 2010 SPD customization work exported to .wsp files .wsp files imported into Visual Studio
5. PowerShell 2007 administration = STSADM.EXE + extensions and console applications Replaced with PowerShell PowerShell support effectively replaces STSADM.EXE SharePoint admins/devs must learn PowerShell basics You can write powerful scripts against WSS OM You can develop custom PowerShell snap-ins
10. Visual Studio 2010 SharePoint Tools End-to-end SharePoint 2010 developer story SharePoint Explorer for site exploration SharePoint 2010 project and item templates Visual designers for core scenarios Migration path for Visual Studio 2008 for WSS 3.0 Extensible by 3rd party developers Benefits to SharePoint developers Abstracts away details of RootFiles directory Abstracts away details of building .wsp file Lessens/eliminates need for external utilities
12. Feature Improvements Feature Versioning & Upgrade (ALM) New Events Workflow Association Property Bag UI Version Web Templates New custom action options
13. Feature Versioning & Upgrade Version Range – BeginVersion/EndVersion Upgrade Elements CustomUpgradeAction Parameters ApplyElementManifest MapFile – FromPath/ToPath AddContentTypeField
16. Post Synchronous Events WSS 3.0 “after” events are exclusively asynchronous Problem when wanting to do post processing after item submitted, but before displaying to user SPF 4.0 adds new property on receiver definition to change “after” event to synchronous SPEventReceiverDefinition.Synchronization
17. Event Impersonation Improvements WSS 3.0 events run in context of user who triggered the event Certain things trigger events to run under System Account (workflow, etc), but doesn’t permit reverting back to user who triggered action SPF 4.0 now adds the originating user & user token on SPEventPropertiesBase
18. Feature Property Bag Promote Feature Properties into Web/Site property bag Root web Web Folder List Item No direct VS designer support Updates value if exists, otherwise adds Types enforced: DateTime, Int32
19. Web Templates Replacement and Improved Framework for STP -- Save as Template->WSP Exports everything +content(optional) +onet.xml Stored in Solution Gallery or at the Farm $ListId:Lists/someListName Considerations Use VS WSP import to trim or ‘featurize’ items Web Templates are Features and can be upgraded
20. Relational Lists: Joins With relational lists, SPF 4.0 adds support for joins Joins can only be implemented by developers using the API, CAML or SharePoint Designer 2010 New properties on SPQuery: SPQuery.Join SPQuery.ProjectedFields Use SPLinq instead of CAML to join two lists in code
21. Querying Large Lists If throttling is enabled & list limit exceeded threshold, users won’t be able to query lists by default via API Can override querying the large list settings provided Web App configured to allow it Override using: SPQuery.RequestThrottleOverride SPSiteDataQuery.RequestThrottleOverride Only users with proper permissions get override ability (set via policies)
22. Content Iterator SPQuery query = new SPQuery(); query.Query = "<Where><Eq><FieldRef Name=quot;MyIndexedFieldquot;/><Value Type=quot;Textquot;>FieldValue</Value></Eq></Where>" + ContentIterator.ItemEnumerationOrderByNVPField; ContentIteratorci = new ContentIterator();ci.MaxItemsPerQuery = 500; ci.ProcessItemsInList(query, delegate(SPListItemitem) { // Work on each item. }, delegate(SPListItemitem, Exception e) { // Handle an exception that was thrown while iterating. // Return true so that ContentIteratorrethrows the exception. return true; } );
SharePoint Designer has gone through many significant changes and is now a solid development toolSharePoint objects such as lists and workflow associations are seen as first class objects in the new UIEach SharePoint object has a summary pageThe new workflow designer is much more powerfulSPD can create reusable workflows – this was a big problem in SPD 2007Prototypes created in SPD can be migrated into Visual Studio 2010
The SharePoint team has now gotten in line with many other server product teams at Microsoft and made SharePoint Server 2010 completely administrate-able through PowerShell scriptsBoth dev’s and admins need to get to know powershell, as a dev it will replace some of the console admin apps typically written as well as setup and tear down scripts for deployments.
Windowspowershell plus load snapinSharePoint management shell from sharepoint menuISE – can limited debugVisual studio for custom cmdlet creation + third party tools
Get all sharepoint commands
The developer dashboard has been introduced with SharePoint Server 2010. It shows diagnostics and performance-related statistics.How long did the request take to run?What event handlers were fired?In what sequence did these event handlers fire?At the moment is enabled via code/powershell. Can be set to on , off or ondemand
The Visual Studio 2010 SharePoint Tools (SPT) represents a significant step forward for professional developers using SharePoint. SharePoint Explorer fallows quick exploration through a siteThis makes it possible to launch browser at specific place within siteSharePoint 2010 introduce a new project structure as well as project tmplates and project item templates. There are designers to create things like features and solution packages.One of the most appealing aspects of SPT is that it is extensibleYou can add your own custom project templates and item templatesYou can add menu commands into the Visual Studio UI.
Version Range denotes the target version to upgrade. Any feature with this version or newer, or where a version does not exist will be upgraded to the EndVersion. The feature version is updated to reflect this new EndVersion.ApplyElementManifest – allows for an additional manifest file to be added to the featureCustomUpgradeAction -- allows for the passing of one or more parameters to a feature receiver’s FeatureUpgrading method.AddContentTypeField – Adds a new field to a provisioned content type. The element takes a ContentTypeId, FieldId, and a bool PushDown which denotes ifThe system should propagates the change to child lists and content types. (Optional)MapFile – Maps a file that has not been customized to a different path on the front-end web server or to simply rename a file. V2V Upgrade most likely scenario.
Highlight that code may run well after you intended e.g. when feature is enabled on site b the first version will run, then the upgrading code.If lots of versions have been incremented this could be a lot of code to run onfeature activation.
WebAdding/ WebProvisioned only fired for sub webs, not for the root web of the site collection.Plus despite naming they are a pair sync and async.
SPF 4.0 introduces concept of synchronous post-eventsAllows developer to do a little post-processing after the commit of the action, but before user is presented with the result of the post
In WSS 3.0 when a workflow triggered an event by adding/changing something in a task list, the task item’s identity would be the system account that executed the workflowIn SPF 4.0 the same is true, but the SPEventPropertiesBase now contains properties that contain the user name & user token of the person who actually triggered the effective action (like started the workflow)
An elements manifest (eg. elements.xml) file can contain a new element section called PropertyBag. This element allows key/value pairs to be promoted into their parent object such as a web, sub web, folder, list item, or file (note no List object here). This allows the developer to avoid writing code which promotes feature properties into property bag elements of these objects. Each value is added to or updated within the Hashtable object which implements the property bag at the parent. Currently two type DateTime and Int32 are enforced in that if the current value is of either of these types for any key which exists an update to these values need to be of the same time or the value in the Hashtable will be set to NULL.Note supported: Farm, WebApplication, ..ListSo this means this will not work for a Farm or WebApplication feature, only supported scope Web.
All of the information is saved as a real solution which VS can open. Developers can build on top of.There is a tie back, they were created from the same WSP, they get the new functionality, features, etc.WebTemplate feature Element – provides a way to deploy site collection specific site definitions. WebTemplate has it’s own site definition (onet.xml), which is merged with the oob site definition template.$ListId:Lists/Announcements – replaced with list GUID when provisioned – this new options is utilize as part of the wsp saving process. You can also utilize this by your self, which provides you a way to customize the view aspx pages etc.
Finally support for joins! Joins can be implemented using CAML query, but much easier to use LINQ CAML schema updated to support LINQ based joins LINQ will generate the CAML under the covers… LINQ much easier to write than new CAML schema Can also create joins via API using two new properties: SPQuery.Join & SPQuery.ProjectedFields
Throttled lists, which is triggered by exceeding the upper limit, will cause queries with a result set in excess of the upper limit to throw an exceptionHowever, this can be overridden by users with required permissions via code
Ensure you include one of the three OrderBy clauses—ContentIterator.ItemEnumerationOrderByID, ContentIterator.ItemEnumerationOrderByPath, or ContentIterator.ItemEnumerationOrderByNVPField—that enables the index to be used.Without an OrderBy clause, your query could be blocked. SharePoint Server 2010 adds a default OrderBy clause that orders by content type, which ensures that folders are returned before list items. Unless you override this behavior with one of the three OrderBy clauses listed above, your query cannot take full advantage of using indexed fields, and it will be blocked whenever the query is not designed to be restrictive enough to return fewer than the maximum number of items. The following code example shows how to use the ContentIterator.ItemEnumerationOrderByNVPField clause. The example assumes that you are querying an indexed field.
Ensure you include one of the three OrderBy clauses—ContentIterator.ItemEnumerationOrderByID, ContentIterator.ItemEnumerationOrderByPath, or ContentIterator.ItemEnumerationOrderByNVPField—that enables the index to be used.Without an OrderBy clause, your query could be blocked. SharePoint Server 2010 adds a default OrderBy clause that orders by content type, which ensures that folders are returned before list items. Unless you override this behavior with one of the three OrderBy clauses listed above, your query cannot take full advantage of using indexed fields, and it will be blocked whenever the query is not designed to be restrictive enough to return fewer than the maximum number of items. The following code example shows how to use the ContentIterator.ItemEnumerationOrderByNVPField clause. The example assumes that you are querying an indexed field.